- 23 Dec, 2019 7 commits
-
-
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 30 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>
-
Alexandre Belloni authored
PCF85063_REG_SC_OS means the voltage dropped too low and data has been lost. Link: https://lore.kernel.org/r/20191214220259.621996-12-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-11-alexandre.belloni@bootlin.comSigned-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Alexandre Belloni authored
PCF8563_SC_LV means the voltage dropped too low and data has been lost. Link: https://lore.kernel.org/r/20191214220259.621996-10-alexandre.belloni@bootlin.comSigned-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Alexandre Belloni authored
voltage_low is only updated when reading the time, this means that using RTC_VL_READ will miss the VL flag if the time has not been read before using the ioctl. Always read the status from the hardware. Link: https://lore.kernel.org/r/20191214220259.621996-9-alexandre.belloni@bootlin.comSigned-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Alexandre Belloni authored
Always compile pcf8563_rtc_ioctl as we are sure that CONFIG_RTC_INTF_DEV is selected on actual kernel configurations. Link: https://lore.kernel.org/r/20191214220259.621996-8-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-7-alexandre.belloni@bootlin.comSigned-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Alexandre Belloni authored
REG_CONTROL3_BLF indicates the battery is low and needs to be replaced soon. Link: https://lore.kernel.org/r/20191214220259.621996-6-alexandre.belloni@bootlin.comSigned-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Alexandre Belloni authored
PCF2127_BIT_CTRL3_BLF indicates the battery is low and needs to be replaced soon. Link: https://lore.kernel.org/r/20191214220259.621996-5-alexandre.belloni@bootlin.comSigned-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Alexandre Belloni authored
ABX8XX_STATUS_BLF indicates the battery is low and needs to be replaced soon. Link: https://lore.kernel.org/r/20191214220259.621996-4-alexandre.belloni@bootlin.comSigned-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Alexandre Belloni authored
RTC_VL_READ and RTC_VL_CLR have been introduced in 2012 with commit 0f20b767 ("drivers/rtc/rtc-pcf8563.c: add RTC_VL_READ/RTC_VL_CLR ioctl feature") Document them now that they have been unified. Link: https://lore.kernel.org/r/20191214220259.621996-3-alexandre.belloni@bootlin.comSigned-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Alexandre Belloni authored
Currently, the meaning of the value returned by RTC_VL_READ is undocumented and left to the driver implementation. In order to get more meaningful values, define a set of values to use as to make clear to userspace what is the status of the various voltages feeding the RTC. Link: https://lore.kernel.org/r/20191214220259.621996-2-alexandre.belloni@bootlin.comSigned-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
- 10 Dec, 2019 3 commits
-
-
Linus Walleij authored
The current use of mode flags to us SPI_MODE_3 and SPI_CS_HIGH is fragile: it overwrites anything already assigned by the SPI core. Change it thusly: - Just |= the SPI_MODE_3 so we keep other flags - Assign ^= SPI_CS_HIGH since we might be active high already, and that is usually the case with GPIOs used for chip select, even if they are in practice active low. Add a comment clarifying why ^= SPI_CS_HIGH is the right choice here. Reported-by: Mark Brown <broonie@kernel.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20191204225731.20306-1-linus.walleij@linaro.orgSigned-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Jean-Francois Dagenais authored
This allows a subsequent commit to spin_unlock sooner. Signed-off-by: Jean-Francois Dagenais <jeff.dagenais@gmail.com> Reviewed-by: Michal Simek <michal.simek@xilinx.com> Link: https://lore.kernel.org/r/20191128015613.10003-1-jeff.dagenais@gmail.comSigned-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Alexandre Belloni authored
Free Electrons is now Bootlin. Link: https://lore.kernel.org/r/20191210134653.2995661-1-alexandre.belloni@bootlin.comSigned-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-