public inbox for linux-i2c@vger.kernel.org
 help / color / mirror / Atom feed
From: Wolfram Sang <w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
To: xiaojiang <jgq516-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 1/1] at24: add i2c_driver struct member for at24_driver, and reduce the priority of at24_init
Date: Tue, 21 Sep 2010 09:17:36 +0200	[thread overview]
Message-ID: <20100921071736.GC3168@pengutronix.de> (raw)
In-Reply-To: <AANLkTi=BtMXtSuetDe60QMsVi-5gBy+JGi7+1X+=v4UV-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 1504 bytes --]


>    Yes, we can't cover all the eeprom types, but I think people need
>    one example with all the function can be used. If somebody need use
>    at24.c for another eeprom, he only need to do the change
>    "s/at24/eeprom type", which maybe helpful to others. Anyway,
>    current code aren't work because of the lack of these members.

The instantiation of devices is described here:

Documentation/i2c/instantiating-devices

I'd think that would do to help people?

>      > 2. Since the at24 driver are tightly coupled with i2c bus
>      > driver, make � �sure it's init priority is lower than i2c bus.
> 
>      Can you describe a scenario where the current method fails?
> 
>    In my board, at24_init() is called before i2c-bus driver, because
>    the bus driver is initialized with module_init. But some i2c bus
>    used subsys_initcall to replace module_init, those i2c bus should
>    be ok without the change. I think only do one modification is
>    better than change all the i2c bus driver.

But they should still match, even if at24 comes first, no? Otherwise
there is a bug somewhere. (BTW changing i2c-bus-drivers to
subsys_initcall() looks better to me, too, because if there is something
like a PMIC or GPIOs connected to the bus, you usually want them early).

Regards,

   Wolfram

-- 
Pengutronix e.K.                           | Wolfram Sang                |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

  parent reply	other threads:[~2010-09-21  7:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-21  6:07 [PATCH 1/1] at24: add i2c_driver struct member for at24_driver, and reduce the priority of at24_init jgq516-Re5JQEeQqe8AvxtiuMwx3w
     [not found] ` <1285049243-17058-1-git-send-email-jgq516-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2010-09-21  6:38   ` Wolfram Sang
     [not found]     ` <AANLkTi=BtMXtSuetDe60QMsVi-5gBy+JGi7+1X+=v4UV@mail.gmail.com>
     [not found]       ` <AANLkTi=BtMXtSuetDe60QMsVi-5gBy+JGi7+1X+=v4UV-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-09-21  7:17         ` Wolfram Sang [this message]
2010-09-21  7:01   ` Jean Delvare
     [not found]     ` <AANLkTikY8Q2PzdufNVjY3VohQMThtzwtXSGWJhfcbedh@mail.gmail.com>
     [not found]       ` <AANLkTikY8Q2PzdufNVjY3VohQMThtzwtXSGWJhfcbedh-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-09-21  7:35         ` 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=20100921071736.GC3168@pengutronix.de \
    --to=w.sang-bicnvbalz9megne8c9+irq@public.gmane.org \
    --cc=jgq516-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@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