From: Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>
To: Yang Shi <yang.shi-CWA4WttNNZF54TAoqtyWWQ@public.gmane.org>
Cc: Michael Lawnick <ml.lawnick-Mmb7MZpHnFY@public.gmane.org>,
Wolfram Sang <w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>,
ddaney-M3mlKVOIwJVv6pq1l3V1OdBPR1lH4CV8@public.gmane.org,
ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org,
ralf-6z/3iImG2C8G8FEW9MqTrA@public.gmane.org,
linux-mips-6z/3iImG2C8G8FEW9MqTrA@public.gmane.org,
linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Konstantin Lazarev
<klazarev-rphTv4pjVZMJGwgDXS7ZQA@public.gmane.org>
Subject: Re: [PATCH] MIPS: Octeon: Register EEPROM device on the I2C bus
Date: Fri, 5 Mar 2010 11:52:13 +0100 [thread overview]
Message-ID: <20100305115213.4b504710@hyperion.delvare> (raw)
In-Reply-To: <4B90DF48.50005-CWA4WttNNZF54TAoqtyWWQ@public.gmane.org>
On Fri, 05 Mar 2010 18:39:04 +0800, Yang Shi wrote:
> Hi guys,
>
> Thanks for you guys kind advice. I think I find the cause. I coded a
> wrong eeprom type, "at24" can't work here, it should be "24c64". It
> works with AT24 eeprom driver, but I'm not sure if this is the right type.
Actually, "at24" can work but you have to provide extra parameters
detailing the size, page size etc. of the EEPROM. All the "24cXX" names
are shortcuts with predefined sizes.
>
> So, a possible correct to the patch is that:
>
> +{
> + I2C_BOARD_INFO("24c64",·0x50),
> +},
Well, what EEPROM type do you have exactly? 24c64 is for 64 kbit (8
kByte) EEPROMs using 16-bit addressing. You must use the correct type,
otherwise the at24 driver will misbehave. I am a little surprised
because originally you went for "eeprom" which is not compatible with
"24c64" (8-bit vs. 16-bit addressing).
Also note that you may want to provide specific page size if you have
tight control over what hardware is used and you intend to write to the
EEPROM on a regular basis. The driver defaults to safe but slow
settings.
OTOH, if you do _not_ want to write to the EEPROM, you want to provide
the AT24_FLAG_READONLY flag.
--
Jean Delvare
next prev parent reply other threads:[~2010-03-05 10:52 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-05 7:08 [PATCH] MIPS: Octeon: Register EEPROM device on the I2C bus Yang Shi
[not found] ` <1267772895-25409-1-git-send-email-yang.shi-CWA4WttNNZF54TAoqtyWWQ@public.gmane.org>
2010-03-05 7:11 ` Wolfram Sang
[not found] ` <20100305071130.GB21925-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2010-03-05 7:31 ` Yang Shi
[not found] ` <4B90B341.9000601-CWA4WttNNZF54TAoqtyWWQ@public.gmane.org>
2010-03-05 7:41 ` Wolfram Sang
[not found] ` <20100305074155.GD21925-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2010-03-05 7:53 ` Yang Shi
[not found] ` <4B90B888.6060005-CWA4WttNNZF54TAoqtyWWQ@public.gmane.org>
2010-03-05 8:50 ` Jean Delvare
[not found] ` <20100305095040.6ab4612c-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
2010-03-05 10:09 ` Michael Lawnick
[not found] ` <4B90D85E.6040308-Mmb7MZpHnFY@public.gmane.org>
2010-03-05 10:39 ` Yang Shi
[not found] ` <4B90DF48.50005-CWA4WttNNZF54TAoqtyWWQ@public.gmane.org>
2010-03-05 10:52 ` Jean Delvare [this message]
[not found] ` <4B90E83A.5020106@gmx.de>
[not found] ` <4B90E83A.5020106-Mmb7MZpHnFY@public.gmane.org>
2010-03-05 11:42 ` Jean Delvare
[not found] ` <20100305124200.6f6eccfc-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
2010-03-05 12:15 ` Michael Lawnick
2010-03-08 4:43 ` Yang Shi
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=20100305115213.4b504710@hyperion.delvare \
--to=khali-puyad+kwke1g9huczpvpmw@public.gmane.org \
--cc=ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org \
--cc=ddaney-M3mlKVOIwJVv6pq1l3V1OdBPR1lH4CV8@public.gmane.org \
--cc=klazarev-rphTv4pjVZMJGwgDXS7ZQA@public.gmane.org \
--cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-mips-6z/3iImG2C8G8FEW9MqTrA@public.gmane.org \
--cc=ml.lawnick-Mmb7MZpHnFY@public.gmane.org \
--cc=ralf-6z/3iImG2C8G8FEW9MqTrA@public.gmane.org \
--cc=w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org \
--cc=yang.shi-CWA4WttNNZF54TAoqtyWWQ@public.gmane.org \
/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;
as well as URLs for NNTP newsgroup(s).