From: "Jon Smirl" <jonsmirl-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: David Brownell <david-b-yBeKhBN/0LDR7s880joybQ@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: Mon, 25 Aug 2008 23:40:50 -0400 [thread overview]
Message-ID: <9e4733910808252040j69b10ea8n1e3e40d16e86a3ae@mail.gmail.com> (raw)
In-Reply-To: <200808251941.54964.david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org>
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? I have some MMC code in my tree that is using them.
+static int of_mmc_spi_notify(struct notifier_block *nb, unsigned long action,
+ void *_dev)
+{
+ struct device *dev = _dev;
+
+ switch (action) {
+ case BUS_NOTIFY_ADD_DEVICE:
+ return of_mmc_spi_add(dev);
+ case BUS_NOTIFY_DEL_DEVICE:
+ return of_mmc_spi_del(dev);
+ };
+ return NOTIFY_DONE;
+}
+
+static struct notifier_block of_mmc_spi_notifier = {
+ .notifier_call = of_mmc_spi_notify,
+};
+
--
Jon Smirl
jonsmirl-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
_______________________________________________
i2c mailing list
i2c-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org
http://lists.lm-sensors.org/mailman/listinfo/i2c
next prev parent reply other threads:[~2008-08-26 3:40 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 [this message]
[not found] ` <9e4733910808252040j69b10ea8n1e3e40d16e86a3ae-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-08-26 19:37 ` David Brownell
[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=9e4733910808252040j69b10ea8n1e3e40d16e86a3ae@mail.gmail.com \
--to=jonsmirl-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org \
--cc=i2c-GZX6beZjE8VD60Wz+7aTrA@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