summaryrefslogtreecommitdiffstats
path: root/drivers/rtc
Commit message (Collapse)AuthorAgeFilesLines
* Merge tag 'rtc-5.7' of ↵Linus Torvalds2020-04-0436-520/+1085
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux Pull RTC updates from Alexandre Belloni: "More cleanup this cycle, with the final goal of removing the rtc_time_to_tm and rtc_tm_to_time wrappers. All the drivers that have been modified for this now are ready for the end of times (whether it happens in 2033, 2038, 2106, 2127 or even 4052). There is also a single new driver and the usual fixes and features. Summary: Subsystem: - The rtc_time_to_tm and rtc_tm_to_time wrappers have finally been removed and only the 64bit version remain. - hctosys now works with drivers compiled as modules New driver: - MediaTek MT2712 SoC based RTC Drivers: - set range for 88pm860x, au1xxx, cpcap, da9052, davinci, ds1305, ds1374, mcp5121, pl030, pl031, pm8xxx, puv3, sa1100, sirfsoc, starfire, sun6i - ds1307: DS1388 oscillator failure detection and watchdog support - jz4740: JZ4760 support - pcf85063: clock out pin support - sun6i: external 32k oscillator is now optional, the range is now handled by the core, providing a solution for 2034" * tag 'rtc-5.7' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: (87 commits) rtc: ds1307: check for failed memory allocation on wdt rtc: class: remove redundant assignment to variable err rtc: remove rtc_time_to_tm and rtc_tm_to_time rtc: sun6i: let the core handle rtc range rtc: sun6i: switch to rtc_time64_to_tm/rtc_tm_to_time64 rtc: ds1307: add support for watchdog timer on ds1388 rtc: da9052: switch to rtc_time64_to_tm/rtc_tm_to_time64 rtc: da9052: set range rtc: da9052: convert to devm_rtc_allocate_device rtc: imx-sc: Align imx sc msg structs to 4 rtc: fsl-ftm-alarm: report alarm to core rtc: pcf85063: Add pcf85063 clkout control to common clock framework rtc: make definitions in include/uapi/linux/rtc.h actually useful for user space rtc: class: avoid unnecessary lookup in hctosys dt-bindings: rtc: Convert and update jz4740-rtc doc to YAML rtc: jz4740: Rename vendor-specific DT properties rtc: jz4740: Add support for JZ4760 SoC rtc: class: support hctosys from modular RTC drivers rtc: pm8xxx: clear alarm register when alarm is not enabled rtc: omap: drop unused dt-bindings header ...
| * rtc: ds1307: check for failed memory allocation on wdtColin Ian King2020-04-031-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Currently a failed memory allocation will lead to a null pointer dereference on point wdt. Fix this by checking for a failed allocation and just returning. Addresses-Coverity: ("Dereference null return") Fixes: fd90d48db037 ("rtc: ds1307: add support for watchdog timer on ds1388") Signed-off-by: Colin Ian King <colin.king@canonical.com> Link: https://lore.kernel.org/r/20200403110437.57420-1-colin.king@canonical.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
| * rtc: class: remove redundant assignment to variable errColin Ian King2020-04-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | The variable err is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King <colin.king@canonical.com> Link: https://lore.kernel.org/r/20200402110411.508534-1-colin.king@canonical.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
| * rtc: sun6i: let the core handle rtc rangeAlexandre Belloni2020-04-021-15/+10
| | | | | | | | | | | | | | | | Let the rtc core check the date/time against the RTC range. Tested-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com> Link: https://lore.kernel.org/r/20200330201226.860967-1-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
| * rtc: sun6i: switch to rtc_time64_to_tm/rtc_tm_to_time64Alexandre Belloni2020-04-021-3/+3
| | | | | | | | | | | | | | | | Call the 64bit versions of rtc_tm time conversion. Tested-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com> Link: https://lore.kernel.org/r/20200330201226.860967-2-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
| * rtc: ds1307: add support for watchdog timer on ds1388Chris Packham2020-04-012-0/+116
| | | | | | | | | | | | | | | | | | | | | | The DS1388 variant has watchdog timer capabilities. When using a DS1388 and having enabled CONFIG_WATCHDOG_CORE register a watchdog device for the DS1388. Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Link: https://lore.kernel.org/r/20200330025500.6991-1-chris.packham@alliedtelesis.co.nz Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
| * rtc: da9052: switch to rtc_time64_to_tm/rtc_tm_to_time64Alexandre Belloni2020-04-011-4/+2
| | | | | | | | | | | | | | | | Call the 64bit versions of rtc_tm time conversion. Acked-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com> Link: https://lore.kernel.org/r/20200306073548.57579-3-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
| * rtc: da9052: set rangeAlexandre Belloni2020-04-011-0/+2
| | | | | | | | | | | | | | | | The da9052 is an rtc valid from 2000 to 2063 (max year is 63). Acked-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com> Link: https://lore.kernel.org/r/20200306073548.57579-2-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
| * rtc: da9052: convert to devm_rtc_allocate_deviceAlexandre Belloni2020-04-011-3/+7
| | | | | | | | | | | | | | | | This allows further improvement of the driver. Acked-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com> Link: https://lore.kernel.org/r/20200329224240.776568-1-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
| * rtc: imx-sc: Align imx sc msg structs to 4Leonard Crestez2020-03-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The imx SC api strongly assumes that messages are composed out of 4-bytes words but some of our message structs have odd sizeofs. This produces many oopses with CONFIG_KASAN=y. Fix by marking with __aligned(4). Fixes: a3094fc1a15e ("rtc: imx-sc: add rtc alarm support") Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com> Link: https://lore.kernel.org/r/13404bac8360852d86c61fad5ae5f0c91ffc4cb6.1582216144.git.leonard.crestez@nxp.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
| * rtc: fsl-ftm-alarm: report alarm to coreBiwen Li2020-03-291-0/+2
| | | | | | | | | | | | | | | | Report interrupt state to the RTC core. Signed-off-by: Biwen Li <biwen.li@nxp.com> Link: https://lore.kernel.org/r/20200327084457.45161-1-biwen.li@nxp.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
| * rtc: pcf85063: Add pcf85063 clkout control to common clock frameworkMichael McCormick2020-03-261-0/+157
| | | | | | | | | | | | | | | | | | The PCF85063 has a configurable clock output signal. Add support for it using in the CCF. Signed-off-by: Michael McCormick <michael.mccormick@enatel.net> Link: https://lore.kernel.org/r/20200124015239.24662-1-michael.mccormick@enatel.net Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
| * rtc: class: avoid unnecessary lookup in hctosysAlexandre Belloni2020-03-241-14/+2
| | | | | | | | | | | | | | | | rtc_hctosys is only called when the relevant RTC is found, avoid looking it up while we already have a pinter to the proper struct rtc_device. Link: https://lore.kernel.org/r/20200323213039.297458-1-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
| * rtc: jz4740: Rename vendor-specific DT propertiesPaul Cercueil2020-03-241-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | These properties are never set anywhere within any of the upstream devicetree files, so I assume I'm not breaking the ABI with this change. Rename vendor-specific DT properties to have the 'ingenic,' prefix, which they should have had from the start. Signed-off-by: Paul Cercueil <paul@crapouillou.net> Link: https://lore.kernel.org/r/20200311182318.22154-2-paul@crapouillou.net Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
| * rtc: jz4740: Add support for JZ4760 SoCPaul Cercueil2020-03-241-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The WENR feature (set a magic value to enable RTC registers read-write) first appeared on the JZ4760; the JZ4780 came much later. Since it would be dangerous to specify a newer SoC's compatible string as the fallback of an older SoC's compatible string, we add support for the "ingenic,jz4760-rtc" compatible string in the driver. This will permit to support the JZ4770 by having: compatible = "ingenic,jz4770-rtc", "ingenic,jz4760-rtc"; Instead of doing: compatible = "ingenic,jz4770-rtc", "ingenic,jz4780-rtc"; Signed-off-by: Paul Cercueil <paul@crapouillou.net> Link: https://lore.kernel.org/r/20200311182318.22154-1-paul@crapouillou.net Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
| * rtc: class: support hctosys from modular RTC driversSteve Muckle2020-03-234-73/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | Due to distribution constraints it may not be possible to statically compile the required RTC driver into the kernel. Expand RTC_HCTOSYS support to cover all RTC devices (statically compiled or not) by checking at the end of RTC device registration whether the time should be synced. Signed-off-by: Steve Muckle <smuckle@google.com> Link: https://lore.kernel.org/r/20191106194625.116692-1-smuckle@google.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
| * rtc: pm8xxx: clear alarm register when alarm is not enabled韩科才2020-03-231-0/+11
| | | | | | | | | | | | | | | | | | Clear alarm register when alarm is not enabled otherwise the consumer may still start alarm timer if it find the alarm register is not zero. Signed-off-by: hankecai <hankecai@vivo.com> Link: https://lore.kernel.org/r/APoAZgAaCEiRpKG6PlzreaqE.1.1584791417367.Hmail.hankecai@vivo.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
| * rtc: omap: drop unused dt-bindings headerUwe Kleine-König2020-03-231-1/+0
| | | | | | | | | | | | | | | | | | | | | | The definitons in the dt-binding's gpio header only contains some constants to be used in device trees. It is not relevant for rtc-omap (as the gpio API hides the details) and in fact unused so it can just be dropped. Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org> Link: https://lore.kernel.org/r/20200321203737.29850-1-uwe@kleine-koenig.org Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
| * rtc: bd70528: Avoid double error messaging when IRQ absentKeyur Patel2020-03-231-3/+1
| | | | | | | | | | | | | | | | | | | | Since the commit 7723f4c ("driver core: platform: Add an error message to platform_get_irq*()") platform_get_irq() started issuing an error message. Thus, there is no need to have the same in the driver. Signed-off-by: Keyur Patel <iamkeyur96@gmail.com> Link: https://lore.kernel.org/r/20200321180838.12729-1-iamkeyur96@gmail.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
| * rtc: max8907: add missing select REGMAP_IRQCorentin Labbe2020-03-231-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | I have hit the following build error: armv7a-hardfloat-linux-gnueabi-ld: drivers/rtc/rtc-max8907.o: in function `max8907_rtc_probe': rtc-max8907.c:(.text+0x400): undefined reference to `regmap_irq_get_virq' max8907 should select REGMAP_IRQ Fixes: 94c01ab6d7544 ("rtc: add MAX8907 RTC driver") Cc: stable <stable@vger.kernel.org> Signed-off-by: Corentin Labbe <clabbe@baylibre.com> Link: https://lore.kernel.org/r/1584545209-20433-1-git-send-email-clabbe@baylibre.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
| * rtc: fsl-ftm-alarm: enable acpi supportPeng Ma2020-03-231-6/+15
| | | | | | | | | | | | | | | | | | This patch enables ACPI support in Rtc Flex timer driver. Signed-off-by: Peng Ma <peng.ma@nxp.com> Link: https://lore.kernel.org/r/20200318025354.6447-1-peng.ma@nxp.com Link: https://lore.kernel.org/r/20200323072956.38263-1-peng.ma@nxp.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
| * rtc: mxc: Use devm_add_action_or_reset() for calls to clk_disable_unprepare()Anson Huang2020-03-221-27/+19
| | | | | | | | | | | | | | | | | | Use devm_add_action_or_reset() for calls to clk_disable_unprepare(), which can simplify the error handling, and .remove callback can be dropped. Signed-off-by: Anson Huang <Anson.Huang@nxp.com> Link: https://lore.kernel.org/r/1584349785-27042-1-git-send-email-Anson.Huang@nxp.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
| * rtc: ds1307: handle oscillator failure flags for ds1388 variantChris Packham2020-03-221-0/+9
| | | | | | | | | | | | | | | | | | The FLAG register is at a different location to the other supported RTCs so this requires an extra case in the existing switch statement. Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz> Link: https://lore.kernel.org/r/20200207031812.14424-2-chris.packham@alliedtelesis.co.nz Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
| * rtc: mt2712: fix build without PM_SLEEPAlexandre Belloni2020-03-171-0/+2
| | | | | | | | | | | | | | | | | | | | | | Fix this build error when PM_SLEEP is not selected: drivers/rtc/rtc-mt2712.c:412:10: error: ‘mt2712_pm_ops’ undeclared here (not in a function); did you mean ‘mt2712_rtc_ops’? 412 | .pm = &mt2712_pm_ops, | ^~~~~~~~~~~~~ Link: https://lore.kernel.org/r/20200317143421.9551-1-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
| * rtc: 88pm860x: remove platform data supportAlexandre Belloni2020-03-161-10/+1
| | | | | | | | | | | | | | There is no users of the rtc platform data left, remove its support. Link: https://lore.kernel.org/r/20200316102537.180398-1-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
| * rtc: 88pm860x: switch to rtc_time64_to_tm/rtc_tm_to_time64Alexandre Belloni2020-03-161-4/+4
| | | | | | | | | | | | | | Call the 64bit versions of rtc_tm time conversion. Link: https://lore.kernel.org/r/20200311223956.51352-6-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
| * rtc: 88pm860x: stop mangling alarm timeAlexandre Belloni2020-03-161-40/+1
| | | | | | | | | | | | | | | | The RTC core always passes a valid alarm time there is no need to modify it. Link: https://lore.kernel.org/r/20200311223956.51352-5-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
| * rtc: 88pm860x: set rangeAlexandre Belloni2020-03-161-0/+1
| | | | | | | | | | | | | | The 88pm860x RTC is a 32bit read only seconds counter with a 32bit offset. Link: https://lore.kernel.org/r/20200311223956.51352-4-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
| * rtc: 88pm860x: stop calling unused callbackAlexandre Belloni2020-03-161-17/+1
| | | | | | | | | | | | | | pdata->sync is not defined by any platform, stop calling it. Link: https://lore.kernel.org/r/20200311223956.51352-3-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
| * rtc: 88pm860x: stop setting a default timeAlexandre Belloni2020-03-161-13/+0
| | | | | | | | | | | | | | | | It doesn't make sense to set the RTC to a default value at probe time. Let the core handle invalid date and time. Link: https://lore.kernel.org/r/20200311223956.51352-2-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
| * rtc: 88pm860x: fix possible race conditionAlexandre Belloni2020-03-161-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The RTC IRQ is requested before the struct rtc_device is allocated, this may lead to a NULL pointer dereference in the IRQ handler. To fix this issue, allocating the rtc_device struct before requesting the RTC IRQ using devm_rtc_allocate_device, and use rtc_register_device to register the RTC device. Also remove the unnecessary error message as the core already prints the info. Link: https://lore.kernel.org/r/20200311223956.51352-1-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
| * rtc: snvs: Use devm_add_action_or_reset() for calls to clk_disable_unprepare()Anson Huang2020-03-161-14/+13
| | | | | | | | | | | | | | | | | | | | Use devm_add_action_or_reset() for calls to clk_disable_unprepare(), which can simplify the error handling. Signed-off-by: Anson Huang <Anson.Huang@nxp.com> Link: https://lore.kernel.org/r/1584109849-21402-1-git-send-email-Anson.Huang@nxp.com Link: https://lore.kernel.org/r/1584233264-26025-1-git-send-email-Anson.Huang@nxp.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
| * rtc: add support for the MediaTek MT2712 RTCRan Bi2020-03-163-0/+432
| | | | | | | | | | | | | | | | | | | | This add support for the MediaTek MT2712 RTC. It was SoC based RTC, but had different architecture compared with MT7622 RTC. Signed-off-by: Ran Bi <ran.bi@mediatek.com> Link: https://lore.kernel.org/r/20200226051303.22560-3-ran.bi@mediatek.com Link: https://lore.kernel.org/r/20200316104701.209293-2-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
| * rtc: m48t35: remove SGI-IP27 kludgeThomas Bogendoerfer2020-03-161-6/+1
| | | | | | | | | | | | | | | | With the IOC3 MFD driver it's no longer necessary to special case SGI-IP27. Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de> Link: https://lore.kernel.org/r/20200309123514.15543-1-tsbogend@alpha.franken.de Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
| * rtc: sun6i: Make external 32k oscillator optionalJernej Skrabec2020-03-161-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some boards, like OrangePi PC2 (H5), OrangePi Plus 2E (H3) and Tanix TX6 (H6) don't have external 32kHz oscillator. Till H6, it didn't really matter if external oscillator was enabled because HW detected error and fall back to internal one. H6 has same functionality but it's the first SoC which have "auto switch bypass" bit documented and always enabled in driver. This prevents RTC to work correctly if external crystal is not present on board. There are other side effects - all peripherals which depends on this clock also don't work (HDMI CEC for example). Make clocks property optional. If it is present, select external oscillator. If not, stay on internal. Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net> Acked-by: Maxime Ripard <mripard@kernel.org> Link: https://lore.kernel.org/r/20200308135849.106333-2-jernej.skrabec@siol.net Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
| * rtc: puv3: switch to rtc_time64_to_tm/rtc_tm_to_time64Alexandre Belloni2020-03-161-9/+4
| | | | | | | | | | | | | | Call the 64bit versions of rtc_tm time conversion. Link: https://lore.kernel.org/r/20200306010240.40056-2-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
| * rtc: puv3: set rangeAlexandre Belloni2020-03-161-0/+1
| | | | | | | | | | | | | | This RTC is a 32bit seconds counter. Link: https://lore.kernel.org/r/20200306010240.40056-1-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
| * rtc: ab8500: switch to rtc_time64_to_tm/rtc_tm_to_time64Alexandre Belloni2020-03-161-5/+5
| | | | | | | | | | | | | | | | Call the 64bit versions of rtc_tm time conversion. Acked-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20200306010101.39517-1-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
| * rtc: pl031: switch to rtc_time64_to_tm/rtc_tm_to_time64Alexandre Belloni2020-03-161-20/+7
| | | | | | | | | | | | | | | | | | Call the 64bit versions of rtc_tm time conversion to allow extending support after 2106 and properly supporting the STv2 range. Acked-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20200306005809.38530-3-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
| * rtc: pl031: set rangeAlexandre Belloni2020-03-161-0/+8
| | | | | | | | | | | | | | | | | | | | The PL031 and ST v1 RTC are 32bit seconds counters. STv2 is a BCD RTC apparently going from 0000 to 9999, hopefully handling the leap days properly until then. Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20200306005809.38530-2-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
| * rtc: pl031: remove useless invalid alarm handlingAlexandre Belloni2020-03-161-16/+8
| | | | | | | | | | | | | | | | | | The core will never pass an invalid alarm to .set_alarm, it is not necessary to check for its validity. Acked-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20200306005809.38530-1-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
| * rtc: fsl-ftm-alarm: allow COMPILE_TESTAlexandre Belloni2020-03-161-1/+1
| | | | | | | | | | | | | | Allow building building the driver with COMPILE_TEST. Link: https://lore.kernel.org/r/20200306131629.18837-1-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
| * rtc: mpc5121: switch to rtc_time64_to_tm/rtc_tm_to_time64Alexandre Belloni2020-03-161-5/+3
| | | | | | | | | | | | | | Call the 64bit versions of rtc_tm time conversion. Link: https://lore.kernel.org/r/20200306074404.58909-4-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
| * rtc: mpc5121: set rangeAlexandre Belloni2020-03-161-0/+9
| | | | | | | | | | | | | | | | | | The datasheet states that 4052 is the maximum value for year. However, the mpc5121 read_time and set_time function abuse the target time register instead of using the broken down time so it is limited to 2106. Link: https://lore.kernel.org/r/20200306074404.58909-3-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
| * rtc: mpc5121: convert to devm_rtc_allocate_deviceAlexandre Belloni2020-03-161-10/+12
| | | | | | | | | | | | | | This simplifies the path for the rtc_ops selection. Link: https://lore.kernel.org/r/20200306074404.58909-2-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
| * rtc: mpc5121: simplify probeAlexandre Belloni2020-03-161-14/+8
| | | | | | | | | | | | | | Use devm managed function to simplify probe and remove. Link: https://lore.kernel.org/r/20200306074404.58909-1-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
| * rtc: pm8xxx: stop validating valid alarm timeAlexandre Belloni2020-03-161-6/+0
| | | | | | | | | | | | | | rtc_time64_to_tm never generates an invalid rtc_tm, stop validating it. Link: https://lore.kernel.org/r/20200306073758.58050-4-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
| * rtc: pm8xxx: : switch to rtc_time64_to_tm/rtc_tm_to_time64Alexandre Belloni2020-03-161-4/+4
| | | | | | | | | | | | | | Call the 64bit versions of rtc_tm time conversion. Link: https://lore.kernel.org/r/20200306073758.58050-3-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
| * rtc: pm8xxx: set rangeAlexandre Belloni2020-03-161-0/+1
| | | | | | | | | | | | | | The pm8xxx are 32bit seconds counter. Link: https://lore.kernel.org/r/20200306073758.58050-2-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
| * rtc: pm8xxx: convert to devm_rtc_allocate_deviceAlexandre Belloni2020-03-161-9/+5
| | | | | | | | | | | | | | | | This allows further improvement of the driver. Also remove the unnecessary error string as the core will already display error messages. Link: https://lore.kernel.org/r/20200306073758.58050-1-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>