linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drivers: i2c-gpio: move initialization code subsys_initcall()
@ 2010-04-01 13:43 Marek Szyprowski
       [not found] ` <1270129399-30365-1-git-send-email-m.szyprowski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Marek Szyprowski @ 2010-04-01 13:43 UTC (permalink / raw)
  To: linux-i2c-u79uwXL29TY76Z2rM5mHXA, Ben Dooks
  Cc: m.szyprowski-Sze3O3UU22JBDgjK7y7TUQ,
	kyungmin.park-Sze3O3UU22JBDgjK7y7TUQ, Mark Brown

GPIO driven I2C bus can be used for controlling the PMIC chip. The example
of such configuration is Samsung Aquila board.

This patch moves initialization code subsys_initcall() to ensure that the i2c
bus is available early so the regulators can be quicly probed and available for
other devices on their probe() call.

Such solution has been proposed by Mark Brown to fix the problem of the
regulators not beeing available on the peripheral device probe():
http://lists.infradead.org/pipermail/linux-arm-kernel/2010-March/011971.html

CC: Mark Brown <broonie-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
Reviewed-by: Kyungmin Park <kyungmin.park-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
Signed-off-by: Marek Szyprowski <m.szyprowski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>

---
 drivers/i2c/busses/i2c-gpio.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/i2c/busses/i2c-gpio.c b/drivers/i2c/busses/i2c-gpio.c
index 32104ea..bb1a1a8 100644
--- a/drivers/i2c/busses/i2c-gpio.c
+++ b/drivers/i2c/busses/i2c-gpio.c
@@ -210,7 +210,7 @@ static int __init i2c_gpio_init(void)
 
 	return ret;
 }
-module_init(i2c_gpio_init);
+subsys_initcall(i2c_gpio_init);
 
 static void __exit i2c_gpio_exit(void)
 {
-- 
1.6.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] drivers: i2c-gpio: move initialization code subsys_initcall()
       [not found] ` <1270129399-30365-1-git-send-email-m.szyprowski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
@ 2010-04-01 13:49   ` Wolfram Sang
       [not found]     ` <20100401134917.GF24265-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Wolfram Sang @ 2010-04-01 13:49 UTC (permalink / raw)
  To: Marek Szyprowski
  Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA, Ben Dooks,
	kyungmin.park-Sze3O3UU22JBDgjK7y7TUQ, Mark Brown

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

On Thu, Apr 01, 2010 at 03:43:19PM +0200, Marek Szyprowski wrote:
> GPIO driven I2C bus can be used for controlling the PMIC chip. The example
> of such configuration is Samsung Aquila board.
> 
> This patch moves initialization code subsys_initcall() to ensure that the i2c
> bus is available early so the regulators can be quicly probed and available for

Minor: quickly

> other devices on their probe() call.
> 
> Such solution has been proposed by Mark Brown to fix the problem of the
> regulators not beeing available on the peripheral device probe():
> http://lists.infradead.org/pipermail/linux-arm-kernel/2010-March/011971.html
> 
> CC: Mark Brown <broonie-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
> Reviewed-by: Kyungmin Park <kyungmin.park-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
> Signed-off-by: Marek Szyprowski <m.szyprowski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>

Yup, a number of drivers do this:

Acked-by: Wolfram Sang <w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>

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

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] drivers: i2c-gpio: move initialization code subsys_initcall()
       [not found]     ` <20100401134917.GF24265-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
@ 2010-04-01 14:30       ` Jean Delvare
       [not found]         ` <20100401163018.5494f19b-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Jean Delvare @ 2010-04-01 14:30 UTC (permalink / raw)
  To: Marek Szyprowski
  Cc: Wolfram Sang, linux-i2c-u79uwXL29TY76Z2rM5mHXA, Ben Dooks,
	kyungmin.park-Sze3O3UU22JBDgjK7y7TUQ, Mark Brown

On Thu, 1 Apr 2010 15:49:18 +0200, Wolfram Sang wrote:
> On Thu, Apr 01, 2010 at 03:43:19PM +0200, Marek Szyprowski wrote:
> > GPIO driven I2C bus can be used for controlling the PMIC chip. The example
> > of such configuration is Samsung Aquila board.
> > 
> > This patch moves initialization code subsys_initcall() to ensure that the i2c
> > bus is available early so the regulators can be quicly probed and available for
> 
> Minor: quickly
> 
> > other devices on their probe() call.
> > 
> > Such solution has been proposed by Mark Brown to fix the problem of the
> > regulators not beeing available on the peripheral device probe():
> > http://lists.infradead.org/pipermail/linux-arm-kernel/2010-March/011971.html
> > 
> > CC: Mark Brown <broonie-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
> > Reviewed-by: Kyungmin Park <kyungmin.park-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
> > Signed-off-by: Marek Szyprowski <m.szyprowski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
> 
> Yup, a number of drivers do this:
> 
> Acked-by: Wolfram Sang <w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>

Applied, thanks. Is it desirable to have this patch in 2.6.34, or is
2.6.35 enough?

-- 
Jean Delvare

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: [PATCH] drivers: i2c-gpio: move initialization code subsys_initcall()
       [not found]         ` <20100401163018.5494f19b-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
@ 2010-04-06  6:49           ` Marek Szyprowski
  0 siblings, 0 replies; 4+ messages in thread
From: Marek Szyprowski @ 2010-04-06  6:49 UTC (permalink / raw)
  To: 'Jean Delvare'
  Cc: 'Wolfram Sang', linux-i2c-u79uwXL29TY76Z2rM5mHXA,
	'Ben Dooks', kyungmin.park-Sze3O3UU22JBDgjK7y7TUQ,
	'Mark Brown'

Hello,

On Thursday, April 01, 2010 4:30 PM Jean Delvare wrote:

> On Thu, 1 Apr 2010 15:49:18 +0200, Wolfram Sang wrote:
> > On Thu, Apr 01, 2010 at 03:43:19PM +0200, Marek Szyprowski wrote:
> > > GPIO driven I2C bus can be used for controlling the PMIC chip. The example
> > > of such configuration is Samsung Aquila board.
> > >
> > > This patch moves initialization code subsys_initcall() to ensure that the i2c
> > > bus is available early so the regulators can be quicly probed and available for
> >
> > Minor: quickly
> >
> > > other devices on their probe() call.
> > >
> > > Such solution has been proposed by Mark Brown to fix the problem of the
> > > regulators not beeing available on the peripheral device probe():
> > > http://lists.infradead.org/pipermail/linux-arm-kernel/2010-March/011971.html
> > >
> > > CC: Mark Brown <broonie-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
> > > Reviewed-by: Kyungmin Park <kyungmin.park-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
> > > Signed-off-by: Marek Szyprowski <m.szyprowski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
> >
> > Yup, a number of drivers do this:
> >
> > Acked-by: Wolfram Sang <w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
> 
> Applied, thanks. Is it desirable to have this patch in 2.6.34, or is
> 2.6.35 enough?

2.6.35 would be enough. Thanks :)

Best regards
--
Marek Szyprowski
Samsung Poland R&D Center

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-04-06  6:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-01 13:43 [PATCH] drivers: i2c-gpio: move initialization code subsys_initcall() Marek Szyprowski
     [not found] ` <1270129399-30365-1-git-send-email-m.szyprowski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2010-04-01 13:49   ` Wolfram Sang
     [not found]     ` <20100401134917.GF24265-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2010-04-01 14:30       ` Jean Delvare
     [not found]         ` <20100401163018.5494f19b-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
2010-04-06  6:49           ` Marek Szyprowski

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).