- 14 Mar, 2016 40 commits
-
-
Michael Büsch authored
This adds all (according to the data sheet) missing register and bit definitions. It also fixes the definition of the trickle charger bit masks. Signed-off-by: Michael Buesch <m@bues.ch> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
-
Michael Büsch authored
The C2 suffix does not appear in the latest datasheet, so add a device ID without it. Signed-off-by: Michael Buesch <m@bues.ch> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
-
Michael Büsch authored
The C2 suffix does not appear anymore in the latest device and data sheet versions. Signed-off-by: Michael Buesch <m@bues.ch> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
-
Alexandre Belloni authored
There are several arch-specific RTC drivers that can be successfully compiled on other platforms. Add a COMPILE_TEST dependency for those. Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
-
Arnd Bergmann authored
There are four architectures using this driver, but since we can build it with COMPILE_TEST, we should try dealing with the absence of the asm/rtc.h header file, to avoid getting a build error: drivers/rtc/rtc-generic.c:12:21: fatal error: asm/rtc.h: No such file or directory This creates an alternative use of the driver, allowing architectures to pass a set of rtc_class_ops in platform data. We can convert the four architectures to use this and then remove the original code. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
-
Alexandre Belloni authored
The time and date register of the pcf8223 are undefined after a power reset. Properly handle the OS bit and return -EINVAL when that bit is set. It is properly removed when setting the time. This solves an issue where the time and date may be valid for rtc_valid_tm() but is not the current time. Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
-
Alexandre Belloni authored
No members of struct pcf85063 are used anymore, remove the whole structure. Reviewed-by: Juergen Borleis <jbe@pengutronix.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
-
Alexandre Belloni authored
Since the driver is mainlined there is no use for a separate version number. Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
-
Alexandre Belloni authored
Always show there is an I2C section, like the other sections. Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
-
Dan Carpenter authored
We call spin_lock_irqrestore with "flags" set to zero instead of to the value from spin_lock_irqsave(). Fixes: aaaf5fbf ('rtc: add driver for DS1685 family of real time clocks') Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
-
Laxman Dewangan authored
Use macro REGMAP_IRQ_REG from regmap.h to initialise the regmap irq table for max77686 to have better coding style and improve readability. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
-
Laxman Dewangan authored
Maxim Semiconductor's PMIC MAX77686 has RTC IP which is reused in the MAX77620/MAX20024 PMICs. Add support for these devices in MAX77686 RTC driver. This device does not have RTC alarm pending status outside of RTC IP. The RTC IP is having separate I2C address for its register access. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
-
Javier Martinez Canillas authored
The driver uses the MODULE_ALIAS() macro to export a platform module alias to allow the module to be autoloaded if the device is registered using the legacy platform registration mechanism but the driver is always used by OF only machines so the alias is not needed and should just be removed. Suggested-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
-
Alexandre Belloni authored
pcf85063_get_datetime() tries to handle a century bit but that bit is not documented and the final value is never used anywhere else in the kernel. Reviewed-by: Juergen Borleis <jbe@pengutronix.de> Tested-by: Ulrich Ölmann <u.oelmann@pengutronix.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
-
Geert Uytterhoeven authored
drivers/rtc/rtc-vr41xx.c:229: warning: ‘vr41xx_rtc_alarm_irq_enable’ defined but not used Apparently the conversion to alarm_irq_enable forgot to wire up the callback. Fixes: 16380c15 ("RTC: Convert rtc drivers to use the alarm_irq_enable method") Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
-
Alexandre Belloni authored
The Kconfig option for rv3029 is not mentioning any part number, explicitly show rv3029. Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
-
Grygorii Strashko authored
as3722 RTC IRQ is nested threaded and wired to the as3722 inerrupt controller. So, this flag is not required for nested irqs anymore, since commit 3c646f2c ("genirq: Don't suspend nested_thread irqs over system suspend") was merged. Cc: Alessandro Zummo <a.zummo@towertech.it> Cc: Alexandre Belloni <alexandre.belloni@free-electrons.com> Cc: Lee Jones <lee.jones@linaro.org> Cc: Nishanth Menon <nm@ti.com> Cc: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
-
Grygorii Strashko authored
tps80031 RTC IRQ is nested threaded and wired to the tps80031 inerrupt controller. So, this flag is not required for nested irqs anymore, since commit 3c646f2c ("genirq: Don't suspend nested_thread irqs over system suspend") was merged. Cc: Alessandro Zummo <a.zummo@towertech.it> Cc: Alexandre Belloni <alexandre.belloni@free-electrons.com> Cc: Lee Jones <lee.jones@linaro.org> Cc: Nishanth Menon <nm@ti.com> Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
-
Grygorii Strashko authored
tps65910 RTC IRQ is nested threaded and wired to the tps65910 inerrupt controller. So, this flag is not required for nested irqs anymore, since commit 3c646f2c ("genirq: Don't suspend nested_thread irqs over system suspend") was merged. Cc: Alessandro Zummo <a.zummo@towertech.it> Cc: Alexandre Belloni <alexandre.belloni@free-electrons.com> Cc: Lee Jones <lee.jones@linaro.org> Cc: Tony Lindgren <tony@atomide.com> Cc: Nishanth Menon <nm@ti.com> Cc: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
-
Grygorii Strashko authored
tps6586x RTC IRQ is nested threaded and wired to the tps6586x inerrupt controller. So, this flag is not required for nested irqs anymore, since commit 3c646f2c ("genirq: Don't suspend nested_thread irqs over system suspend") was merged. Cc: Alessandro Zummo <a.zummo@towertech.it> Cc: Alexandre Belloni <alexandre.belloni@free-electrons.com> Cc: Lee Jones <lee.jones@linaro.org> Cc: Nishanth Menon <nm@ti.com> Cc: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
-
Grygorii Strashko authored
Palams RTC IRQ is nested threaded and wired to the Palmas inerrupt controller. So, this flag is not required for nested irqs anymore, since commit 3c646f2c ("genirq: Don't suspend nested_thread irqs over system suspend") was merged. Cc: Alessandro Zummo <a.zummo@towertech.it> Cc: Alexandre Belloni <alexandre.belloni@free-electrons.com> Cc: Tony Lindgren <tony@atomide.com> Cc: Lee Jones <lee.jones@linaro.org> Cc: Nishanth Menon <nm@ti.com> Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
-
Soren Brinkmann authored
The RTC entries are mostly grouped by vendor. Move the few outliers in place. Also, change the one occurrence of 'nxp' to 'NXP' to make all NXP entries consistent. Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
-
Joshua Henderson authored
This driver adds support for the PIC32 real time clock and calendar peripheral: - reading and setting time - alarms provided by dedicated IRQ Signed-off-by: Joshua Henderson <joshua.henderson@microchip.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
-
Joshua Henderson authored
Document the devicetree bindings for the real time clock found on Microchip PIC32 class devices. Signed-off-by: Joshua Henderson <joshua.henderson@microchip.com> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
-
Akinobu Mita authored
The alarm for rx8025 only has a minute accuracy, so unsupport UIE mode. pcf8563 and hym8563 also have a minute accuracy and unsupport it. Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Cc: Wolfgang Grandegger <wg@grandegger.com> Cc: Alessandro Zummo <a.zummo@towertech.it> Cc: Alexandre Belloni <alexandre.belloni@free-electrons.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
-
Akinobu Mita authored
The alarm for rx8025 only has a minute accuracy, so round up to nearest minute when setting alarm. Without doing this, rtctest blocks one day after setting alarm to 5 seconds later. pcf8563 and hym8563 also have similar handling. Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Cc: Wolfgang Grandegger <wg@grandegger.com> Cc: Alessandro Zummo <a.zummo@towertech.it> Cc: Alexandre Belloni <alexandre.belloni@free-electrons.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
-
Akinobu Mita authored
The ctrl1 register is accessed by alarm operations. But it is updated in threaded interrupt handler without acquiring rtc->ops_lock. Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Cc: Wolfgang Grandegger <wg@grandegger.com> Cc: Alessandro Zummo <a.zummo@towertech.it> Cc: Alexandre Belloni <alexandre.belloni@free-electrons.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
-
Akinobu Mita authored
When IRQ line for this chips is connected, devm_request_threaded_irq() refuses to register irq handler with the following message. genirq: Threaded irq requested with handler=NULL and !ONESHOT for irq Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Cc: Wolfgang Grandegger <wg@grandegger.com> Cc: Alessandro Zummo <a.zummo@towertech.it> Cc: Alexandre Belloni <alexandre.belloni@free-electrons.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
-
Krzysztof Kozlowski authored
Few functions were marked inline even though they were relatively large and sometimes used in multiple places. De-inline them to let the compiler decide whether optimization makes sense. This fixes inline_hunt report: drivers/rtc/rtc-s5m.c: Deinline s5m8767_rtc_set_alarm_reg, save 704 bytes drivers/rtc/rtc-s5m.c: Deinline s5m8767_wait_for_udr_update, save 192 bytes Reported-by: Denys Vlasenko <vda.linux@googlemail.com> Cc: Denys Vlasenko <vda.linux@googlemail.com> Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
-
Paul Gortmaker authored
The Makefile/Kconfig currently controlling compilation of this code is: obj-$(CONFIG_RTC_CLASS) += rtc-core.o rtc-core-y := class.o interface.o drivers/rtc/Kconfig:menuconfig RTC_CLASS drivers/rtc/Kconfig: bool "Real Time Clock" ...meaning that it currently is not being built as a module by anyone. Lets remove the modular code that is essentially orphaned, so that when reading the code there is no doubt it is builtin-only. We don't replace module.h with init.h since the file does need to know what a struct module is. We also delete the MODULE_LICENSE tag etc. since all that information is already contained at the top of the file in the comments. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
-
Juergen Borleis authored
When setting a new time/date the RTC's clock must be stopped first, in order to write the time/date registers in an atomic manner. So, this change stops the clock first and then writes the time/date registers and the clock control register (to re-enable the clock) in one turn. Signed-off-by: Juergen Borleis <jbe@pengutronix.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
-
Juergen Borleis authored
Check if the RTC signals an invalid time/date (due to a battery power loss for example). In this case ignore the time/date until it is really set again. Signed-off-by: Juergen Borleis <jbe@pengutronix.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
-
Juergen Borleis authored
By using i2c_smbus_read_i2c_block_data() the code is now much simpler. While at it: when reading the RTC's seconds register, all time/date registers are frozen until the RTC's year register is read. So it is important to read all time/date registers in one turn to not lose a second event. Make it more clear why the read must happen in this way. Signed-off-by: Juergen Borleis <jbe@pengutronix.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
-
Joshua Clayton authored
pcf2123 has an offset register, which can be used to make minor adjustments to the clock rate to compensate for temperature or a crystal that is not exactly right. Signed-off-by: Joshua Clayton <stillcompiling@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
-
Joshua Clayton authored
clock offset may be set and read in decimal parts per billion attribute is /sys/class/rtc/rtcN/offset The attribute is only visible for rtcs that have set_offset implemented. Signed-off-by: Joshua Clayton <stillcompiling@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
-
Joshua Clayton authored
A number of rtc devices, such as the NXP pcf2123 include a facility to adjust the clock in order to compensate for temperature or a crystal, capacitor, etc, that results in the rtc clock not running at exactly 32.768 kHz. Data sheets I have seen refer to this as a clock offset, and measure it in parts per million, however they often reference ppm to 2 digits of precision, which makes integer ppm less than ideal. We use parts per billion, which more than covers the precision needed and works nicely within 32 bits Signed-off-by: Joshua Clayton <stillcompiling@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
-
Oleksij Rempel authored
Fix a scheduling while atomic issue caused by rv8803_set_time() holding a spinlock during the call to i2c_smbus_read_byte_data(). Signed-off-by: Oleksij Rempel <fixed-term.Oleksij.Rempel@de.bosch.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
-
Oleksij Rempel authored
Document Alphascale asm9260 RTC bindings Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
-
Oleksij Rempel authored
Add support for RTC controller found on Alphascale asm9260 SoC. Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
-
Akinobu Mita authored
DS3231 has programmable square-wave output signal. This enables to use this feature as a clock provider of common clock framework. Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Reviewed-by: Michael Turquette <mturquette@baylibre.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
-