public inbox for linux-i2c@vger.kernel.org
 help / color / mirror / Atom feed
* PCF8563 doesn't pass validation check
@ 2008-07-02  9:34 Laurent Pinchart
       [not found] ` <200807021134.59668.laurentp-BSmb2szPELAwsLKNixborgC/G2K4zDHf@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Laurent Pinchart @ 2008-07-02  9:34 UTC (permalink / raw)
  To: rtc-linux-/JYPxA39Uh5TLH3MbocFFw
  Cc: a.zummo-BfzFCNDTiLLj+vYz1yj4TQ, i2c-GZX6beZjE8VD60Wz+7aTrA


[-- Attachment #1.1: Type: text/plain, Size: 914 bytes --]

Hi everybody,

I'm having issues with the PCF8563 RTC chip.

The Linux driver tries to validate the chip by checking if the BCD-coded time and date registers contain valid values.

When a low voltage condition is detected, the registers are not guaranteed to contain valid values. Experimentation showed that while the seconds, minutes, hours and day of the week registers didn't cause any issue, the months register could get out of the 01-12 range.

Has anyone experienced the same issue ? Would it be acceptable to remove the months register check ?

I've contacted NXP to get more information about what the chip guarantees and what it doesn't. I haven't had any answer yet but I expect them to tell me there is no guarantee at all.

Best regards,

-- 
Laurent Pinchart
CSE Semaphore Belgium

Chaussee de Bruxelles, 732A
B-1410 Waterloo
Belgium

T +32 (2) 387 42 59
F +32 (2) 387 42 75

[-- Attachment #1.2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

[-- Attachment #2: Type: text/plain, Size: 157 bytes --]

_______________________________________________
i2c mailing list
i2c-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org
http://lists.lm-sensors.org/mailman/listinfo/i2c

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: PCF8563 doesn't pass validation check
       [not found] ` <200807021134.59668.laurentp-BSmb2szPELAwsLKNixborgC/G2K4zDHf@public.gmane.org>
@ 2008-07-02 11:10   ` Jean Delvare
       [not found]     ` <20080702131020.28e1979a-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Jean Delvare @ 2008-07-02 11:10 UTC (permalink / raw)
  To: Laurent Pinchart
  Cc: a.zummo-BfzFCNDTiLLj+vYz1yj4TQ, i2c-GZX6beZjE8VD60Wz+7aTrA,
	rtc-linux-/JYPxA39Uh5TLH3MbocFFw, Rod Whitby

Hi Laurent,

On Wed, 2 Jul 2008 11:34:55 +0200, Laurent Pinchart wrote:
> I'm having issues with the PCF8563 RTC chip.
> 
> The Linux driver tries to validate the chip by checking if the
> BCD-coded time and date registers contain valid values.
> 
> When a low voltage condition is detected, the registers are not
> guaranteed to contain valid values. Experimentation showed that
> while the seconds, minutes, hours and day of the week registers
> didn't cause any issue, the months register could get out of the
> 01-12 range.
> 
> Has anyone experienced the same issue ?

This issue sounds familiar, I think Alessandro mentioned it to me a few
weeks ago in private already.

> Would it be acceptable to remove the months register check ?

I think you should convert rtc-pcf8563 to a new-style i2c driver. Then
the whole validation function becomes pointless and you can delete it.
I guess that the PCF8563 chip is used in embedded designs with platform
code to instantiate the I2C devices as needed, so it should work fine.
Apparently some IXP4xx platforms already expect rtc-pcf8563 to be a
new-style i2c driver... I'm curious if some ARM people have already
converted the driver. Rod?

> I've contacted NXP to get more information about what the chip
> guarantees and what it doesn't. I haven't had any answer yet but
> I expect them to tell me there is no guarantee at all.

-- 
Jean Delvare

