Linux I2C development
 help / color / mirror / Atom feed
From: David Brownell <david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org>
To: Jon Smirl <jonsmirl-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Kevin Hilman
	<khilman-1D3HCaltpLuhEniVeURVKkEOCMrvLtNR@public.gmane.org>,
	i2c-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org
Subject: Re: Fwd: [PATCH 2/3] I2C: at24: add kernel interface for reading/writing EEPROM
Date: Tue, 26 Aug 2008 12:37:29 -0700	[thread overview]
Message-ID: <200808261237.29870.david-b@pacbell.net> (raw)
In-Reply-To: <9e4733910808252040j69b10ea8n1e3e40d16e86a3ae-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

On Monday 25 August 2008, Jon Smirl wrote:
> On 8/25/08, David Brownell <david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org> wrote:
> > My own comments on this:
> >
> >         - I'd like to see at24.c use something running before
> >           device_initcall, so suitably configured system can
> >           have drivers calling platform_device_probe() from
> >           their own initcalls and yet have access to the config
> >           data from the EEPROMs.
> >
> >         - Seems to me that "struct at24_iface" should be more
> >           generic ... the same notion works for SPI eeproms,
> >           NVRAM as found in RTCs, etc.
> >
> >  Comments?
> 
> Would it make sense to use bus notifiers to track the detection of a
> at24 chip? 

Not to me ... but then, I'm no fan of notifiers in such cases.
Some differences associated with these setup callbacks:
 
  - Notifiers would have to poke at the parameters to sort
    out (a) BUS_NOTIFY_BOUND_DRIVER (b) with a device bound
    to this specific driver, and in fact (c) which specific
    devices is involved, maybe platform_data pointer checks;
    and then (d) use some API that the driver exports, which
    implies (e) link-time dependencies.

  - setup() can be chip-specific, eliminating (a,b,c);

  - at24_iface just uses function pointers, eliminating (d,e).

Architecturally, the elimination of (d,e) seems significant;
but eliminating (a,b,c) is certainly convenient when writing
code to hook it all up!

- Dave

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

  parent reply	other threads:[~2008-08-26 19:37 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-26  2:41 Fwd: [PATCH 2/3] I2C: at24: add kernel interface for reading/writing EEPROM David Brownell
     [not found] ` <200808251941.54964.david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org>
2008-08-26  3:40   ` Jon Smirl
     [not found]     ` <9e4733910808252040j69b10ea8n1e3e40d16e86a3ae-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-08-26 19:37       ` David Brownell [this message]
     [not found]         ` <200808261237.29870.david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org>
2008-08-26 19:55           ` Jon Smirl
     [not found]             ` <9e4733910808261255v23b41f4dha3e345dc54529ca6-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-08-26 20:35               ` David Brownell
     [not found]                 ` <200808261335.36103.david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org>
2008-08-27  2:04                   ` Trent Piepho
     [not found]                     ` <Pine.LNX.4.58.0808261852580.2423-nuiHJn5p267P3RPoUHIrnuTW4wlIGRCZ@public.gmane.org>
2008-08-27  7:19                       ` David Brownell
     [not found]                         ` <200808270019.12987.david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org>
2008-08-27 13:40                           ` Jon Smirl
     [not found]                             ` <9e4733910808270640h2e5fb88fn46548d3630b7f45d-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-08-28 21:19                               ` David Brownell
     [not found]                                 ` <200808281419.47519.david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org>
2008-08-28 22:53                                   ` Jon Smirl

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=200808261237.29870.david-b@pacbell.net \
    --to=david-b-ybekhbn/0ldr7s880joybq@public.gmane.org \
    --cc=i2c-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org \
    --cc=jonsmirl-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=khilman-1D3HCaltpLuhEniVeURVKkEOCMrvLtNR@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