aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc/rtc-pcf85063.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2016-03-14rtc: pcf85063: remove struct pcf85063Alexandre Belloni1-17/+5
No members of struct pcf85063 are used anymore, remove the whole structure. Reviewed-by: Juergen Borleis <jbe@pengutronix.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-03-14rtc: pcf85063: remove useless DRV_VERSIONAlexandre Belloni1-5/+0
Since the driver is mainlined there is no use for a separate version number. Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-03-14rtc: pcf85063: remove useless century handlingAlexandre Belloni1-7/+0
pcf85063_get_datetime() tries to handle a century bit but that bit is not documented and the final value is never used anywhere else in the kernel. Reviewed-by: Juergen Borleis <jbe@pengutronix.de> Tested-by: Ulrich Ölmann <u.oelmann@pengutronix.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-03-14rtc: pcf85063: fix time/date settingJuergen Borleis1-23/+55
When setting a new time/date the RTC's clock must be stopped first, in order to write the time/date registers in an atomic manner. So, this change stops the clock first and then writes the time/date registers and the clock control register (to re-enable the clock) in one turn. Signed-off-by: Juergen Borleis <jbe@pengutronix.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-03-14rtc: pcf85063: fix time/date readingJuergen Borleis1-0/+7
Check if the RTC signals an invalid time/date (due to a battery power loss for example). In this case ignore the time/date until it is really set again. Signed-off-by: Juergen Borleis <jbe@pengutronix.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-03-14rtc: pcf85063: simplify code to read the current timeJuergen Borleis1-26/+21
By using i2c_smbus_read_i2c_block_data() the code is now much simpler. While at it: when reading the RTC's seconds register, all time/date registers are frozen until the RTC's year register is read. So it is important to read all time/date registers in one turn to not lose a second event. Make it more clear why the read must happen in this way. Signed-off-by: Juergen Borleis <jbe@pengutronix.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2015-11-08rtc: pcf85063: return an error when date is invalidAlexandre Belloni1-7/+1
Return an error when the date is invalid as the policy should be implemented there. Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2015-09-05rtc: Drop owner assignment from i2c_driverKrzysztof Kozlowski1-1/+0
i2c_driver does not need to set an owner because i2c_register_driver() will set it. Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2014-08-08rtc: add pcf85063 supportSøren Andersen1-0/+204
Add support for the pcf85063 rtc chip. [akpm@linux-foundation.org: fix comment typo, tweak conding style] Signed-off-by: Soeren Andersen <san@rosetechnology.dk> Cc: Alessandro Zummo <a.zummo@towertech.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>