rtc-pcf8563: detect polarity of century bit automatically
commit0b141b1ffd0271eccd6d84633a05b41cde6b1f20
authorAtsushi Nemoto <anemo@mba.ocn.ne.jp>
Sat, 3 Feb 2007 14:16:36 +0000 (3 23:16 +0900)
committerGreg Kroah-Hartman <gregkh@suse.de>
Sat, 24 Feb 2007 00:24:25 +0000 (23 16:24 -0800)
tree48155c77ab430e64c1b71e1d31d90f1a301b949c
parent38141b5aa58969bd3dcd8259711b99fd64c8963b
rtc-pcf8563: detect polarity of century bit automatically

The usage of the century bit was inverted on 2.6.19 following to PCF8563's
description, but it was not match to usage suggested by RTC8564's
datasheet.  Anyway what MO_C=1 means can vary on each platform.  This patch
is to detect its polarity in get_datetime routine.  The default value of
c_polarity is 0 (MO_C=1 means 19xx) so that this patch does not change
current behavior even if get_datetime was not called before set_datetime.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Cc: Jean-Baptiste Maneyrol <jean-baptiste.maneyrol@teamlog.com>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/rtc/rtc-pcf8563.c