* twl4030 module rewrite
@ 2008-07-11 9:16 Felipe Balbi
[not found] ` <31e679430807110216n4ee1c42dy4c5d6e49926f90f3-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Felipe Balbi @ 2008-07-11 9:16 UTC (permalink / raw)
To: Jean Delvare, Linux I2C
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
--
Best Regards,
Felipe Balbi
felipebalbi-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
_______________________________________________
i2c mailing list
i2c-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org
http://lists.lm-sensors.org/mailman/listinfo/i2c
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: twl4030 module rewrite
[not found] ` <31e679430807110216n4ee1c42dy4c5d6e49926f90f3-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2008-07-11 10:01 ` Jean Delvare
[not found] ` <20080711120107.6a719943-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Jean Delvare @ 2008-07-11 10:01 UTC (permalink / raw)
To: Felipe Balbi; +Cc: Linux I2C
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: twl4030 module rewrite
[not found] ` <20080711120107.6a719943-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
@ 2008-07-11 10:38 ` Felipe Balbi
0 siblings, 0 replies; 3+ messages in thread
From: Felipe Balbi @ 2008-07-11 10:38 UTC (permalink / raw)
To: Jean Delvare; +Cc: Linux I2C
Hi Jean,
On 7/11/08, Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org> wrote:
> 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.
Thanks for this pointer. So to clear my mind, in this time I'd have to
keep a list of all 4 i2c_client pointers because they'd have different
addresses (although it's the same adapter).
--
Best Regards,
Felipe Balbi
felipebalbi-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
_______________________________________________
i2c mailing list
i2c-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org
http://lists.lm-sensors.org/mailman/listinfo/i2c
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-07-11 10:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
[not found] ` <20080711120107.6a719943-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
2008-07-11 10:38 ` Felipe Balbi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox