android_kernel_xiaomi_sm7250/drivers/i2c
Dirk Eibach 763d9c046a i2c: fix broken ds1337 initialization
On a custom board with ds1337 RTC I found that upgrade from 2.6.15 to
2.6.18 broke RTC support.

The main problem are changes to ds1337_init_client().
When a ds1337 recognizes a problem (e.g. power or clock failure) bit 7
in status register is set. This has to be reset by writing 0 to status
register. But since there are only 16 byte written to the chip and the
first byte is interpreted as an address, the status register (which is
the 16th) is never written.
The other problem is, that initializing all registers to zero is not
valid for day, date and month register. Funny enough this is checked by
ds1337_detect(), which depends on this values not being zero. So then
treated by ds1337_init_client() the ds1337 is not detected anymore,
whereas the failure bit in the status register is still set.

Signed-off-by: Dirk Stieler <stieler@gdsys.de>
Signed-off-by: Dirk Eibach <eibach@gdsys.de>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2006-12-10 21:21:31 +01:00
..
algos i2c: Delete the broken i2c-ite bus driver 2006-12-10 21:21:29 +01:00
busses i2c: New Atmel AT91 bus driver 2006-12-10 21:21:30 +01:00
chips i2c: fix broken ds1337 initialization 2006-12-10 21:21:31 +01:00
i2c-core.c i2c: Use the __ATTR macro where possible 2006-12-10 21:21:31 +01:00
i2c-dev.c i2c: Whitespace cleanups 2006-12-10 21:21:31 +01:00
Kconfig i2c: Fix copy-n-paste in subsystem Kconfig 2006-09-26 15:38:51 -07:00
Makefile [PATCH] hwmon: hwmon vs i2c, second round (07/11) 2005-09-05 09:14:22 -07:00