mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
To: macro@linux-mips.org
Cc: a.zummo@towertech.it, hvr@gnu.org, akpm@linux-foundation.org,
	rtc-linux@googlegroups.com, linux-mips@linux-mips.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] RTC: M41T80: Century Bit support
Date: Sun, 18 May 2008 00:02:42 +0900 (JST)	[thread overview]
Message-ID: <20080518.000242.41199304.anemo@mba.ocn.ne.jp> (raw)
In-Reply-To: <Pine.LNX.4.55.0805170057370.4049@cliff.in.clinika.pl>

On Sat, 17 May 2008 01:25:18 +0100 (BST), "Maciej W. Rozycki" <macro@linux-mips.org> wrote:
>  Make use of the Century Bit to support years in the range from 1970 to 
> 2169.  Enable toggling of the bit at the end of a century on a clock 
> update.
> ---
>  The clock is used with the Broadcom SWARM and the D-Link DNS-323 
> platform.
> 
>  I have verified correct operation with the SWARM -- the firmware assumes
> 19YY when CB is clear and 20YY otherwise.  Which means years 1900-1969
> will be shown as 2100-2169 in Linux.  I think this is a feature rather
> than a problem.  The firmware does not set the CEB bit itself and does not 
> care of what its state is.
> 
>  I will be happy to hear from a DNS-323 user to confirm or deny whether
> such an interpretation is compatible.

This patch enforces that all (including future) users of this device
must use same interpretation of CB bit.  I think this is too
intrusive.

And I have one (out-of-tree, and only one in the world) board with
this device and its firmware uses different interpretation.
Fortunately I can change this firmware, so this is not a serious
problem for me. ;)

How about doing like this?

1. If CEB was 0, keep current behavior. (does not touch CB bit)

2. If CEB was 1, detect polarity of CB bit on get_datetime, and set or
   clear CB bit on set_datetime based on the polarity.

Please look at "c_polarity" variable in rtc-pcf8563.c driver.

---
Atsushi Nemoto

  reply	other threads:[~2008-05-17 15:01 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-17  0:25 Maciej W. Rozycki
2008-05-17 15:02 ` Atsushi Nemoto [this message]
2008-05-17 19:16   ` Maciej W. Rozycki
2008-05-18 16:10     ` Atsushi Nemoto
2008-05-20 19:51       ` Maciej W. Rozycki
2008-05-20 20:03         ` Andrew Morton
2008-05-20 20:30           ` Maciej W. Rozycki
2008-05-21  0:56         ` Atsushi Nemoto

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080518.000242.41199304.anemo@mba.ocn.ne.jp \
    --to=anemo@mba.ocn.ne.jp \
    --cc=a.zummo@towertech.it \
    --cc=akpm@linux-foundation.org \
    --cc=hvr@gnu.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@linux-mips.org \
    --cc=macro@linux-mips.org \
    --cc=rtc-linux@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®