Age | Commit message (Collapse) | Author | Files | Lines |
|
Alarmtimer interface uses only the RTC with wekeup flags enabled.
Allow to use rtc-test driver with alarmtimer interface.
Signed-off-by: Roman Stratiienko <[email protected]>
Signed-off-by: Alexandre Belloni <[email protected]>
|
|
Use .set_time instead of the deprecated .set_mmss64.
Signed-off-by: Alexandre Belloni <[email protected]>
|
|
Fix checkpatch error:
drivers/rtc/rtc-test.c:155: ERROR: do not use assignment in if condition
Signed-off-by: Alexandre Belloni <[email protected]>
|
|
Replace the license boilerplate by an SPDX identifier
Signed-off-by: Alexandre Belloni <[email protected]>
|
|
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 <[email protected]>
|
|
The array pdev is local to the source and does not need to be in
global scope, so make it static.
Cleans up sparse warning:
symbol 'pdev' was not declared. Should it be static?
Signed-off-by: Colin Ian King <[email protected]>
Signed-off-by: Alexandre Belloni <[email protected]>
|
|
To test for issues with RTCs that don't provide an alarm, remove alarm
support from the first test RTC device.
Signed-off-by: Alexandre Belloni <[email protected]>
|
|
This allows further improvement of the driver.
Signed-off-by: Alexandre Belloni <[email protected]>
|
|
Now that alarms are emulated, remove the irq sysfs file that could be used
to send alarms.
Signed-off-by: Alexandre Belloni <[email protected]>
|
|
Use timers to emulate alarms. Note that multiple alarms may happen if they
are set more than 15 days after the current RTC time.
Signed-off-by: Alexandre Belloni <[email protected]>
|
|
Store the time as an offset to system time. As the offset is in second, it
is currently always synced with system time.
Signed-off-by: Alexandre Belloni <[email protected]>
|
|
Use a loop to register RTC devices
Signed-off-by: Alexandre Belloni <[email protected]>
|
|
The rtc proc callback is useless for two reasosn:
- the test RTC is often not the first RTC so it will never be used
- all the info is available in the name file of the RTC sys folder
Signed-off-by: Alexandre Belloni <[email protected]>
|
|
There is no point in testing .set_mmss versus .set_mmss64 as there are both
taking the exact same argument (truncated for set_mmss though).
Also, this allows to constify struct rtc_ops.
Signed-off-by: Alexandre Belloni <[email protected]>
|
|
We should get drvdata from struct device directly. Going via
platform_device is an unneeded step back and forth.
Signed-off-by: Wolfram Sang <[email protected]>
Acked-by: Michal Simek <[email protected]> (for zynqmp)
Signed-off-by: Alexandre Belloni <[email protected]>
|
|
This driver has a number of y2038/y2106 issues.
This patch resolves them by:
- Replacing get_seconds() with ktime_get_real_seconds()
- Replacing rtc_time_to_tm() with rtc_time64_to_tm()
Also add test_rtc_set_mmss64() for testing rtc_class_ops's
set_mmss64(), which can be activated by "test_mmss64" module
parameter.
Signed-off-by: Xunlei Pang <[email protected]>
Signed-off-by: John Stultz <[email protected]>
Acked-by: Alessandro Zummo <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
|
|
A platform_driver does not need to set an owner, it will be populated by the
driver core.
Signed-off-by: Wolfram Sang <[email protected]>
|
|
RTC drivers must not return an error after device registration.
[[email protected]: coding-style fixes]
Signed-off-by: Alessandro Zummo <[email protected]>
Reported-by: Ales Novak <[email protected]>
Cc: Alexander Shiyan <[email protected]>
Cc: Atsushi Nemoto <[email protected]>
Cc: Jiri Kosina <[email protected]>
Cc: Srikanth Srinivasan <[email protected]>
Cc: Lee Jones <[email protected]>
Cc: Sascha Hauer <[email protected]>
Cc: Joonsoo Kim <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
|
|
devm_rtc_device_register() is device managed and makes cleanup paths
simpler.
Signed-off-by: Jingoo Han <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
|
|
CONFIG_HOTPLUG is going away as an option. As a result, the __dev*
markings need to be removed.
This change removes the use of __devinit, __devexit_p, __devinitdata,
__devinitconst, and __devexit from these drivers.
Based on patches originally written by Bill Pemberton, but redone by me
in order to handle some of the coding style issues better, by hand.
Cc: Bill Pemberton <[email protected]>
Cc: Alessandro Zummo <[email protected]>
Cc: Srinidhi Kasagar <[email protected]>
Cc: Linus Walleij <[email protected]>
Cc: Mike Frysinger <[email protected]>
Cc: Wan ZongShun <[email protected]>
Cc: Guan Xuetao <[email protected]>
Cc: Mark Brown <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
In case of error, test_init() needs to call platform_device_del() instead
of platform_device_unregister(). Otherwise, we may call
platform_device_put() twice.
dpatch engine is used to auto generate this patch.
(https://github.com/weiyj/dpatch)
[[email protected]: improve label naming]
Signed-off-by: Wei Yongjun <[email protected]>
Cc: Alessandro Zummo <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
|
|
The rtc-test driver is meant to provide a test/debug code for the RTC
subsystem.
The rtc-test driver simulates specific interrupts by echoing to the
sys interface. Those were the update, alarm and periodic interrupts.
As a side effect of the new implementation, any interrupt generated in
the rtc-test driver would trigger the same code path in the generic
code, and thus the distinction among interrupts gets lost.
This patch preserves the previous behaviour of the rtc-test driver,
where e.g. an update interrupt would not trigger an alarm or periodic
interrupt, and vice-versa. In real world RTC drivers, this is not an
issue, but in the rtc-test driver it may be interesting to distinguish
these interrupts for testing purposes.
CC: Thomas Gleixner <[email protected]>
CC: Alessandro Zummo <[email protected]>
CC: Marcelo Roberto Jimenez <[email protected]>
CC: [email protected]
Signed-off-by: Marcelo Roberto Jimenez <[email protected]>
Signed-off-by: John Stultz <[email protected]>
|
|
Some rtc drivers use the ioctl method instead of the alarm_irq_enable
method for enabling alarm interupts. With the new virtualized RTC
rework, its important for drivers to use the alarm_irq_enable instead.
This patch converts the drivers that use the AIE ioctl method to
use the alarm_irq_enable method. Other ioctl cmds are left untouched.
I have not been able to test or even compile most of these drivers.
Any help to make sure this change is correct would be appreciated!
CC: Alessandro Zummo <[email protected]>
CC: Thomas Gleixner <[email protected]>
CC: Marcelo Roberto Jimenez <[email protected]>
Reported-by: Marcelo Roberto Jimenez <[email protected]>
Tested-by: Marcelo Roberto Jimenez <[email protected]>
Signed-off-by: John Stultz <[email protected]>
|
|
The rtc_update_irq() might be called with irqs enabled, if a interrupt
handler was registered without IRQF_DISABLED. Use
spin_lock_irqsave/spin_unlock_irqrestore instead of spin_lock/spin_unlock.
Also update kerneldoc and drivers which do extra work to follow the
current interface spec, as suggestted by David Brownell.
Signed-off-by: Atsushi Nemoto <[email protected]>
Cc: Alessandro Zummo <[email protected]>
Cc: David Brownell <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
|
|
Drivers should only need to implement either set_mmss (counter based RTCs)
or set_time (most RTCs). The RTC subsystem will handle them
appropriately.
Signed-off-by: Alessandro Zummo <[email protected]>
Cc: Kumar Gala <[email protected]>
Cc: David Brownell <[email protected]>
Cc: Lennert Buytenhek <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
|
|
Fix following warning:
WARNING: vmlinux.o(.data+0x253e28): Section mismatch in reference from the variable test_drv to the function .devexit.text:test_remove()
Fix by renaming the platfrom_driver variable from *_drv to *_driver
so modpost ignore the reference to an __devexit section.
Signed-off-by: Sam Ravnborg <[email protected]>
Cc: Alessandro Zummo <[email protected]>
Cc: David Brownell <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
|
|
This patch removes class_device from the programming interface that the RTC
framework exposes to the rest of the kernel. Now an rtc_device is passed,
which is more type-safe and streamlines all the relevant code.
Signed-off-by: David Brownell <[email protected]>
Acked-by: Greg Kroah-Hartman <[email protected]>
Acked-By: Alessandro Zummo <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
|
|
Signed-off-by: Jeff Garzik <[email protected]>
Cc: Alessandro Zummo <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
|
|
I got a lockdep warning when running "rtctest" so I though it'd be good
to see what was up.
- The warning was for rtc->irq_task_lock, gotten from rtc_update_irq()
by irq handlerss ... but in a handful of other cases, grabbed without
blocking IRQs.
- Some callers to rtc_update_irq() were not ensuring IRQs were blocked,
yet the routine expects that; make sure all callers block IRQs.
It would appear that RTC API tests haven't been part of anyone's kernel
regression test suite recently, at least not with lockdep running.
Signed-off-by: David Brownell <[email protected]>
Acked-by: Alessandro Zummo <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
|
|
Update RTC framework so that drivers can constify their method tables, moving
them from ".data" to ".rodata". Then update the drivers.
Signed-off-by: David Brownell <[email protected]>
Cc: Alessandro Zummo <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
|
|
Appropriately use -ENOIOCTLCMD and -ENOTTY when the ioctl is not
implemented by a driver.
(akpm: we're not allowed to return -ENOIOCTLCMD to userspace. This patch does
the right thing).
Signed-off-by: Alessandro Zummo <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
|
|
Move registration error message from drivers to core.
Signed-off-by: Alessandro Zummo <[email protected]>
Cc: Lennert Buytenhek <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
|
|
Move the "24hr: yes" proc output from drivers to rtc proc code. This is
required because the time value in the proc output is always in 24hr mode
regardless of the driver.
Signed-off-by: Alessandro Zummo <[email protected]>
Cc: Lennert Buytenhek <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
|
|
Interrupts can be generated by
echo "alarm|tick|update" >/sys/class/rtc/rtcX/device/irq
Signed-off-by: Alessandro Zummo <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
|