aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc/rtc-pcf85363.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2018-03-17rtc: pcf85363: set time accuratelyAlexandre Belloni1-4/+16
As per 8.2.6 Setting and reading the time in RTC mode, first stop the clok, then reset it before setting the date and time registers. Finally, start the clock. This uses register address wrap around from 0x2f to 0x00 for efficiency. This allows to set the clock with a millisecond accuracy (drift is not corrected in this example): RTC System 1325388767 1325388767.000029180 1325388768 1325388768.000018362 1325388769 1325388769.000006544 1325388770 1325388769.999992725 1325388771 1325388770.999974544 Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2018-03-17rtc: pcf85363: add alarm supportAlexandre Belloni1-0/+159
Handle alarms, currently only on INTA Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2018-03-17rtc: pcf85363: add .max_register in regmap_configAlexandre Belloni1-0/+1
This helps debugging as it allows reading registers from debugfs. Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2018-03-01rtc: pcf85363: put struct nvmem_config on the stackAlexandre Belloni1-9/+10
Avoid allocating memory for struct nvmem_config. Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2018-03-01rtc: pcf85363: call rtc_nvmem_register()Alexandre Belloni1-2/+6
Call rtc_nvmem_register instead of letting the core do it and stop using the nvmem_config member of struct rtc_device. Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2017-11-08rtc: add support for NXP PCF85363 real-time clockEric Nelson1-0/+220
Note that alarms are not currently implemented. 64 bytes of nvmem is supported and exposed in sysfs (# is the instance number, starting with 0): /sys/bus/nvmem/devices/pcf85363-#/nvmem Signed-off-by: Eric Nelson <eric@nelint.com> Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com> Tested-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>