- 25 Jan, 2020 1 commit
-
-
Dmitry Osipenko authored
The IRQ_NOAUTOEN flag tells interrupt core that interrupt shall not be auto-enabled at the time of requesting interrupt. This is a minor clean-up change that doesn't fix any problems. Signed-off-by: Dmitry Osipenko <digetx@gmail.com> Link: https://lore.kernel.org/r/20200106015615.12602-1-digetx@gmail.comSigned-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
- 15 Jan, 2020 7 commits
-
-
Alexandre Belloni authored
Use FIELD_PREP and FIELD_GET instead of hardcoding already defined values. Link: https://lore.kernel.org/r/20191229204421.337612-6-alexandre.belloni@bootlin.comSigned-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Alexandre Belloni authored
The current rtc time is read out in at91_rtc_setalarm but it it immediately overwritten by the alarm time. Remove the readout. Link: https://lore.kernel.org/r/20191229204421.337612-5-alexandre.belloni@bootlin.comSigned-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Alexandre Belloni authored
The header was simply moved from the arm mach folder to drivers/rtc but there is not point in having it separated from the driver. Also remove unused bit definitions and use BIT and GENMASK. Link: https://lore.kernel.org/r/20191229204421.337612-4-alexandre.belloni@bootlin.comSigned-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Alexandre Belloni authored
Both the sama5d4 and sama5d2 RTCs have more features than the previous RTCs, add a compatible string for them. Link: https://lore.kernel.org/r/20191229204421.337612-3-alexandre.belloni@bootlin.comSigned-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Alexandre Belloni authored
Convert Real Time Clock for Atmel/Microchip SoCs bindings documentation to json-schema. Cc: Rob Herring <robh+dt@kernel.org> Link: https://lore.kernel.org/r/20191229204421.337612-2-alexandre.belloni@bootlin.comSigned-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Alexandre Belloni authored
The RTC procfs interface is deprecated and hasn't been used by userspace for years. Link: https://lore.kernel.org/r/20191229204421.337612-1-alexandre.belloni@bootlin.comSigned-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Claudiu Beznea authored
Add microchip,sam9x60-rtc to DT bindings documentation. Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com> Acked-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/1579085987-13976-2-git-send-email-claudiu.beznea@microchip.comSigned-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
- 23 Dec, 2019 13 commits
-
-
Nobuhiro Iwamatsu authored
Replace (1 << ...) with BIT(). CC: Alessandro Zummo <a.zummo@towertech.it> CC: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org> Link: https://lore.kernel.org/r/20191218082553.3309554-1-iwamatsu@nigauri.orgSigned-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Nobuhiro Iwamatsu authored
Use SPDX-License-Identifier instead of a verbose license text. CC: Alessandro Zummo <a.zummo@towertech.it> CC: Alexandre Belloni <alexandre.belloni@bootlin.com> CC: Jonas Jensen <jonas.jensen@gmail.com> Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org> Link: https://lore.kernel.org/r/20191218082836.3309808-1-iwamatsu@nigauri.orgSigned-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Nobuhiro Iwamatsu authored
struct spi_device in struct ds1343_priv is not used, remove it. CC: Alessandro Zummo <a.zummo@towertech.it> CC: Alexandre Belloni <alexandre.belloni@bootlin.com> CC: Raghavendra Chandra Ganiga <ravi23ganiga@gmail.com> CC: Ankur Srivastava <sankurece@gmail.com> Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org> Link: https://lore.kernel.org/r/20191218081917.3308211-1-iwamatsu@nigauri.orgSigned-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Nobuhiro Iwamatsu authored
struct i2c_client can be referenced from the device structure, so this doesn't need to have it in struct rx8025_data. Remove struct i2c_client from struct rx8025_data. CC: Alessandro Zummo <a.zummo@towertech.it> CC: Alexandre Belloni <alexandre.belloni@bootlin.com> CC: Wolfgang Grandegger <wg@grandegger.com> Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org> Link: https://lore.kernel.org/r/20191218081624.3307752-1-iwamatsu@nigauri.orgSigned-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Paul Kocialkowski authored
The RTC has a valid bit in the seconds register that indicates whether power was lost since the pevious time set. This bit is currently read once at probe time, cached and updated with set_time. Howeever, caching the bit may prevent detecting power loss at runtime (which can happen if the RTC's supply is distinct from the the platform's). Writing the seconds register when setting time will clear the bit, so there should be no downside in reading the bit directly instead of caching it. Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com> Link: https://lore.kernel.org/r/20191212153111.966923-2-paul.kocialkowski@bootlin.comSigned-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Paul Kocialkowski authored
The current code returns -EPERM when the voltage loss bit is set. Since the bit indicates that the time value is not valid, return -EINVAL instead, which is the appropriate error code for this situation. Fixes: dcaf0384 ("rtc: add hym8563 rtc-driver") Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com> Link: https://lore.kernel.org/r/20191212153111.966923-1-paul.kocialkowski@bootlin.comSigned-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Nobuhiro Iwamatsu authored
In the current code, the return value of devm_request_threaded_irq may be returned. This fixes it. CC: Alessandro Zummo <a.zummo@towertech.it> CC: Alexandre Belloni <alexandre.belloni@bootlin.com> CC: Akshay Bhat <akshay.bhat@timesys.com> Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org> Link: https://lore.kernel.org/r/20191217121231.2698817-2-iwamatsu@nigauri.orgSigned-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
zhengbin authored
Fixes coccicheck warning: drivers/rtc/rtc-omap.c:619:2-3: Unneeded semicolon Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: zhengbin <zhengbin13@huawei.com> Link: https://lore.kernel.org/r/1576466353-45384-1-git-send-email-zhengbin13@huawei.comSigned-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Chuhong Yuan authored
The driver misses a check for devm_clk_get(). Add the check to fix it. Signed-off-by: Chuhong Yuan <hslester96@gmail.com> Link: https://lore.kernel.org/r/20191214074528.16806-1-hslester96@gmail.comSigned-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Alexandre Belloni authored
Remove redundant messages or messages that would not add any value because the information is already conveyed properly using errno. Link: https://lore.kernel.org/r/20191223100108.1083078-1-alexandre.belloni@bootlin.comSigned-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Alexandre Belloni authored
rv30{2,4}9_register_driver and rv30{2,4}9_unregister_driver are only called from the init and exit functions of the module. Annotate them properly. Link: https://lore.kernel.org/r/20191223101430.1091572-1-alexandre.belloni@bootlin.comSigned-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Alexandre Belloni authored
The compatibles have been marked obsolete for more that 2 years, drop them now. Note that this doesn't currently prevent the driver from probing because the i2c core will still match using the i2c_device_id table. Link: https://lore.kernel.org/r/20191212230239.65784-1-alexandre.belloni@bootlin.comSigned-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Alexandre Belloni authored
Export the 8 byte RAM using nvmem. Link: https://lore.kernel.org/r/20191214221022.622482-17-alexandre.belloni@bootlin.comSigned-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
- 18 Dec, 2019 19 commits
-
-
Alexandre Belloni authored
Despite the comment, the RV3029 uses a 7bit BCD register for the year, making 2079 the last supported year. Link: https://lore.kernel.org/r/20191214221022.622482-14-alexandre.belloni@bootlin.comSigned-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Alexandre Belloni authored
This allows further improvement of the driver. Link: https://lore.kernel.org/r/20191214221022.622482-13-alexandre.belloni@bootlin.comSigned-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Alexandre Belloni authored
In case the data is invalid (PON or VLOW2 are set in STATUS, explicitly tell userspace that the time is invalid. Only remove VLOW2 when setting a new valid time. Link: https://lore.kernel.org/r/20191214221022.622482-12-alexandre.belloni@bootlin.comSigned-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Alexandre Belloni authored
The RV3029 can report three different conditions: power on, voltage dropped and data is lost and voltage is low and temperature compensation has stopped. The first two conditions amount to the same status, the RTC data is invalid. VLOW1 has to be cleared manually to resume temperature compensation, this is achieved using RTC_VL_CLEAR. Link: https://lore.kernel.org/r/20191214221022.622482-11-alexandre.belloni@bootlin.comSigned-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Alexandre Belloni authored
rv3029_read_regs and rv3029_write_regs are simply calling regmap_bulk_{read,write}. Drop them and call regmap_{,bulk}_{read,write} as appropriate. Link: https://lore.kernel.org/r/20191214221022.622482-10-alexandre.belloni@bootlin.comSigned-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Alexandre Belloni authored
It is unecessay to test alarm->enabled before calling rv3029_alarm_irq_enable. Link: https://lore.kernel.org/r/20191214221022.622482-9-alexandre.belloni@bootlin.comSigned-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Alexandre Belloni authored
Use regmap_update_bits instead of open coding it in rv3029_alarm_irq_enable. Link: https://lore.kernel.org/r/20191214221022.622482-8-alexandre.belloni@bootlin.comSigned-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Alexandre Belloni authored
There is no point in having 2 indirections before calling regmap_read, especially since rv3029_get_sr also changes the return value without any good reason. Call regmap_read directly. Link: https://lore.kernel.org/r/20191214221022.622482-7-alexandre.belloni@bootlin.comSigned-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Alexandre Belloni authored
RV3029_STATUS is read in multiple location but its value is never used afterwards. Avoid this register access when not necessary. Link: https://lore.kernel.org/r/20191214221022.622482-6-alexandre.belloni@bootlin.comSigned-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Alexandre Belloni authored
There is no lock preventing concurrent access to the status register from bth the rtc subsystem and the hwmon subsystem. Use regmap_update_bits to ensure updating RV3029_STATUS is properly locked. Link: https://lore.kernel.org/r/20191214221022.622482-5-alexandre.belloni@bootlin.comSigned-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Alexandre Belloni authored
rv3029_update_bits open codes regmap_update_bits and forgets to properly lock the register range while doing so. Use regmap_update_bits instead. Link: https://lore.kernel.org/r/20191214221022.622482-4-alexandre.belloni@bootlin.comSigned-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Alexandre Belloni authored
Instead of trying to validate the accessed registers in custom functions, let regmap handle that. This allows to defines all the holes in the register range and gives access to the regmap debugfs register dump. Link: https://lore.kernel.org/r/20191214221022.622482-3-alexandre.belloni@bootlin.comSigned-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Alexandre Belloni authored
The correct name for the rtc is rv3029. c2 is actually the package form factor rv3029c3 exists and simply has a smaller form factor. Link: https://lore.kernel.org/r/20191214221022.622482-2-alexandre.belloni@bootlin.comSigned-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Alexandre Belloni authored
RX8010_FLAG_VLF means the voltage dropped too low and data has been lost. Link: https://lore.kernel.org/r/20191214220259.621996-18-alexandre.belloni@bootlin.comSigned-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Alexandre Belloni authored
Remove RTC_VL_CLR handling because it is a disservice to userspace as it removes the important information that the RTC data is invalid. This may lead userspace to set an invalid system time later on. Link: https://lore.kernel.org/r/20191214220259.621996-17-alexandre.belloni@bootlin.comSigned-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Alexandre Belloni authored
RV8803_FLAG_V1F means the voltage is too low to keep the temperature compensation running and the accuracy of the RTC is affected. RV8803_FLAG_V2F means the voltage dropped so low that data is now invalid. Link: https://lore.kernel.org/r/20191214220259.621996-16-alexandre.belloni@bootlin.comSigned-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Alexandre Belloni authored
Stop clearing RV8803_FLAG_V2F in RTC_VL_CLR because it is a disservice to userspace as it removes the important information that the RTC data is invalid. This may lead userspace to set an invalid system time later on. Link: https://lore.kernel.org/r/20191214220259.621996-15-alexandre.belloni@bootlin.comSigned-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Alexandre Belloni authored
RV3028_STATUS_PORF means the voltage dropped too low and data has been lost. Link: https://lore.kernel.org/r/20191214220259.621996-14-alexandre.belloni@bootlin.comSigned-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Alexandre Belloni authored
Remove RTC_VL_CLR handling because it is a disservice to userspace as it removes the important information that the RTC data is invalid. This may lead userspace to set an invalid system time later on. Link: https://lore.kernel.org/r/20191214220259.621996-13-alexandre.belloni@bootlin.comSigned-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-