From: Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>
To: Felipe Balbi
<felipebalbi-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
Cc: Linux I2C <i2c-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org>
Subject: Re: twl4030 module rewrite
Date: Fri, 11 Jul 2008 12:01:07 +0200 [thread overview]
Message-ID: <20080711120107.6a719943@hyperion.delvare> (raw)
In-Reply-To: <31e679430807110216n4ee1c42dy4c5d6e49926f90f3-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
Hi Felipe,
On Fri, 11 Jul 2008 12:16:23 +0300, Felipe Balbi wrote:
> Hello all,
>
> twl4030 is the power management chip for omap3-based boards, its
> driver can be found in [1].
>
> My question is:
>
> twl4030 provides 4 addresses for different functions using the same
> i2c bus. Which means that one client driver would have to handle 4
> clients.
>
> Putting all the addresses in i2c_board_info would be enough for that
> driver to be called 4 times or should I rely in the driver been called
> only one and iterate to initialize all 4 clients ?
>
> [1] http://git.kernel.org/?p=linux/kernel/git/tmlind/linux-omap-2.6.git;a=blob;f=drivers/i2c/chips/twl4030-core.c;h=adc45d4a98b97254999d9cc3bbc739962d727a27;hb=7786cd7a00ae0b18923185789380a88052f4eee7
If you want the same driver to handle all 4 addresses, and you want
them to show as a single device, then the usual way to handle this
would be to have a single address declared in i2c_board_info, and have
the driver itself call i2c_new_dummy() 3 times to request the 3
additional addresses during device probe.
The alternative, if the 4 addresses are really used for different,
unrelated functions, is to declare each one separately in
i2c_board_info, leading to separate devices and possibly separate
drivers. It really depends on how related the functions are, and
whether each function may also be available separately in a different
chip. Without knowing the details of how the chip works, I can't tell.
--
Jean Delvare
_______________________________________________
i2c mailing list
i2c-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org
http://lists.lm-sensors.org/mailman/listinfo/i2c
next prev parent reply other threads:[~2008-07-11 10:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-11 9:16 twl4030 module rewrite Felipe Balbi
[not found] ` <31e679430807110216n4ee1c42dy4c5d6e49926f90f3-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-07-11 10:01 ` Jean Delvare [this message]
[not found] ` <20080711120107.6a719943-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
2008-07-11 10:38 ` Felipe Balbi
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=20080711120107.6a719943@hyperion.delvare \
--to=khali-puyad+kwke1g9huczpvpmw@public.gmane.org \
--cc=felipebalbi-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@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