summaryrefslogtreecommitdiffstats
path: root/drivers/rtc/rtc-rs5c372.c
Commit message (Collapse)AuthorAgeFilesLines
* rtc-rs5c372 becomes a new-style i2c driverDavid Brownell2007-07-171-61/+34Star
| | | | | | | | | | | | | | | | | | | | | | | | Convert rtc-rs5c372 to be a "new style" I2C driver, and update the Kconfig text to be more complete.. Verified on an OMAP H4 development platform, along with a board init patch to declare its rv5c387a device. Only one defconfig -- powerpc/linkstation -- uses this driver; but several other platforms use it, just without defconfig support. Such platforms need to be converted so (a) their I2C adapter driver supports new-style drivers, and (b) board init code declares this I2C device. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Cc: Voipio Riku <Riku.Voipio@movial.fi> Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Cc: Martin Michlmayr <tbm@cyrius.com> Cc: Jean Delvare <khali@linux-fr.org> Cc: Alessandro Zummo <a.zummo@towertech.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* i2c: Stop using i2c_adapter.class_devJean Delvare2007-02-131-1/+1
| | | | | | | | Stop using i2c_adapter.class_dev, as it is going to be removed soon. Luckily, there are only 4 RTC drivers affected. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Alessandro Zummo <a.zummo@towertech.it>
* [PATCH] Update the rtc-rs5c372 driverDavid Brownell2007-01-061-68/+467
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bugfixes: - Handle RTCs which are configured to use 12-hour mode. - Never report bogus/un-initialized times. - Displaying "raw trim" requires not masking it first! - Fix the sysfs and procfs display of crystal and trim data. Features: - Handle other RTCs in this family, notably rv5c386/rv5c387. - Declare the other registers. - Provide alarm get/set functionality. - Handle AIE and UIE; but no IRQ handling yet. Cleanup: - Shrink object by not including needless sysfs or procfs support - We don't need no steenkin' forward declarations. (Except one.) Until the I2C framework merges "new style" driver support, matching the driver model better, using rv5c chips or alarm IRQs requires a separate board-specific patch. (And an IRQ handler, handing off labor through a work_struct...) This uses the "method 3" register reads, but notes that it's done to work around an evident i2c adapter driver bug. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Acked-by: Alessandro Zummo <a.zummo@towertech.it> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] RTCs don't use i2c_adapter.devDavid Brownell2006-12-101-1/+1
| | | | | | | | | | | | Update more I2C drivers that live outside drivers/i2c to understand that using adapter->dev is not The Way. When actually referring to the adapter hardware, adapter->class_dev.dev is the answer. When referring to a device connected to it, client->dev.dev is the answer. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Acked-by: Alessandro Zummo <a.zummo@towertech.it> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] rtc-rs5c372: change register reading methodRiku Voipio2006-12-071-40/+44
| | | | | | | | | | | According to the datasheet rs5c372 supports three different methods for reading register values. Change from method #1 to method #3, since method #3 is the only one that works on Thecus N2100 board with this RTC. Signed-off-by: Riku Voipio <riku.voipio@movial.fi> Cc: Alessandro Zummo <alessandro.zummo@towertech.it> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] RTC: handle sysfs errorsJeff Garzik2006-12-071-2/+10
| | | | | | | Signed-off-by: Jeff Garzik <jeff@garzik.org> Cc: Alessandro Zummo <a.zummo@towertech.it> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] drivers/rtc/rtc-rs5c372.c: fix a NULL dereferenceAdrian Bunk2006-11-251-3/+3
| | | | | | | | | | | | | | The correct order is: NULL check before dereference This was a guaranteed NULL dereference with debugging enabled since rs5c372_sysfs_show_osc() does actually pass NULL... Spotted by the Coverity checker. Signed-off-by: Adrian Bunk <bunk@stusta.de> Acked-by: Alessandro Zummo <a.zummo@towertech.it> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] RTC: build fixesJeff Garzik2006-10-041-2/+2
| | | | | | | | Fix obvious build breakage revealed by 'make allyesconfig' in current -git. Signed-off-by: Jeff Garzik <jeff@garzik.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] constify rtc_class_ops: update driversDavid Brownell2006-10-011-1/+1
| | | | | | | | | | 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 <dbrownell@users.sourceforge.net> Cc: Alessandro Zummo <a.zummo@towertech.it> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] RTC subsystem: compact error messagesAlessandro Zummo2006-04-111-2/+0Star
| | | | | | | | | Move registration error message from drivers to core. Signed-off-by: Alessandro Zummo <a.zummo@towertech.it> Cc: Lennert Buytenhek <buytenh@wantstofly.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] RTC subsystem: RS5C372 sysfs fixAlessandro Zummo2006-04-111-8/+10
| | | | | | | | Fix sysfs show() return code Signed-off-by: Alessandro Zummo <a.zummo@towertech.it> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] RTC subsystem: fix proc outputAlessandro Zummo2006-04-111-3/+2Star
| | | | | | | | | | | 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 <a.zummo@towertech.it> Cc: Lennert Buytenhek <buytenh@wantstofly.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] RTC subsystem: whitespaces and error messages cleanupAlessandro Zummo2006-04-111-3/+0Star
| | | | | | | | | | - fix whitespace - remove some debugging in excess Signed-off-by: Alessandro Zummo <a.zummo@towertech.it> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] RTC subsystem: RS5C372 driverAlessandro Zummo2006-03-271-0/+294
RTC class aware driver for the Ricoh RS5C372 chip used, among others, on the Synology DS101. Signed-off-by: Alessandro Zummo <a.zummo@towertech.it> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>