<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/drivers/rtc/rtc-s35390a.c, branch linux-4.1.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-4.1.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-4.1.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2018-01-17T17:33:22Z</updated>
<entry>
<title>rtc: s35390a: improve irq handling</title>
<updated>2018-01-17T17:33:22Z</updated>
<author>
<name>Uwe Kleine-König</name>
<email>uwe@kleine-koenig.org</email>
</author>
<published>2016-07-02T15:28:10Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=4decce66d9e0542d75debac85998aa68b6753504'/>
<id>urn:sha1:4decce66d9e0542d75debac85998aa68b6753504</id>
<content type='text'>
[ Upstream commit 3bd32722c827d00eafe8e6d5b83e9f3148ea7c7e ]

On some QNAP NAS devices the rtc can wake the machine. Several people
noticed that once the machine was woken this way it fails to shut down.
That's because the driver fails to acknowledge the interrupt and so it
keeps active and restarts the machine immediatly after shutdown. See
https://bugs.debian.org/794266 for a bug report.

Doing this correctly requires to interpret the INT2 flag of the first read
of the STATUS1 register because this bit is cleared by read.

Note this is not maximally robust though because a pending irq isn't
detected when the STATUS1 register was already read (and so INT2 is not
set) but the irq was not disabled. But that is a hardware imposed problem
that cannot easily be fixed by software.

Signed-off-by: Uwe Kleine-König &lt;uwe@kleine-koenig.org&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@free-electrons.com&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@microsoft.com&gt;
</content>
</entry>
<entry>
<title>rtc: s35390a: implement reset routine as suggested by the reference</title>
<updated>2018-01-17T17:33:17Z</updated>
<author>
<name>Uwe Kleine-König</name>
<email>uwe@kleine-koenig.org</email>
</author>
<published>2016-07-02T15:28:09Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=a740217c448eb1b16b7bca95d55d212e6772bf44'/>
<id>urn:sha1:a740217c448eb1b16b7bca95d55d212e6772bf44</id>
<content type='text'>
[ Upstream commit 8e6583f1b5d1f5f129b873f1428b7e414263d847 ]

There were two deviations from the reference manual: you have to wait
half a second when POC is active and you might have to repeat
initialization when POC or BLD are still set after the sequence.

Note however that as POC and BLD are cleared by read the driver might
not be able to detect that a reset is necessary. I don't have a good
idea how to fix this.

Additionally report the value read from STATUS1 to the caller. This
prepares the next patch.

Signed-off-by: Uwe Kleine-König &lt;uwe@kleine-koenig.org&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@free-electrons.com&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@microsoft.com&gt;
</content>
</entry>
<entry>
<title>rtc: s35390a: fix reading out alarm</title>
<updated>2018-01-17T17:33:12Z</updated>
<author>
<name>Uwe Kleine-König</name>
<email>uwe@kleine-koenig.org</email>
</author>
<published>2016-07-02T15:28:08Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=7b1ae699502eb7ef1ac9911567d199b23420c87d'/>
<id>urn:sha1:7b1ae699502eb7ef1ac9911567d199b23420c87d</id>
<content type='text'>
[ Upstream commit f87e904ddd8f0ef120e46045b0addeb1cc88354e ]

There are several issues fixed in this patch:

 - When alarm isn't enabled, set .enabled to zero instead of returning
   -EINVAL.
 - Ignore how IRQ1 is configured when determining if IRQ2 is on.
 - The three alarm registers have an enable flag which must be
   evaluated.
 - The chip always triggers when the seconds register gets 0.

