public inbox for linux-i2c@vger.kernel.org
 help / color / mirror / Atom feed
From: Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>
To: David Brownell <david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org>
Cc: i2c-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org
Subject: Re: [PATCH v3] New-style I2C and SMBus EEPROM driver (with device_ids)
Date: Wed, 11 Jun 2008 09:02:56 +0200	[thread overview]
Message-ID: <20080611090256.30031c79@hyperion.delvare> (raw)
In-Reply-To: <200806101402.44392.david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org>

Hi David,

On Tue, 10 Jun 2008 14:02:44 -0700, David Brownell wrote:
> On Sunday 08 June 2008, Jean Delvare wrote:
> > You're going to quite some extent to obfuscate simple things ;) All
> > these defines are for the sole internal purpose of the at24 driver
> > (custom eeprom types would use platform data instead) and should
> > not be in the public header file... if they should defined at all.
> 
> The original notion was to get the driver out of the business of
> holding a large table of device parameters including worst-case
> pagesizes (e.g. Microchip pages being half or a quarter the size
> of Atmel pages) and address consumption (e.g. Atmel 24c01 vs 24c01a,
> or the SOT23 versions doing who-knows-undocumented-what).
> 
> So I think those #defines are somewhat a legacy of having had to
> change direction mid-steam to cope with the new "i2c_device_id"
> and its expectation that drivers *would* have such large tables
> with worst-case parameters.
> 
> Just so you know.  :)

I understand the history behind the code.

Having only dealt with read-only EEPROMs so far, I wasn't aware that
different incarnations of otherwise compatible EEPROMs could have
different page sizes. This is indeed a problem. If you think that this
makes default types useless, then I am fine not having such default
types (meaning that platform data would be mandatory, except for SPD
EEPROMs.) But then you wouldn't include arbitrary example platform data
structures either, contrary to what your original proposal did.

That being said... If almost compatible EEPROMs can be used in a
hardware design, differing only by the write page size, can the
platform code author, in practice, really assume a page size greater
than the minimum? That would assume the same specific incarnation of the
EEPROM is always used. Is is common to have such a certainty? I think
that our decision whether to have default definitions in the driver,
depends on the answer to this question (and you'll know better than me.)

-- 
Jean Delvare

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

  parent reply	other threads:[~2008-06-11  7:02 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-05 19:31 [PATCH v3] New-style I2C and SMBus EEPROM driver (with device_ids) Wolfram Sang
     [not found] ` <20080605193103.GA13062-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2008-06-08  9:50   ` Jean Delvare
     [not found]     ` <20080608115033.5dd91786-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
2008-06-10 13:43       ` Wolfram Sang
     [not found]         ` <20080610134347.GA4210-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2008-06-10 16:54           ` Jean Delvare
     [not found]             ` <20080610185443.14a4516e-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
2008-06-11  7:33               ` Wolfram Sang
     [not found]                 ` <20080611073323.GA4257-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2008-06-11  9:09                   ` Jean Delvare
     [not found]                     ` <20080611110921.5bf770dd-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
2008-06-11 16:49                       ` David Brownell
2008-06-10 21:02       ` David Brownell
     [not found]         ` <200806101402.44392.david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org>
2008-06-11  7:02           ` Jean Delvare [this message]
     [not found]             ` <20080611090256.30031c79-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
2008-06-11 17:25               ` David Brownell
     [not found]                 ` <200806111025.08951.david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org>
2008-06-11 19:41                   ` Jean Delvare
     [not found]                     ` <20080611214135.090ea690-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
2008-06-12 21:17                       ` David Brownell
     [not found]                         ` <200806121417.51446.david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org>
2008-06-13  8:16                           ` Jean Delvare
     [not found]                             ` <20080613101644.6333fcff-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
2008-07-01 13:20                               ` Wolfram Sang
     [not found]                                 ` <20080701132050.GA3836-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2008-07-01 14:28                                   ` Jean Delvare
2008-06-08  9:53   ` Jean Delvare

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=20080611090256.30031c79@hyperion.delvare \
    --to=khali-puyad+kwke1g9huczpvpmw@public.gmane.org \
    --cc=david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org \
    --cc=i2c-GZX6beZjE8VD60Wz+7aTrA@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