From: Anton Vorontsov <cbouatmailru@gmail.com>
To: Mitch Bradley <wmb@firmworks.com>
Cc: linuxppc-dev@ozlabs.org, devicetree-discuss@ozlabs.org
Subject: Re: [PATCH 2/2] powerpc: pcm030/032: add pagesize to dts
Date: Tue, 16 Nov 2010 00:24:32 +0300 [thread overview]
Message-ID: <20101115212432.GA17754@oksana.dev.rtsoft.ru> (raw)
In-Reply-To: <4CE1A0E4.5030505@firmworks.com>
On Mon, Nov 15, 2010 at 11:06:44AM -1000, Mitch Bradley wrote:
[...]
> >> eeprom@52 {
> >> compatible = "catalyst,24c32";
> >> reg =<0x52>;
> >>+ pagesize =<32>;
> >
> >I think you'd better drop the pagesize property altogether, and
> >instead make the compatible string more specific (if needed at
> >all. are there any 'catalyst,24c32' chips with pagesize != 32?)
>
> Microchip makes a 24c32 part that looks pretty similar to the
> catalyst part, but Microchip's has a 64-byte page size compared to
> Catalyst's 32.
Well, when using microchip part, the compatible string would be
"microchip,24c32", correct? Then we have all the information
already, no need for the pagesize.
> It would probably be feasible to have a generic I2C EEPROM driver
> that could handle many different parts, parameterized by total size,
> block size, and page size.
I guess it can do this already via I2C ID table. The problem
is that I2C core is only using part ID (no vendor ID matching).
So, the current driver may just implement quirks like this:
if (of_device_is_compatible(np, "catalyst,24c32"))
pagesize = 32;
Or, if it's some generic pattern, something like
if (of_device_is_compatible_vendor(np, "catalyst"))
pagesize /= 2;
Thanks,
--
Anton Vorontsov
email: cbouatmailru@gmail.com
irc://irc.freenode.net/bd2
next prev parent reply other threads:[~2010-11-15 21:24 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-15 17:25 [PATCH 1/2] misc: at24: parse OF-data, too Wolfram Sang
2010-11-15 17:25 ` [PATCH 2/2] powerpc: pcm030/032: add pagesize to dts Wolfram Sang
2010-11-15 17:32 ` Anton Vorontsov
2010-11-15 21:06 ` Mitch Bradley
2010-11-15 21:24 ` Anton Vorontsov [this message]
2010-11-15 21:58 ` Grant Likely
2010-11-15 22:17 ` Mitch Bradley
2010-11-15 22:30 ` David Gibson
2010-11-15 22:11 ` Wolfram Sang
2010-11-16 21:45 ` Wolfram Sang
2010-11-16 22:03 ` Anton Vorontsov
2010-11-15 21:41 ` [PATCH 1/2] misc: at24: parse OF-data, too Grant Likely
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=20101115212432.GA17754@oksana.dev.rtsoft.ru \
--to=cbouatmailru@gmail.com \
--cc=devicetree-discuss@ozlabs.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=wmb@firmworks.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;
as well as URLs for NNTP newsgroup(s).