Note that the rtc framework however doesn't handle the result correctly
because it doesn't check wday being initialized and so interprets an
alarm being set for 10:00 AM in three days as 10:00 AM tomorrow (or
today if that's not over yet).

Signed-off-by: Uwe Kleine-König &lt;uwe@kleine-koenig.org&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@free-electrons.com&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@microsoft.com&gt;
</content>
</entry>
<entry>
<title>rtc: rtc-s35390a: use devm_*() functions</title>
<updated>2013-04-30T01:28:38Z</updated>
<author>
<name>Jingoo Han</name>
<email>jg1.han@samsung.com</email>
</author>
<published>2013-04-29T23:20:53Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=b4cd3d6a77b3f8acfd5b8ae9ea9dc43f831f0df9'/>
<id>urn:sha1:b4cd3d6a77b3f8acfd5b8ae9ea9dc43f831f0df9</id>
<content type='text'>
Use devm_*() functions to make cleanup paths simpler.

Signed-off-by: Jingoo Han &lt;jg1.han@samsung.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>drivers/rtc/rtc-s35390a.c: add wakealarm support for rtc-s35390A rtc chip</title>
<updated>2012-10-05T18:05:08Z</updated>
<author>
<name>Michael Langer</name>
<email>michael.brainbug.langer@googlemail.com</email>
</author>
<published>2012-10-05T00:14:37Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=542dd33a4925757c93b2c811b19434822a6c1a73'/>
<id>urn:sha1:542dd33a4925757c93b2c811b19434822a6c1a73</id>
<content type='text'>
Add basic get/set alarm support for the Seiko Instruments S-35390A.  The
chip is used on the QNAP TS-219P+ NAS device.

Signed-off-by: Michael Langer &lt;michael.brainbug.langer@googlemail.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>drivers/rtc/rtc-s35390a.c: convert struct i2c_msg initialization to C99 format</title>
<updated>2012-10-05T18:05:05Z</updated>
<author>
<name>Shubhrajyoti D</name>
<email>shubhrajyoti@ti.com</email>
</author>
<published>2012-10-05T00:14:21Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=65659f6391e5fc7e980958efc2a06276c7891586'/>
<id>urn:sha1:65659f6391e5fc7e980958efc2a06276c7891586</id>
<content type='text'>
Convert the struct i2c_msg initialization to C99 format.  This makes
maintaining and editing the code simpler.  Also helps once other fields
like transferred are added in future.

Signed-off-by: Shubhrajyoti D &lt;shubhrajyoti@ti.com&gt;
Reviewed-by: Felipe Balbi &lt;balbi@ti.com&gt;
Cc: Alessandro Zummo &lt;a.zummo@towertech.it&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>rtc: convert rtc i2c drivers to module_i2c_driver</title>
<updated>2012-03-23T23:58:39Z</updated>
<author>
<name>Axel Lin</name>
<email>axel.lin@gmail.com</email>
</author>
<published>2012-03-23T22:02:31Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=0abc920116303e81702a38429a1b61a896e02b37'/>
<id>urn:sha1:0abc920116303e81702a38429a1b61a896e02b37</id>
<content type='text'>
Factor out some boilerplate code for i2c driver registration into
module_i2c_driver.

Signed-off-by: Axel Lin &lt;axel.lin@gmail.com&gt;
Cc: Piotr Ziecik &lt;kosmo@semihalf.com&gt;
Cc: Alessandro Zummo &lt;a.zummo@towertech.it&gt;
Cc: Scott Wood &lt;scottwood@freescale.com&gt;
Cc: Srikanth Srinivasan &lt;srikanth.srinivasan@freescale.com&gt;
Cc: Mike Rapoport &lt;mike@compulab.co.il&gt;
Cc: Sergey Lapin &lt;slapin@ossfans.org&gt;
Cc: Roman Fietze &lt;roman.fietze@telemotive.de&gt;
Cc: Herbert Valerio Riedel &lt;hvr@gnu.org&gt;
Cc: Alexander Bigga &lt;ab@mycable.de&gt;
Cc: Dale Farnsworth &lt;dale@farnsworth.org&gt;
Cc: Gregory Hermant &lt;gregory.hermant@calao-systems.com&gt;
Cc: Wolfgang Grandegger &lt;wg@grandegger.com&gt;
Cc: Martyn Welch &lt;martyn.welch@ge.com&gt;
Cc: Byron Bradley &lt;byron.bbradley@gmail.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>i2c: Remove all i2c_set_clientdata(client, NULL) in drivers</title>
<updated>2010-06-03T09:33:58Z</updated>
<author>
<name>Wolfram Sang</name>
<email>w.sang@pengutronix.de</email>
</author>
<published>2010-06-03T09:33:58Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=fbae3fb1546e199ab0cd185348f8124411a1ca9d'/>
<id>urn:sha1:fbae3fb1546e199ab0cd185348f8124411a1ca9d</id>
<content type='text'>
I2C drivers can use the clientdata-pointer to point to private data. As I2C
devices are not really unregistered, but merely detached from their driver, it
used to be the drivers obligation to clear this pointer during remove() or a
failed probe(). As a couple of drivers forgot to do this, it was agreed that it
was cleaner if the i2c-core does this clearance when appropriate, as there is
no guarantee for the lifetime of the clientdata-pointer after remove() anyhow.
This feature was added to the core with commit
e4a7b9b04de15f6b63da5ccdd373ffa3057a3681 to fix the faulty drivers.

As there is no need anymore to clear the clientdata-pointer, remove all current
occurrences in the drivers to simplify the code and prevent confusion.

Signed-off-by: Wolfram Sang &lt;w.sang@pengutronix.de&gt;
Acked-by: Mark Brown &lt;broonie@opensource.wolfsonmicro.com&gt;
Acked-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
Acked-by: Richard Purdie &lt;rpurdie@linux.intel.com&gt;
Acked-by: Dmitry Torokhov &lt;dtor@mail.ru&gt;
Signed-off-by: Jean Delvare &lt;khali@linux-fr.org&gt;
</content>
</entry>
<entry>
<title>drivers/rtc/: use bcd2bin/bin2bcd</title>
<updated>2008-10-20T15:52:41Z</updated>
<author>
<name>Adrian Bunk</name>
<email>bunk@kernel.org</email>
</author>
<published>2008-10-19T03:28:41Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=fe20ba70abf7d6e5855c3dacc729490b3d0d077f'/>
<id>urn:sha1:fe20ba70abf7d6e5855c3dacc729490b3d0d077f</id>
<content type='text'>
Change drivers/rtc/ to use the new bcd2bin/bin2bcd functions instead of
the obsolete BCD_TO_BIN/BIN_TO_BCD/BCD2BIN/BIN2BCD macros.

Signed-off-by: Adrian Bunk &lt;bunk@kernel.org&gt;
Acked-by: Alessandro Zummo &lt;a.zummo@towertech.it&gt;
Cc: David Brownell &lt;david-b@pacbell.net&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>i2c: Match dummy devices by type</title>
<updated>2008-05-11T18:37:06Z</updated>
<author>
<name>Jean Delvare</name>
<email>khali@linux-fr.org</email>
</author>
<published>2008-05-11T18:37:06Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=60b129d7bfa3e20450816983bd52c49bb0bc1c21'/>
<id>urn:sha1:60b129d7bfa3e20450816983bd52c49bb0bc1c21</id>
<content type='text'>
As the old driver_name/type matching scheme is going away soon, change
the dummy device mechanism to use the new matching scheme.

This has the downside that dummy i2c clients can no longer choose
their name, they'll all appear as "dummy" in sysfs and in log
messages. I don't think it is a problem in practice though, as there
is little reason to use these i2c clients to log messages.

Signed-off-by: Jean Delvare &lt;khali@linux-fr.org&gt;
</content>
</entry>
</feed>
