aboutsummaryrefslogtreecommitdiff
path: root/drivers/rtc
AgeCommit message (Collapse)AuthorFilesLines
2009-05-12rtc: rtc-twl4030 don't mask alarm interrupts on suspendKim Kyuwon1-3/+1
This patch enables the alarm interrupt of TWL4030 RTC to wake up the system from suspend. You can test this patch with following command. # echo +10 > /sys/class/rtc/rtc0/wakealarm; echo mem > /sys/power/state; Signed-off-by: Kim Kyuwon <[email protected]> Acked-by: David Brownell <[email protected]> Cc: Kyungmin Park <[email protected]> Cc: Alessandro Zummo <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2009-04-27sh: rtc-generic support.Paul Mundt1-1/+1
This adds rtc-generic support for SUPERH32. Signed-off-by: Paul Mundt <[email protected]>
2009-04-26[ARM] 5452/1: ep93x: rtc: use ioremap'ed addressesHartley Sweeten1-37/+112
Update the rtc-ep93xx driver to use ioremap'ed addresses. This removes the dependency on <mach/hardware.h> and properly reports the memory addresses used by the driver in /proc/iomem. In addition, ep93xx_rtc_init() is updated to use platform_driver_probe() instead of platform_driver_register(). Also, the device_create_file() calls are now properly checked for error conditions. The created sysfs files are also now removed when the driver is removed. The version number for the driver has been bumped at the request of Alessandro Zummo. Signed-off-by: H Hartley Sweeten <[email protected]> Acked-by: Alessandro Zummo <[email protected]> Signed-off-by: Russell King <[email protected]>
2009-04-21rtc-cmos: fix printk outputKrzysztof Halasa1-11/+9
With no IRQ available/defined, RTC-CMOS driver prints something like: rtc0: alarms up to one no, y3k, 114 bytes nvram ^^^^ I guess the following is a bit easier to understand: rtc0: no alarms, y3k, 114 bytes nvram Signed-off-by: Krzysztof Halasa <[email protected]> Cc: David Brownell <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2009-04-16rtc: rtc-sh: clock framework support.Paul Mundt2-19/+50
This adds clock framework support to the rtc-sh driver. With this in place, platforms can default to leaving the clock disabled rather than placing it in the always enabled state. Signed-off-by: Paul Mundt <[email protected]>
2009-04-05Merge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6Linus Torvalds1-0/+36
* git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6: (23 commits) sh: sh7785lcr: Map whole PCI address space. sh: Fix up DSP context save/restore. sh: Fix up number of on-chip DMA channels on SH7091. sh: update defconfigs. sh: Kill off broken direct-mapped cache mode. sh: Wire up ARCH_HAS_DEFAULT_IDLE for cpuidle. sh: Add a command line option for disabling I/O trapping. sh: Select ARCH_HIBERNATION_POSSIBLE. sh: migor: Fix up CEU use flags. input: migor_ts: add wakeup support rtc: rtc-sh: use set_irq_wake() input: sh_keysc: use enable/disable_irq_wake() sh: intc: set_irq_wake() support sh: intc: install enable, disable and shutdown callbacks clocksource: sh_cmt: use remove_irq() and remove clockevent workaround sh: ap325 and Migo-R use new sh_mobile_ceu_info flags sh: Fix up -Wformat-security whining. sh: ap325rxa: Add ov772x support, again. sh: Sanitize asm/mmu.h for assembly use. sh: Tidy up sh7786 pinmux table. ...
2009-04-03Merge git://git.kernel.org/pub/scm/linux/kernel/git/kyle/rtc-pariscLinus Torvalds6-171/+207
* git://git.kernel.org/pub/scm/linux/kernel/git/kyle/rtc-parisc: powerpc/ps3: Add rtc-ps3 powerpc: Hook up rtc-generic, and kill rtc-ppc m68k: Hook up rtc-generic parisc: rtc: Rename rtc-parisc to rtc-generic parisc: rtc: Add missing module alias parisc: rtc: platform_driver_probe() fixups parisc: rtc: get_rtc_time() returns unsigned int
2009-04-02rtc: add m41t62 support to rtc-m41t80 driverDaniel Glockner2-7/+15
Compared to the other supported chips, the m41t62 uses a different register to set the square wave frequency. Signed-off-by: Daniel Glockner <[email protected]> Cc: Chris Zankel <[email protected]> Cc: David Brownell <[email protected]> Cc: Alessandro Zummo <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2009-04-02rtc-v3020: add ability to access v3020 chip with GPIOsMike Rapoport1-20/+170
The v3020 RTC can be connected to GPIOs as well as to memory-like interface. Add ability to use GPIO bit-bang for v3020 read-write access. [[email protected]: fix off-by-one in error path] Signed-off-by: Mike Rapoport <[email protected]> Acked-by: Alessandro Zummo <[email protected]> Cc: David Brownell <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2009-04-02rtc: rtc-sh: use set_irq_wake()Magnus Damm1-0/+36
Modify the sh_rtc driver to use set_irq_wake() during suspend and resume. These functions are used to enable the rtc interrupts in the interrupt controller so the rtc can be used to wakeup the system from suspend. Signed-off-by: Magnus Damm <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2009-04-02powerpc/ps3: Add rtc-ps3Geert Uytterhoeven3-0/+114
Create a real RTC driver for PS3, and unhook the deprecated ppc_md.[gs]et_rtc_time. Signed-off-by: Geert Uytterhoeven <[email protected]> Acked-by: Alessandro Zummo <[email protected]> Acked-by: Geoff Levand <[email protected]> Signed-off-by: Kyle McMartin <[email protected]>
2009-04-02powerpc: Hook up rtc-generic, and kill rtc-ppcGeert Uytterhoeven3-79/+1
PowerPC has been a long time user of the generic RTC abstraction, so hook up rtc-generic: - Create the "rtc-generic" platform device if ppc_md.get_rtc_time is set, - Kill rtc-ppc, as rtc-generic offers the same functionality in a more generic way, and supports autoloading through udev. Signed-off-by: Geert Uytterhoeven <[email protected]> Acked-by: David Woodhouse <[email protected]> Acked-by: Alessandro Zummo <[email protected]> Acked-by: Benjamin Herrenschmidt <[email protected]> Signed-off-by: Kyle McMartin <[email protected]>
2009-04-02m68k: Hook up rtc-genericGeert Uytterhoeven1-1/+1
m68k has been a long time user of the generic RTC abstraction, so hook up rtc-generic: - Create the "rtc-generic" platform device if mach_hwclk is set, - Add checks for mach_hwclk, in anticipation of RTC chip drivers being moved to drivers/rtc/. Signed-off-by: Geert Uytterhoeven <[email protected]> Acked-by: Alessandro Zummo <[email protected]> Signed-off-by: Kyle McMartin <[email protected]>
2009-04-02parisc: rtc: Rename rtc-parisc to rtc-genericGeert Uytterhoeven4-89/+91
The rtc-parisc driver is not PA-RISC specific at all, as it uses the existing (but deprecated) generic RTC infrastructure ([gs]et_rtc_time()). Rename the driver from rtc-parisc to rtc-generic. Signed-off-by: Geert Uytterhoeven <[email protected]> Acked-by: Alessandro Zummo <[email protected]> Signed-off-by: Kyle McMartin <[email protected]>
2009-04-02parisc: rtc: Add missing module aliasGeert Uytterhoeven1-0/+1
Make udev autoload the driver Signed-off-by: Geert Uytterhoeven <[email protected]> Acked-by: Alessandro Zummo <[email protected]> Signed-off-by: Kyle McMartin <[email protected]>
2009-04-02parisc: rtc: platform_driver_probe() fixupsGeert Uytterhoeven1-2/+1
When using platform_driver_probe(), it's not needed to setup a .probe function, and .remove should be marked __exit_p(), not __devexit_p(). Signed-off-by: Geert Uytterhoeven <[email protected]> Acked-by: Alessandro Zummo <[email protected]> Cc: dann frazier <[email protected]> Signed-off-by: Kyle McMartin <[email protected]>
2009-04-02parisc: rtc: get_rtc_time() returns unsigned intGeert Uytterhoeven1-3/+1
Signed-off-by: Geert Uytterhoeven <[email protected]> Acked-by: Alessandro Zummo <[email protected]> Signed-off-by: Kyle McMartin <[email protected]>
2009-04-01rtc: test before subtraction on unsignedRoel Kluin1-3/+3
new_alarm is unsigned so test before the subtraction. [[email protected]: time-wrapping fix] Signed-off-by: Roel Kluin <[email protected]> Cc: David Brownell <[email protected]> Cc: Alessandro Zummo <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2009-04-01rtc-v3020: coding style cleanupMike Rapoport1-22/+18
Signed-off-by: Mike Rapoport <[email protected]> Acked-by: Alessandro Zummo <[email protected]> Cc: David Brownell <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2009-04-01rtc-wm8350: retries will reach -1Roel Kluin1-2/+2
With a postfix decrement retries will reach -1 rather than 0, so the warning and error-out will not occur. Signed-off-by: Roel Kluin <[email protected]> Acked-by: Mark Brown <[email protected]> Cc: Alessandro Zummo <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2009-04-01rtc: add EPSON RX8025 support to DS1307 RTC driverMatthias Fuchs2-3/+84
Add support for the EPSON RX8025 RTC. The date/time registers of this chip are compatible with the DS1307. Signed-off-by: Matthias Fuchs <[email protected]> Signed-off-by: Alessandro Zummo <[email protected]> Cc: David Brownell <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2009-04-01rtc-ds1307: true SMBus compatibilityEd Swierk1-12/+97
Allow the rtc-ds1307 driver to work with SMBus controllers like nforce2 that do not support i2c block transfers. Signed-off-by: Ed Swierk <[email protected]> Acked-by: Jean Delvare <[email protected]> Acked-by: David Brownell <[email protected]> Cc: Alessandro Zummo <[email protected]> Cc: BARRE Sebastien <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2009-04-01rtc-parisc: rename p pointer to rtcdann frazier1-8/+8
Signed-off-by: dann frazier <[email protected]> Cc: Alessandro Zummo <[email protected]> Cc: Kyle McMartin <[email protected]> Cc: Grant Grundler <[email protected]> Cc: Matthew Wilcox <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2009-04-01rtc-parisc: remove a couple unnecessary variablesdann frazier1-9/+3
Signed-off-by: dann frazier <[email protected]> Reviewed-by: Grant Grundler <[email protected]> Cc: Alessandro Zummo <[email protected]> Cc: Kyle McMartin <[email protected]> Cc: Matthew Wilcox <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2009-04-01rtc-parisc: use platform_driver_probedann frazier1-9/+3
This isn't a hotpluggable device, so call platform_driver_probe directly in parisc_rtc_init Signed-off-by: dann frazier <[email protected]> Cc: Alessandro Zummo <[email protected]> Cc: Kyle McMartin <[email protected]> Cc: Grant Grundler <[email protected]> Cc: Matthew Wilcox <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2009-04-01rtc-parisc: use rtc_valid_tm() in parisc_get_timedann frazier1-1/+1
Use the return value of rtc_valid_tm() instead of just returning 0. Signed-off-by: dann frazier <[email protected]> Cc: Alessandro Zummo <[email protected]> Cc: Kyle McMartin <[email protected]> Cc: Grant Grundler <[email protected]> Cc: Matthew Wilcox <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2009-04-01rtc-parisc: remove struct parisc_rtcdann frazier1-12/+7
parisc_rtc now only includes an rtc_device pointer, so let's just use the rtc_device type directly. Signed-off-by: dann frazier <[email protected]> Cc: Alessandro Zummo <[email protected]> Cc: Kyle McMartin <[email protected]> Cc: Grant Grundler <[email protected]> Cc: Matthew Wilcox <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2009-04-01rtc-parisc: remove redundant lockingdann frazier1-11/+1
The RTC subsystem proides ops locking, no need to implement our own Signed-off-by: dann frazier <[email protected]> Cc: Alessandro Zummo <[email protected]> Cc: Kyle McMartin <[email protected]> Cc: Grant Grundler <[email protected]> Cc: Matthew Wilcox <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2009-04-01rtc-parisc: add a missing include for linux/rtc.hdann frazier1-0/+1
Signed-off-by: dann frazier <[email protected]> Cc: Alessandro Zummo <[email protected]> Cc: Kyle McMartin <[email protected]> Cc: Grant Grundler <[email protected]> Cc: Matthew Wilcox <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2009-04-01rtc: add platform driver for EFIdann frazier3-0/+246
Munge Stephane Eranian's efirtc.c code into an rtc platform driver [[email protected]: use is_leap_year()] Signed-off-by: dann frazier <[email protected]> Cc: Alessandro Zummo <[email protected]> Cc: stephane eranian <[email protected]> Cc: "Luck, Tony" <[email protected]> Cc: David Brownell <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2009-04-01rtc: convert LEAP_YEAR into an inlineAndrew Morton1-4/+3
- the LEAP_YEAR macro is buggy - it references its arg multiple times. Fix this by turning it into a C function. - give it a more approriate name - Move it to rtc.h so that other .c files can use it, instead of copying it. Cc: dann frazier <[email protected]> Acked-by: Alessandro Zummo <[email protected]> Cc: stephane eranian <[email protected]> Cc: "Luck, Tony" <[email protected]> Cc: David Brownell <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2009-04-01rtc: convert wm8350 use new alarm and update operationsMark Brown1-21/+18
These are the only two ioctls so the ioctl() function is also removed. Signed-off-by: Mark Brown <[email protected]> Cc: Acked-by: Alessandro Zummo <[email protected]> Cc: David Brownell <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2009-03-31proc 2/2: remove struct proc_dir_entry::ownerAlexey Dobriyan1-8/+2
Setting ->owner as done currently (pde->owner = THIS_MODULE) is racy as correctly noted at bug #12454. Someone can lookup entry with NULL ->owner, thus not pinning enything, and release it later resulting in module refcount underflow. We can keep ->owner and supply it at registration time like ->proc_fops and ->data. But this leaves ->owner as easy-manipulative field (just one C assignment) and somebody will forget to unpin previous/pin current module when switching ->owner. ->proc_fops is declared as "const" which should give some thoughts. ->read_proc/->write_proc were just fixed to not require ->owner for protection. rmmod'ed directories will be empty and return "." and ".." -- no harm. And directories with tricky enough readdir and lookup shouldn't be modular. We definitely don't want such modular code. Removing ->owner will also make PDE smaller. So, let's nuke it. Kudos to Jeff Layton for reminding about this, let's say, oversight. http://bugzilla.kernel.org/show_bug.cgi?id=12454 Signed-off-by: Alexey Dobriyan <[email protected]>
2009-03-28Merge branch 'origin' into develRussell King4-92/+164
Conflicts: sound/soc/pxa/pxa2xx-i2s.c
2009-03-26Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6Linus Torvalds3-5/+5
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6: (61 commits) Dynamic debug: fix pr_fmt() build error Dynamic debug: allow simple quoting of words dynamic debug: update docs dynamic debug: combine dprintk and dynamic printk sysfs: fix some bin_vm_ops errors kobject: don't block for each kobject_uevent sysfs: only allow one scheduled removal callback per kobj Driver core: Fix device_move() vs. dpm list ordering, v2 Driver core: some cleanup on drivers/base/sys.c Driver core: implement uevent suppress in kobject vcs: hook sysfs devices into object lifetime instead of "binding" driver core: fix passing platform_data driver core: move platform_data into platform_device sysfs: don't block indefinitely for unmapped files. driver core: move knode_bus into private structure driver core: move knode_driver into private structure driver core: move klist_children into private structure driver core: create a private portion of struct device driver core: remove polling for driver_probe_done(v5) sysfs: reference sysfs_dirent from sysfs inodes ... Fixed conflicts in drivers/sh/maple/maple.c manually
2009-03-25Merge git://git.marvell.com/orion into develRussell King1-0/+11
2009-03-24rtc: struct device - replace bus_id with dev_name(), dev_set_name()Kay Sievers3-5/+5
Cc: [email protected] Cc: [email protected] Signed-off-by: Kay Sievers <[email protected]> Signed-off-by: Alessandro Zummo <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2009-03-24[ARM] Kirkwood: fail the probe if internal RTC does not workNicolas Pitre1-0/+11
Having a RTC that doesn't maintain proper time across a reboot is one thing. But a RTC that doesn't work at all and only causes timeouts is another. Tested-by: Martin Michlmayr <[email protected]> Signed-off-by: Nicolas Pitre <[email protected]>
2009-03-20sh: sh-rtc wakeup supportMagnus Damm1-0/+1
Flag that the SuperH RTC supports wakeup. Signed-off-by: Magnus Damm <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2009-03-20sh: sh-rtc invalid time reworkMagnus Damm1-6/+9
This patch modifies invalid time handling in the SuperH RTC driver. Instead of zeroing the returned value at read-out time we just return an error code and reset invalid values during probe. Signed-off-by: Magnus Damm <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2009-03-20sh: sh-rtc carry interrupt reworkMagnus Damm1-8/+32
This patch modifies the SuperH RTC driver to only enable carry interrupts when needed. So by default no interrupts are enabled with this patch. Without this patch a suspending system will most likely wake up by the carry interrupt regardless if the alarm interrupt has been enabled or not. Signed-off-by: Magnus Damm <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2009-03-13Merge branch 'for-rmk' of git://git.pengutronix.de/git/imx/linux-2.6 into develRussell King2-2/+2
Conflicts: arch/arm/mach-at91/gpio.c
2009-03-09[ARM] pxa: separate definitions from pxa-regs.h and remove it finallyEric Miao1-1/+2
The remaining registers are separated into: - <mach/regs-ost.h> - <mach/regs-rtc.h> - <mach/regs-intc.h> and then we can remove pxa-regs.h completely. Instead of #include this file, let's: 1. include the specific <mach/regs-*.h> with care (if that's absolutely necessary) 2. define the registers in the driver, make cleanly defined API to expose the register access to external with sufficient reason Signed-off-by: Eric Miao <[email protected]>
2009-03-06rtc: rtc-sh: Bump version up to reflect single IRQ support changes.Paul Mundt1-1/+1
Signed-off-by: Paul Mundt <[email protected]>
2009-02-27rtc: sh-rtc: Add Single IRQ SupportMagnus Damm1-73/+117
Add support for single IRQ hardware to the sh-rtc driver. This is useful for processors with limited interrupt masking support such as sh7750 and sh7780. With this patch in place we can add logic to the intc code that merges all RTC vectors into a single linux interrupt with proper masking/unmasking support. Specify a single IRQ in the platform data to use this new shared IRQ feature. Separate Periodic/Carry/Alarm IRQs are still supported. Signed-off-by: Magnus Damm <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2009-02-11rtc: t reaches -1, tested 0Roel Kluin1-1/+1
With a postfix decrement t will reach -1 rather than 0, so neither the warning nor the `goto error_out' will occur. Signed-off-by: Roel Kluin <[email protected]> Acked-by: Manuel Lauss <[email protected]> Acked-by: Alessandro Zummo <[email protected]> Cc: David Brownell <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2009-02-11rtc: update maintainership of pxa rtc driverRobert Jarzmik1-1/+1
Signed-off-by: Robert Jarzmik <[email protected]> Signed-off-by: Alessandro Zummo <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2009-02-05rtc-ds1390: fix compilation warnings in drivers/rtc/rtc-ds1390.cManish Katiyar1-1/+0
drivers/rtc/rtc-ds1390.c:125: warning: unused variable 'rtc' Signed-off-by: Manish Katiyar <[email protected]> Signed-off-by: Alessandro Zummo <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2009-02-05rtc: rtc-dm355evm driverDavid Brownell3-0/+182
Simple RTC driver for the MSP430 firmware on the DM355 EVM board. Other than not supporting atomic reads/writes of all four bytes, this is reasonable as a basic no-alarm RTC. Signed-off-by: David Brownell <[email protected]> Signed-off-by: Kevin Hilman <[email protected]> Acked-by: Alessandro Zummo <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2009-01-15rtc: rtc-twl4030 don't mask alarm interrupts on shutdownMatti Halme1-2/+3
A triggering RTC alarm should be able to power on a device that has been powered off. This patch enables that on twl4030 by not masking the alarm interrupt at shutdown. Signed-off-by: Matti Halme <[email protected]> Signed-off-by: Alessandro Zummo <[email protected]> Acked-by: David Brownell <[email protected]> Cc: Tony Lindgren <[email protected]> Cc: Samuel Ortiz <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>