]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
rtc-pcf8563: detect polarity of century bit automatically
authorAtsushi Nemoto <anemo@mba.ocn.ne.jp>
Sat, 3 Feb 2007 14:16:36 +0000 (23:16 +0900)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 9 Mar 2007 18:50:17 +0000 (10:50 -0800)
commit85560a1e39f9a974e9c4ce5352fd330d4b8fe399
treea95ba6fd64652746ab68578010531a25466e1423
parent9d4b636cfc1e76ec86d6ef5c7a100195c7c12d23
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