_______________________________________________
i2c mailing list
i2c-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org
http://lists.lm-sensors.org/mailman/listinfo/i2c

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: PCF8563 doesn't pass validation check
       [not found]     ` <20080702131020.28e1979a-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
@ 2008-07-02 11:17       ` Laurent Pinchart
       [not found]         ` <200807021317.50944.laurentp-BSmb2szPELAwsLKNixborgC/G2K4zDHf@public.gmane.org>
  2008-07-02 11:21       ` Rod Whitby
  1 sibling, 1 reply; 5+ messages in thread
From: Laurent Pinchart @ 2008-07-02 11:17 UTC (permalink / raw)
  To: Jean Delvare
  Cc: a.zummo-BfzFCNDTiLLj+vYz1yj4TQ, i2c-GZX6beZjE8VD60Wz+7aTrA,
	rtc-linux-/JYPxA39Uh5TLH3MbocFFw, Rod Whitby


[-- Attachment #1.1: Type: text/plain, Size: 1724 bytes --]

On Wednesday 02 July 2008, Jean Delvare wrote:
> Hi Laurent,
> 
> On Wed, 2 Jul 2008 11:34:55 +0200, Laurent Pinchart wrote:
> > I'm having issues with the PCF8563 RTC chip.
> > 
> > The Linux driver tries to validate the chip by checking if the
> > BCD-coded time and date registers contain valid values.
> > 
> > When a low voltage condition is detected, the registers are not
> > guaranteed to contain valid values. Experimentation showed that
> > while the seconds, minutes, hours and day of the week registers
> > didn't cause any issue, the months register could get out of the
> > 01-12 range.
> > 
> > Has anyone experienced the same issue ?
> 
> This issue sounds familiar, I think Alessandro mentioned it to me a few
> weeks ago in private already.
> 
> > Would it be acceptable to remove the months register check ?
> 
> I think you should convert rtc-pcf8563 to a new-style i2c driver. Then
> the whole validation function becomes pointless and you can delete it.
> I guess that the PCF8563 chip is used in embedded designs with platform
> code to instantiate the I2C devices as needed, so it should work fine.
> Apparently some IXP4xx platforms already expect rtc-pcf8563 to be a
> new-style i2c driver... I'm curious if some ARM people have already
> converted the driver. Rod?

Isn't rtc-pcf8563 a new-style i2c driver already ?

> > I've contacted NXP to get more information about what the chip
> > guarantees and what it doesn't. I haven't had any answer yet but
> > I expect them to tell me there is no guarantee at all.

-- 
Laurent Pinchart
CSE Semaphore Belgium

Chaussee de Bruxelles, 732A
B-1410 Waterloo
Belgium

T +32 (2) 387 42 59
F +32 (2) 387 42 75

[-- Attachment #1.2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

[-- Attachment #2: Type: text/plain, Size: 157 bytes --]

_______________________________________________
i2c mailing list
i2c-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org
http://lists.lm-sensors.org/mailman/listinfo/i2c

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: PCF8563 doesn't pass validation check
       [not found]     ` <20080702131020.28e1979a-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
  2008-07-02 11:17       ` Laurent Pinchart
@ 2008-07-02 11:21       ` Rod Whitby
  1 sibling, 0 replies; 5+ messages in thread
From: Rod Whitby @ 2008-07-02 11:21 UTC (permalink / raw)
  To: Jean Delvare
  Cc: a.zummo-BfzFCNDTiLLj+vYz1yj4TQ, i2c-GZX6beZjE8VD60Wz+7aTrA,
	rtc-linux-/JYPxA39Uh5TLH3MbocFFw

Jean Delvare wrote:
> I think you should convert rtc-pcf8563 to a new-style i2c driver. Then
> the whole validation function becomes pointless and you can delete it.
> I guess that the PCF8563 chip is used in embedded designs with platform
> code to instantiate the I2C devices as needed, so it should work fine.
> Apparently some IXP4xx platforms already expect rtc-pcf8563 to be a
> new-style i2c driver... I'm curious if some ARM people have already
> converted the driver. Rod?

I believe this patch:

<http://svn.nslu2-linux.org/svnroot/kernel/trunk/patches/2.6.25/rtc-pcf8563-new-style.patch>

was merged as:

<http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=e5fc9cc0266e5babcf84c81908ec8843b7e3349f>

-- Rod

_______________________________________________
i2c mailing list
i2c-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org
http://lists.lm-sensors.org/mailman/listinfo/i2c

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: PCF8563 doesn't pass validation check
       [not found]         ` <200807021317.50944.laurentp-BSmb2szPELAwsLKNixborgC/G2K4zDHf@public.gmane.org>
@ 2008-07-02 11:25           ` Jean Delvare
  0 siblings, 0 replies; 5+ messages in thread
From: Jean Delvare @ 2008-07-02 11:25 UTC (permalink / raw)
  To: Laurent Pinchart
  Cc: a.zummo-BfzFCNDTiLLj+vYz1yj4TQ, i2c-GZX6beZjE8VD60Wz+7aTrA,
	rtc-linux-/JYPxA39Uh5TLH3MbocFFw, Rod Whitby

On Wed, 2 Jul 2008 13:17:48 +0200, Laurent Pinchart wrote:
> On Wednesday 02 July 2008, Jean Delvare wrote:
> > Hi Laurent,
> > 
> > On Wed, 2 Jul 2008 11:34:55 +0200, Laurent Pinchart wrote:
> > > I'm having issues with the PCF8563 RTC chip.
> > > 
> > > The Linux driver tries to validate the chip by checking if the
> > > BCD-coded time and date registers contain valid values.
> > > 
> > > When a low voltage condition is detected, the registers are not
> > > guaranteed to contain valid values. Experimentation showed that
> > > while the seconds, minutes, hours and day of the week registers
> > > didn't cause any issue, the months register could get out of the
> > > 01-12 range.
> > > 
> > > Has anyone experienced the same issue ?
> > 
> > This issue sounds familiar, I think Alessandro mentioned it to me a few
> > weeks ago in private already.
> > 
> > > Would it be acceptable to remove the months register check ?
> > 
> > I think you should convert rtc-pcf8563 to a new-style i2c driver. Then
> > the whole validation function becomes pointless and you can delete it.
> > I guess that the PCF8563 chip is used in embedded designs with platform
> > code to instantiate the I2C devices as needed, so it should work fine.
> > Apparently some IXP4xx platforms already expect rtc-pcf8563 to be a
> > new-style i2c driver... I'm curious if some ARM people have already
> > converted the driver. Rod?
> 
> Isn't rtc-pcf8563 a new-style i2c driver already ?

Oops. You're totally right. I was looking at kernel 2.6.25 instead
of .26-rc8, sorry.

So I'd say just go ahead and blast pcf8563_validate_client, it hardly
makes sense for a new-style driver. If the platform code says there's a
PCF8563 at a given address, it has to be there, no need to waste our
time checking.

-- 
Jean Delvare

_______________________________________________
i2c mailing list
i2c-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org
http://lists.lm-sensors.org/mailman/listinfo/i2c

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-07-02 11:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-02  9:34 PCF8563 doesn't pass validation check Laurent Pinchart
     [not found] ` <200807021134.59668.laurentp-BSmb2szPELAwsLKNixborgC/G2K4zDHf@public.gmane.org>
2008-07-02 11:10   ` Jean Delvare
     [not found]     ` <20080702131020.28e1979a-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
2008-07-02 11:17       ` Laurent Pinchart
     [not found]         ` <200807021317.50944.laurentp-BSmb2szPELAwsLKNixborgC/G2K4zDHf@public.gmane.org>
2008-07-02 11:25           ` Jean Delvare
2008-07-02 11:21       ` Rod Whitby

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox