linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: haojian.zhuang@gmail.com (Haojian Zhuang)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/4] mfd: update i2c driver for max8925
Date: Tue, 2 Feb 2010 09:22:58 -0500	[thread overview]
Message-ID: <771cded01002020622v7fa47689je2a5b1c11e2bb0c7@mail.gmail.com> (raw)
In-Reply-To: <20100129195405.GB23130@sortiz.org>

On Fri, Jan 29, 2010 at 2:54 PM, Samuel Ortiz <sameo@linux.intel.com> wrote:
> Hi Haojian,
>
> This has to be rewritten, but first let me try to understand something: You
> need the max9825 core to have pointers to the other i2c devices because of how
> it handles IRQs right ? In your max9825 irq handler you need to be able to
> access the rtc and the adc devices, right ? And then on yourrtc and power
> drivers, you actually only access the max8925 core i2c registers ?
> I would appreciate if most of your answers to those questions could morph into
> code comments to this probe routine.
>
> Then, about the code design: Having your probe routine relying on those static
> variable is not ok. If I undersand you correctly, what you trying to achieve
> here is not calling max8925_device_init() before you actually have the core,
> the i2c and the adc pointer setup ?
> If that's so, why not simply use i2c_new_dummy() instead of having to handle
> recursive calls of your probe routine ?
>

I wants to initialize max8925 after all three components probed. In
core driver, irq handling needs to access all three components. In
power supply driver, both adc and generic components are accessed.
It's the reason that using three i2c clients in one driver.

Yes, the code is not very clear. Now I use i2c_new_dummy() now. Now I
attache new patches now.

Updates are in below.
1. use i2c_new_dummy() to replace i2c_new_probed_device().
2. add onkey driver
3. remove unused i2c pointer in rtc driver

Thanks
Haojian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-mfd-update-i2c-driver-for-max8925.patch
Type: text/x-patch
Size: 3590 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20100202/ef1c8d48/attachment-0005.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-mfd-update-irq-handler-in-max8925.patch
Type: text/x-patch
Size: 29175 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20100202/ef1c8d48/attachment-0006.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-rtc-enable-rtc-in-max8925.patch
Type: text/x-patch
Size: 10219 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20100202/ef1c8d48/attachment-0007.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-power-enable-power-supply-of-max8925.patch
Type: text/x-patch
Size: 16348 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20100202/ef1c8d48/attachment-0008.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0005-input-enable-onkey-driver-of-max8925.patch
Type: text/x-patch
Size: 5956 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20100202/ef1c8d48/attachment-0009.bin>

  reply	other threads:[~2010-02-02 14:22 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-25 11:07 [PATCH 1/4] mfd: update i2c driver for max8925 Haojian Zhuang
2010-01-29 19:54 ` Samuel Ortiz
2010-02-02 14:22   ` Haojian Zhuang [this message]
2010-02-02 15:15     ` Samuel Ortiz
2010-02-03  1:44       ` Haojian Zhuang
2010-02-05  9:06     ` Samuel Ortiz

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=771cded01002020622v7fa47689je2a5b1c11e2bb0c7@mail.gmail.com \
    --to=haojian.zhuang@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).