summaryrefslogtreecommitdiffstats
path: root/drivers/rtc
AgeCommit message (Collapse)Author
2020-11-19rtc: nvmem: remove nvram ABIAlexandre Belloni
The nvram sysfs attributes have been deprecated at least since v4.13, more than 3 years ago and nobody ever complained about the deprecation warning. Remove the sysfs attributes now. [Bartosz: remove the declaration of rtc_nvmem_unregister()] Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com> Link: https://lore.kernel.org/r/20201109163409.24301-5-brgl@bgdev.pl
2020-11-19rtc: omap: use devm_pinctrl_register()Bartosz Golaszewski
Use a managed variant of pinctrl_register(). This way we can shorten the remove() callback as well as drop a goto label from probe(). Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/20201109163409.24301-2-brgl@bgdev.pl
2020-11-19rtc: sc27xx: Always read normal alarmAlexandre Belloni
The RTC core only reads the alarm from the hardware at boot time, to know whether an alarm was already set before booting. It keeps track of all the alarms after that so there is no need to ever read the auxiliary alarm. Commit 3822d1bb0df1 ("rtc: sc27xx: Always read normal alarm when registering RTC device") already effectively removed the capability to read the auxiliary alarm as .read_alarm is always called with rtc->registered set to false. Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Reviewed-by: Chunyan Zhang <zhang.lyra@gmail.com> Link: https://lore.kernel.org/r/20201117212201.1288608-1-alexandre.belloni@bootlin.com
2020-11-17rtc: mxc: use of_device_get_match_dataAlexandre Belloni
Use of_device_get_match_data to simplify mxc_rtc_probe. Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Reviewed-by: Fabio Estevam <festevam@gmail.com> Link: https://lore.kernel.org/r/20201117203035.1280099-1-alexandre.belloni@bootlin.com
2020-11-17rtc: mxc: Convert the driver to DT-onlyFabio Estevam
Since 5.10-rc1 i.MX is a devicetree-only platform, so simplify the code by removing the unused non-DT support. Signed-off-by: Fabio Estevam <festevam@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/20201116180326.5199-1-festevam@gmail.com
2020-11-17rtc: rx6110: add i2c supportClaudius Heine
The RX6110 also supports I2C, so this patch adds support for it to the driver. This also renames the SPI specific functions and variables to include `_spi_` in their names. Signed-off-by: Claudius Heine <ch@denx.de> Signed-off-by: Henning Schild <henning.schild@siemens.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/20201117121817.953924-3-ch@denx.de
2020-11-17rtc: Kconfig: Fix typo in help message of rx 6110Claudius Heine
The help message in the Kconfig for the RX-6110 erronously stated RX-6610. Signed-off-by: Claudius Heine <ch@denx.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/20201117121817.953924-2-ch@denx.de
2020-11-17rtc: ds1307: Drop of_match_ptr and CONFIG_OF protectionsAndy Shevchenko
These prevent use of this driver with ACPI via PRP0001. Drop them to remove this restriction. Also added mod_devicetable.h include given use of struct of_device_id. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/20201116142859.31257-3-andriy.shevchenko@linux.intel.com
2020-11-17rtc: ds1307: Make use of device propertiesAndy Shevchenko
Device property API allows to gather device resources from different sources, such as ACPI. Convert the drivers to unleash the power of device property API. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/20201116142859.31257-2-andriy.shevchenko@linux.intel.com
2020-11-17rtc: ds1307: Remove non-valid ACPI IDsAndy Shevchenko
The commit 9c19b8930d2c ("rtc: ds1307: Add ACPI support") added invalid ACPI IDs (all of them are abusing ACPI specification). Moreover there is not even a single evidence that vendor registered any of such devices. Remove broken ACPI IDs from the driver. For prototyping one may use PRP0001 with device properties adhering to a DT binding. The following patches will add support of that to the driver. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Reviewed-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Cc: Tin Huynh <tnhuynh@apm.com> Link: https://uefi.org/PNP_ACPI_Registry Link: https://lore.kernel.org/r/20201116142859.31257-1-andriy.shevchenko@linux.intel.com
2020-11-17rtc: at91rm9200: Add sam9x60 compatibleAlexandre Belloni
Handle the sam9x60 RTC. While it can work with the at91sam9x5 fallback, it has crystal correction support and doesn't need to shadow IMR. Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com> Link: https://lore.kernel.org/r/20201117133920.1229679-1-alexandre.belloni@bootlin.com
2020-11-17rtc: at91rm9200: add correction supportAlexandre Belloni
The sama5d4 and sama5d2 RTCs are able to correct for imprecise crystals, up to 1953 ppm. Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Reviewed-by: Nicolas Ferre <nicolas.ferre@microchip.com> Link: https://lore.kernel.org/r/20201108232001.1580128-1-alexandre.belloni@bootlin.com
2020-11-15rtc: rv3032: fix nvram nvmem priv pointerAlexandre Belloni
The nvmem priv pointer is set to rv3032 but the rv3032_nvram_write and rv3032_nvram_read expect the regmap pointer. Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/20201108223710.1574331-1-alexandre.belloni@bootlin.com
2020-11-15rtc: goldfish: Remove GOLDFISH dependencyJiaxun Yang
Goldfish platform is covered with dust. However the goldfish-rtc had been used as virtualized RTC in QEMU for RISC-V virt hw and MIPS loongson3-virt hw, thus we can drop other parts of goldfish but leave goldfish-rtc here. Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/20201114130921.651882-2-jiaxun.yang@flygoat.com
2020-11-14rtc: snvs: Remove NULL pointer check before clk_*Xu Wang
Because clk_* already checked NULL clock parameter, so the additional checks are unnecessary, just remove them. Signed-off-by: Xu Wang <vulab@iscas.ac.cn> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/20201113080305.65961-1-vulab@iscas.ac.cn
2020-11-14rtc: brcmstb-waketimer: Remove redundant null check before clk_disable_unprepareXu Wang
Because clk_disable_unprepare() already checked NULL clock parameter, so the additional check is unnecessary, just remove it. Signed-off-by: Xu Wang <vulab@iscas.ac.cn> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Acked-by: Florian Fainelli <f.fainelli@gmail.com> Link: https://lore.kernel.org/r/20201113074538.65028-1-vulab@iscas.ac.cn
2020-11-14rtc: pl031: fix resource leak in pl031_probeZheng Liang
When devm_rtc_allocate_device is failed in pl031_probe, it should release mem regions with device. Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Zheng Liang <zhengliang6@huawei.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20201112093139.32566-1-zhengliang6@huawei.com
2020-11-14rtc: cpcap: Fix missing IRQF_ONESHOT as only threaded handlerTian Tao
Coccinelle noticed: drivers/rtc/rtc-cpcap.c:271:7-32: ERROR: Threaded IRQ with no primary handler requested without IRQF_ONESHOT drivers/rtc/rtc-cpcap.c:287:7-32: ERROR: Threaded IRQ with no primary handler requested without IRQF_ONESHOT Signed-off-by: Tian Tao <tiantao6@hisilicon.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/1605000947-32882-1-git-send-email-tiantao6@hisilicon.com
2020-11-14rtc: hym8563: enable wakeup when applicableGuillaume Tucker
Enable wakeup in the hym8563 driver if the IRQ was successfully requested or if wakeup-source is set in the devicetree. As per the description of device_init_wakeup(), it should be enabled for "devices that everyone expects to be wakeup sources". One would expect this to be the case with a real-time clock. Tested on rk3288-rock2-square, which has an IRQ configured for the RTC. As a result, wakeup was enabled during driver initialisation. Fixes: dcaf03849352 ("rtc: add hym8563 rtc-driver") Reported-by: kernelci.org bot <bot@kernelci.org> Signed-off-by: Guillaume Tucker <guillaume.tucker@collabora.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/1ea023e2ba50a4dab6e39be93d7de3146af71a60.1604653374.git.guillaume.tucker@collabora.com
2020-11-14rtc: da9063: Simplify bool comparisonKaixu Xia
Fix the following coccicheck warning: ./drivers/rtc/rtc-da9063.c:246:5-18: WARNING: Comparison to bool Reported-by: Tosk Robot <tencent_os_robot@tencent.com> Signed-off-by: Kaixu Xia <kaixuxia@tencent.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/1604649637-1014-1-git-send-email-kaixuxia@tencent.com
2020-11-14rtc: sc27xx: Remove unnecessary conversion to boolKaixu Xia
Here we could use the '!=' expression to fix the following coccicheck warning: ./drivers/rtc/rtc-sc27xx.c:566:50-55: WARNING: conversion to bool not needed here Reported-by: Tosk Robot <tencent_os_robot@tencent.com> Signed-off-by: Kaixu Xia <kaixuxia@tencent.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/1604647854-876-1-git-send-email-kaixuxia@tencent.com
2020-10-28rtc: sun6i: Fix memleak in sun6i_rtc_clk_initDinghao Liu
When clk_hw_register_fixed_rate_with_accuracy() fails, clk_data should be freed. It's the same for the subsequent two error paths, but we should also unregister the already registered clocks in them. Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/20201020061226.6572-1-dinghao.liu@zju.edu.cn
2020-10-27rtc: pcf2127: fix pcf2127_nvmem_read/write() returnsDan Carpenter
These functions should return zero on success. Non-zero returns are treated as error. On some paths, this doesn't matter but in nvmem_cell_read() a non-zero return would be passed to ERR_PTR() and lead to an Oops. Fixes: d6c3029f32f7 ("rtc: pcf2127: add support for accessing internal static RAM") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/20201022070451.GA2817669@mwanda
2020-10-27rtc: pcf2127: move watchdog initialisation to a separate functionUwe Kleine-König
The obvious advantages are: - The linker can drop the watchdog functions if CONFIG_WATCHDOG is off. - All watchdog stuff grouped together with only a single function call left in generic code. - Watchdog register is only read when it is actually used. - Less #ifdefery Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/20200924105256.18162-2-u.kleine-koenig@pengutronix.de
2020-10-21Merge tag 'rtc-5.10' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux Pull RTC updates from Alexandre Belloni: "A new driver this cycle is making the bulk of the changes and the rx8010 driver has been rework to use the modern APIs. Summary: Subsystem: - new generic DT properties: aux-voltage-chargeable, trickle-voltage-millivolt New driver: - Microcrystal RV-3032 Drivers: - ds1307: use aux-voltage-chargeable - r9701, rx8010: modernization of the driver - rv3028: fix clock output, trickle resistor values, RAM configuration registers" * tag 'rtc-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: (50 commits) rtc: r9701: set range rtc: r9701: convert to devm_rtc_allocate_device rtc: r9701: stop setting RWKCNT rtc: r9701: remove useless memset rtc: r9701: stop setting a default time rtc: r9701: remove leftover comment rtc: rv3032: Add a driver for Microcrystal RV-3032 dt-bindings: rtc: rv3032: add RV-3032 bindings dt-bindings: rtc: add trickle-voltage-millivolt rtc: rv3028: ensure ram configuration registers are saved rtc: rv3028: factorize EERD bit handling rtc: rv3028: fix trickle resistor values rtc: rv3028: fix clock output support rtc: mt6397: Remove unused member dev rtc: rv8803: simplify the return expression of rv8803_nvram_write rtc: meson: simplify the return expression of meson_vrtc_probe rtc: rx8010: rename rx8010_init_client() to rx8010_init() rtc: ds1307: enable rx8130's backup battery, make it chargeable optionally rtc: ds1307: consider aux-voltage-chargeable rtc: ds1307: store previous charge default per chip ...
2020-10-19rtc: r9701: set rangeAlexandre Belloni
Set range and remove the set_time check. This is a classic BCD RTC. Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/20201015191135.471249-6-alexandre.belloni@bootlin.com
2020-10-19rtc: r9701: convert to devm_rtc_allocate_deviceAlexandre Belloni
This allows further improvement of the driver. Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/20201015191135.471249-5-alexandre.belloni@bootlin.com
2020-10-19rtc: r9701: stop setting RWKCNTAlexandre Belloni
tm_wday is never checked for validity and it is not read back in r9701_get_datetime. Avoid setting it to stop tripping static checkers: drivers/rtc/rtc-r9701.c:109 r9701_set_datetime() error: undefined (user controlled) shift '1 << dt->tm_wday' Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/20201015191135.471249-4-alexandre.belloni@bootlin.com
2020-10-19rtc: r9701: remove useless memsetAlexandre Belloni
The RTC core already sets to zero the struct rtc_tie it passes to the driver, avoid doing it a second time. Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/20201015191135.471249-3-alexandre.belloni@bootlin.com
2020-10-19rtc: r9701: stop setting a default timeAlexandre Belloni
It doesn't make sense to set the RTC to a default value at probe time. Let the core handle invalid date and time. Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/20201015191135.471249-2-alexandre.belloni@bootlin.com
2020-10-19rtc: r9701: remove leftover commentAlexandre Belloni
Commit 22652ba72453 ("rtc: stop validating rtc_time in .read_time") removed the code but not the associated comment. Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/20201015191135.471249-1-alexandre.belloni@bootlin.com
2020-10-19rtc: rv3032: Add a driver for Microcrystal RV-3032Alexandre Belloni
New driver for the Microcrystal RV-3032, including support for: - Date/time - Alarms - Low voltage detection - Trickle charge - Trimming - Clkout - RAM - EEPROM - Temperature sensor Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/20201013144110.1942218-3-alexandre.belloni@bootlin.com
2020-10-15rtc: rv3028: ensure ram configuration registers are savedAlexandre Belloni
If RV3028_CTRL1_EERD is not set (this is the default), the RTC will refresh the RAM configuration registers from the EEPROM at midnight. It is necessary to save the RAM registers back to EEPROM after modifying them. Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/20201009153101.721149-4-alexandre.belloni@bootlin.com
2020-10-15rtc: rv3028: factorize EERD bit handlingAlexandre Belloni
Both rv3028_eeprom_write and rv3028_eeprom_read enable EERD before sending commands to the EEPROM and restore it afterwards. Factorize this code. Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/20201009153101.721149-3-alexandre.belloni@bootlin.com
2020-10-15rtc: rv3028: fix trickle resistor valuesAlexandre Belloni
Version 1.0 of the application manual had the wrong resistor values. Fix them according to version 1.1 Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/20201009153101.721149-2-alexandre.belloni@bootlin.com
2020-10-15rtc: rv3028: fix clock output supportAlexandre Belloni
rv3028_clkout_set_rate unconditionally sets RV3028_CLKOUT_CLKOE but clk_set_rate may be called with the clock disabled. Ensure the clock is kept disabled if it was not yet enabled. Also, the actual rate was overwritten when enabling the clock, properly write to the register only once. Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/20201009153101.721149-1-alexandre.belloni@bootlin.com
2020-10-15rtc: mt6397: Remove unused member devFei Shao
Removing the struct member "dev" in mt6397 RTC driver because it's not initialized and the only usage is for one debugging message. Also fixed a typo in the error message. Signed-off-by: Fei Shao <fshao@chromium.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/20201008093414.1911699-1-fshao@chromium.org
2020-09-29rtc: rv8803: simplify the return expression of rv8803_nvram_writeLiu Shixin
Simplify the return expression. Signed-off-by: Liu Shixin <liushixin2@huawei.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/20200921082449.2591981-1-liushixin2@huawei.com
2020-09-29rtc: meson: simplify the return expression of meson_vrtc_probeLiu Shixin
Simplify the return expression. Signed-off-by: Liu Shixin <liushixin2@huawei.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Acked-by: Kevin Hilman <khilman@baylibre.com> Link: https://lore.kernel.org/r/20200919100856.1639319-1-liushixin2@huawei.com
2020-09-29rtc: rx8010: rename rx8010_init_client() to rx8010_init()Bartosz Golaszewski
Since the switch to using regmap this function no longer takes the I2C client struct as argument nor do we even interact with the client anywhere other than when creating the regmap. Rename it to a less misleading name: "rx8010_init()". Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/20200917114656.9036-1-brgl@bgdev.pl
2020-09-24rtc: ds1307: enable rx8130's backup battery, make it chargeable optionallyBastian Krause
The ds1307 charger infrastructure now allows to add a rx8130 charger setup that.. - does not depend on trickle-resistor-ohms - does not use DS13XX_TRICKLE_CHARGER_MAGIC trickle-charge select (TCS) bits - keeps previous no-charge behavior for device trees without aux-voltage-chargeable Make that happen. Signed-off-by: Bastian Krause <bst@pengutronix.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/20200917183246.19446-9-bst@pengutronix.de
2020-09-24rtc: ds1307: consider aux-voltage-chargeableBastian Krause
Prefer aux-voltage-chargeable over trickle-diode-disable and set diode accordingly. This is then passed to the chip's appropriate charge setup function. Signed-off-by: Bastian Krause <bst@pengutronix.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/20200917183246.19446-8-bst@pengutronix.de
2020-09-24rtc: ds1307: store previous charge default per chipBastian Krause
Some RTC's batteries and supercaps were charged by default until now. In contrast other RTCs allow charging but the driver did not configure them to do so until now. These must not be charged by default to stay backwards compatible. In order to do that, store the charge default per chip. Signed-off-by: Bastian Krause <bst@pengutronix.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/20200917183246.19446-7-bst@pengutronix.de
2020-09-24rtc: ds1307: introduce requires_trickle_resistor per chipBastian Krause
Make trickle-resistor-ohms optional for charging setups that do not require specifying ROUT bits (specifying the resistor value between Vcc and Vbackup). In order to allow specifying that, introduce requires_trickle_resistor per chip. Signed-off-by: Bastian Krause <bst@pengutronix.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/20200917183246.19446-6-bst@pengutronix.de
2020-09-24rtc: ds1307: apply DS13XX_TRICKLE_CHARGER_MAGIC only conditionallyBastian Krause
DS13XX_TRICKLE_CHARGER_MAGIC sets the trickle-charge select (TCS) bits (7..4). The datasheet of Maxim Integrated's DS1339 [1] for instance reads: "To prevent accidental enabling, only a pattern on 1010 enables the trickle charger. All other patterns disable the trickle charger." Since not all RTCs connected to a backup battery or supercap use these bits DS13XX_TRICKLE_CHARGER_MAGIC should not get applied for all charger setups unconditionally. Epson's RX8130 is such an example: Instead of TCS bits "SMPTSEL1", "SMPTSEL0", "CHGEN" and "INIEN" are expected as bit 7..4. DS1339 and DS1340 are currently the only RTCs in the ds1307 driver that apply DS13XX_TRICKLE_CHARGER_MAGIC to their setup register value. So apply DS13XX_TRICKLE_CHARGER_MAGIC in do_trickle_setup_ds1339() which is used by both RTCs. [1] https://datasheets.maximintegrated.com/en/ds/DS1339-DS1339U.pdf [2] https://support.epson.biz/td/api/doc_check.php?dl=app_RX8130CE Signed-off-by: Bastian Krause <bst@pengutronix.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/20200917183246.19446-5-bst@pengutronix.de
2020-09-15rtc: pcf2127: fix a bug when not specify interrupts propertyBiwen Li
Fix a bug when not specify interrupts property in dts as follows, rtc-pcf2127-i2c 1-0051: failed to request alarm irq rtc-pcf2127-i2c: probe of 1-0051 failed with error -22 Signed-off-by: Biwen Li <biwen.li@nxp.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/20200915073213.12779-1-biwen.li@oss.nxp.com
2020-09-15rtc: ds1685: Fix bank switching to avoid endless loopThomas Bogendoerfer
ds1685_rtc_begin_data_access() tried to access an extended register before enabling access to it by switching to bank 1. Depending on content in NVRAM this could lead to an endless loop. While at it fix also switch back to bank 0 in ds1685_rtc_end_data_access(). Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Acked-by: Joshua Kinard <kumba@gentoo.org> Link: https://lore.kernel.org/r/20200910084124.138560-1-tsbogend@alpha.franken.de
2020-09-15rtc: st-lpc: Constify st_rtc_opsRikard Falkeborn
The only usage of st_rtc_ops is to assign its address to the ops field in the rtc_device struct. which is a const pointer. Make it const to allow the compiler to put it in read-only memory. Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/20200913122644.35515-1-rikard.falkeborn@gmail.com
2020-09-15rtc: rx8010: use range checking provided by core RTC codeBartosz Golaszewski
We don't need to check the time range manually in set_time(), we can use range_min and range_max exposed by struct rtc_device. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/20200914154601.32245-15-brgl@bgdev.pl
2020-09-15rtc: rx8010: convert to using regmapBartosz Golaszewski
This driver requires SMBUS to work. We can relax this requirement if we switch to using i2c regmap and let the regmap sub-system figure out how to talk to the bus. This also has the advantage of shrinking the code for register updates. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/20200914154601.32245-14-brgl@bgdev.pl