- 28 Sep, 2018 23 commits
-
-
Alexandre Belloni authored
rtc_time_to_tm always rturns a valid tm, there is no need to validate it. Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Alexandre Belloni authored
Let the core handle offsetting and windowing the RTC range. The RTC has a 24 bit counter for minutes plus a seconds counter. Keep the epoch at the beginning of 2000. Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Alexandre Belloni authored
Use rtc_add_group to add the sysfs group in a race free manner. Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Alexandre Belloni authored
Instead of resetting the RTC to an bogus valid time, let userspace know that the time is invalid when XSTP is set. Reset XSTP when setting the time again. Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Alexandre Belloni authored
The name passed to devm_rtc_device_register is now unused. anyway, switch to devm_rtc_allocate_device to avoid forward declaring rs5c348_driver. Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Alexandre Belloni authored
Since commit 8fb1ecb3 ("rtc: rtc-rs5c348: use devm_*() functions") the kfree_exit label simply returns ret. Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Alexandre Belloni authored
Call the 64bit versions of rtc_time_to_tm and rtc_tm_to_time now that the range is enforced by the core. Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Alexandre Belloni authored
The RTC is a 32bit seconds counter. Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Tested-by: Gregory CLEMENT <gregory.clement@bootlin.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Alexandre Belloni authored
The IRQ is requested before the struct rtc is allocated and registered, but this struct is used in the IRQ handler. This may lead to a NULL pointer dereference. Switch to devm_rtc_allocate_device/rtc_register_device to allocate the rtc before requesting the IRQ. Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Alexandre Belloni authored
rtc_time64_to_tm has not been called rtc_time_to_tm64 Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Alexandre Belloni authored
Register frequency test using rtc_add_group to avoid a possible race condition and simplify the code. This also moves the attribute to its proper location under the rtc device instead of the i2c parent device. Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Alexandre Belloni authored
Use rtc_add_group to add the sysfs group in a race free manner. Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Alexandre Belloni authored
Instead of adding a binary sysfs attribute from the driver, use the core to register an nvmem device. Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Alexandre Belloni authored
/proc is not the correct ABI to display debugging info. Remove RTC_DS1685_PROC_REGS as the driver hasn't seen any real development since it was included. Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Alexandre Belloni authored
Replace the license boilerplate by an SPDX identifier Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Alexandre Belloni authored
The license text is specifying GPL v2 only but the MODULE_LICENSE is set to GPL which means GNU Public License v2 or later. When MODULE_LICENSE and boiler plate does not match, go for boiler plate license. Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Alexandre Belloni authored
The default word_size and stride of 1 are correct for the tx4939. Also fix the nvmem folder name. Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Alexandre Belloni authored
The core header file is reserved for the core, stop including it. Also reorder includes alphabetically. Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Alexandre Belloni authored
Move rtc_add_group and rtc_add_groups definition to rtc.h that is available for all RTC drivers. Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Alexandre Belloni authored
A few entries are not placed correctly, reorder them. Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Giulio Benetti authored
On m41txx you can enable open-drain OUT pin to check if offset is ok. Enabling OUT pin with frequency_test_enable attribute, OUT pin will tick 512 times faster than 1s tick base. Enable or Disable FT bit on CONTROL register if freq_test is 1 or 0. Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Giulio Benetti authored
m41txx chips can hold a calibration value to get correct clock bias. Add offset handling (ranging between -63ppm and 126ppm) via sysfs. Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Alexandre Belloni authored
Use rtc_add_group to add the common sysfs group to avoid a possible race condition. [Denis.Osterland@diehl.com: use to_i2c_client(dev->parent)] Signed-off-by: Denis Osterland <Denis.Osterland@diehl.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> The move of atrim, dtrim usr sysfs properties from i2c device to rtc device require to access them via dev->parent. This patch also aligns timestamp0.
-
- 13 Sep, 2018 2 commits
-
-
Alexandre Belloni authored
Stale mentions of irq_task are left in the kerneldoc after its removal. Remove them. There is still one indirect mention left but commit 3c8bb90e ("rtc: Fix hrtimer deadlock") can probably be reverted now. Reported-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Alexandre Belloni authored
Ensure the non managed version of the un/registration functions is not used anymore. No driver is using it anymore and they should not be necessary. Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
- 12 Sep, 2018 3 commits
-
-
git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfdAlexandre Belloni authored
Immutable branch between MFD and RTC due for the v4.20 merge window Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Jeremy Gebben authored
The abx804 and abx805 chips have support for a simple watchdog function that can trigger an external reset. Signed-off-by: Jeremy Gebben <jgebben@sweptlaser.com> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Jeremy Gebben authored
This will allow additional data to be tracked, for future improvements. Signed-off-by: Jeremy Gebben <jgebben@sweptlaser.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
- 11 Sep, 2018 4 commits
-
-
Alexandre Belloni authored
The IRQ work is added before the struct rtc is allocated and registered, but this struct is used in the IRQ handler. This may lead to a NULL pointer dereference. Switch to devm_rtc_allocate_device/rtc_register_device to allocate the rtc before calling menelaus_add_irq_work. Also, this solves a possible leak as the RTC is never released. Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
-
Alexandre Belloni authored
Switch to devm_rtc_allocate_device to simplify the erro and driver removal paths. Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Alexandre Belloni authored
The IRQ is requested before the struct rtc is allocated and registered, but this struct is used in the IRQ handler. This may lead to a NULL pointer dereference. Switch to devm_rtc_allocate_device/rtc_register_device to allocate the rtc before requesting the IRQ. Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Alexandre Belloni authored
The IRQ is requested before the struct rtc is allocated and registered, but this struct is used in the IRQ handler. This may lead to a NULL pointer dereference. Switch to devm_rtc_allocate_device/rtc_register_device to allocate the rtc before requesting the IRQ. Acked-by: Eddie Huang <eddie.huang@mediatek.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
- 08 Sep, 2018 1 commit
-
-
Arnd Bergmann authored
The old rtc driver is getting in the way of some compat_ioctl simplification. Looking up the loongson64 git history, it seems that everyone uses the more modern but compatible RTC_CMOS driver anyway, so let's remove the special case for loongson64. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
- 31 Aug, 2018 1 commit
-
-
YueHaibing authored
Fixes gcc '-Wunused-but-set-variable' warning: drivers/rtc/rtc-mrst.c: In function 'mrst_procfs': drivers/rtc/rtc-mrst.c:264:29: warning: variable 'valid' set but not used [-Wunused-but-set-variable] unsigned char rtc_control, valid; Signed-off-by: YueHaibing <yuehaibing@huawei.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
- 27 Aug, 2018 6 commits
-
-
Alexandre Belloni authored
The Epson rx8803 is mostly similar to the Microcrystal RV8803 but the size of the offset register is 4 bits vs 6 bits but it has a configurable temperature compensation. Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Alexandre Belloni authored
The ID for RV8803 must be rv_8803 Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Dan Carpenter authored
devm_kcalloc() returns NULL, it never returns error pointers. In the current code we would return PTR_ERR(NULL) which is success, instead of returning the -ENOMEM error code. Fixes: a0a1a1ba ("rtc: sysfs: facilitate attribute add to rtc device") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Gustavo A. R. Silva authored
One of the more common cases of allocation size calculations is finding the size of a structure that has a zero-sized array at the end, along with memory for some number of elements for that array. For example: struct foo { int stuff; void *entry[]; }; instance = kzalloc(sizeof(struct foo) + sizeof(void *) * count, GFP_KERNEL); Instead of leaving these open-coded and prone to type mistakes, we can now use the new struct_size() helper: instance = kzalloc(struct_size(instance, entry, count), GFP_KERNEL); Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Reviewed-by: Kees Cook <keescook@chromium.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Paul Cercueil authored
Depending on MACH_INGENIC prevent us from creating a generic kernel that works on more than one MIPS board. Instead, we just depend on MIPS being set. Signed-off-by: Paul Cercueil <paul@crapouillou.net> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Keerthy authored
Cut down the shutdown time from 2 seconds to 1 sec. In case of roll over try again. Signed-off-by: Keerthy <j-keerthy@ti.com> Reviewed-by: Johan Hovold <johan@kernel.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-