Replace the I2C bus address, as per drivers/acorn/char/pcf8583.c.
Also, since this driver also contains Acorn RiscPC specific code
for obtaining the current year from the SRAM (and updating the
platform specific checksum when writing new data back) this is
NOT a platform independent driver.
Document it as such, and update the dependencies to reflect this
fact.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Both BCD_TO_BIN(x) and BIN_TO_BCD(x) have an unexpected side-effect -
not only do they return the value as expected, they _modify_ their
argument in the process.
Let's play it safe and avoid these macros.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
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>
A port of the driver for the pcf8583 i2c rtc controller to the generic RTC
framework by Alessandro Zummo. Based on
drivers/acorn/char/{pcf8583.[hc],i2c.c}. Hopefully, acorn can be converted
too to use this driver in the future.
Signed-off-by: G. Liakhovetski <gl@dsa-ac.de>
Signed-off-by: Alessandro Zummo <a.zummo@towertech.it>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>