21 Aug, 2019
1 commit
-
The RTC core now has error messages in case of registration failure, there
is no need to have other messages in the drivers.Signed-off-by: Alexandre Belloni
Link: https://lore.kernel.org/r/20190818220041.17833-2-alexandre.belloni@bootlin.com
Signed-off-by: Alexandre Belloni
18 May, 2018
2 commits
-
Let the core handle offsetting and windowing the RTC range.
The RTC has a 40-bit counter counting at 1024 Hz. So its maximum value is
2^(40-10) - 1. Also, let the core handle the offset instead of coding it in
the callbacks. Keep the default epoch at the beginning of 2009 (this will
fail in 2043).Signed-off-by: Alexandre Belloni
-
The probe function is not allowed to fail after the RTC is registered
because the following may happen:CPU0: CPU1:
sys_load_module()
do_init_module()
do_one_initcall()
cmos_do_probe()
rtc_device_register()
__register_chrdev()
cdev->owner = struct module*
open("/dev/rtc0")
rtc_device_unregister()
module_put()
free_module()
module_free(mod->module_core)
/* struct module *module is now
freed */
chrdev_open()
spin_lock(cdev_lock)
cdev_get()
try_module_get()
module_is_live()
/* dereferences already
freed struct module* */Signed-off-by: Alexandre Belloni
04 May, 2018
1 commit
-
The tps6586x use a 64-bit 'epoch_start' value, but then computes that
value using an 'mktime()', which has a smaller range and overflows
in 2106 at the latest. As both the hardware and the subsystem interface
support wider than 32-bit ranges for rtc times here, let's change all
the operations on 'seconds' to time64_t.Signed-off-by: Arnd Bergmann
Signed-off-by: Alexandre Belloni
01 Mar, 2018
1 commit
-
rtc_time_to_tm never generates an invalid tm. It is not necessary to
validate it.Signed-off-by: Alexandre Belloni
21 May, 2016
1 commit
-
This module is loaded by the related mfd driver which has
the needed MODULE_DEVICE_TABLE(i2c,...).This patch fix the modalias when the rtc driver is built
as a module, so the right name is used.
Everything operates correctly when this module is builtin.Fixes: esdc59ed3865 ("rtc: add RTC driver for TPS6586x")
Signed-off-by: Nicolas Chauvet
Signed-off-by: Alexandre Belloni
15 Mar, 2016
1 commit
-
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 3c646f2c6aa9 ("genirq: Don't suspend nested_thread irqs
over system suspend") was merged.Cc: Alessandro Zummo
Cc: Alexandre Belloni
Cc: Lee Jones
Cc: Nishanth Menon
Cc: Laxman Dewangan
Signed-off-by: Grygorii Strashko
Signed-off-by: Alexandre Belloni
20 Oct, 2014
1 commit
-
A platform_driver does not need to set an owner, it will be populated by the
driver core.Signed-off-by: Wolfram Sang
13 Jun, 2013
1 commit
-
Use device_init_wakeup() instead of device_set_wakeup_capable() and move
it before rtc dev registering. This fixes alarmtimer not registered
when tps6586x rtc is the only wakeup compatible rtc in the system.Signed-off-by: Dmitry Osipenko
Cc: Laxman Dewangan
Cc: Jingoo Han
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
30 Apr, 2013
3 commits
-
Device managed functions do not need explicit freeing/unregistering.
Moreover in this case it was done using non-device managed function
which is incorrect. Hence remove it.Signed-off-by: Sachin Kamat
Cc: Laxman dewangan
Cc: Chiwoong Byun
Cc: Jonghwa Lee
Cc: Venu Byravarasu
Cc: Jingoo Han
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Switch to using the SIMPLE_DEV_PM_OPS macro to declare the driver's
pm_ops. It reduces code size.Signed-off-by: Jingoo Han
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
devm_rtc_device_register() is device managed and makes cleanup
paths simpler.Signed-off-by: Jingoo Han
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
22 Feb, 2013
1 commit
-
Use devm_request_threaded_irq() to make cleanup paths more simple.
Signed-off-by: Jingoo Han
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
05 Jan, 2013
1 commit
-
Add an RTC driver for TPS6586X chips by TI. This driver supports:
- Setting and getting time and date.
- Setting and reading alarm time.
- Alarm and interrupt functionlity.[akpm@linux-foundation.org: remove stray semicolons]
[akpm@linux-foundation.org: start epoch in 2009]
Signed-off-by: Laxman Dewangan
Tested-by: Marc Dietrich
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds