linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] i2c-mpc: suppress I2C device probing
@ 2008-07-17 10:37 Wolfgang Grandegger
  2008-07-17 18:02 ` Grant Likely
  0 siblings, 1 reply; 7+ messages in thread
From: Wolfgang Grandegger @ 2008-07-17 10:37 UTC (permalink / raw)
  To: Linuxppc-dev; +Cc: Jean Delvare

This patch suppresses I2C device probing by clearing the class field
of the "struct i2c_adapter" for the MPC I2C bus adapters. Some board
configurations which rely on probing must be fixed up by adding a
proper I2C device node to the DTS file, like the TQM85xx modules.

Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
---
 drivers/i2c/busses/i2c-mpc.c |    1 -
 1 file changed, 1 deletion(-)

Index: powerpc/drivers/i2c/busses/i2c-mpc.c
===================================================================
--- powerpc.orig/drivers/i2c/busses/i2c-mpc.c
+++ powerpc/drivers/i2c/busses/i2c-mpc.c
@@ -312,7 +312,6 @@ static struct i2c_adapter mpc_ops = {
 	.name = "MPC adapter",
 	.id = I2C_HW_MPC107,
 	.algo = &mpc_algo,
-	.class = I2C_CLASS_HWMON | I2C_CLASS_SPD,
 	.timeout = 1,
 };
 

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

* Re: [PATCH] i2c-mpc: suppress I2C device probing
  2008-07-17 10:37 [PATCH] i2c-mpc: suppress I2C device probing Wolfgang Grandegger
@ 2008-07-17 18:02 ` Grant Likely
  2008-08-07  8:21   ` Jean Delvare
  0 siblings, 1 reply; 7+ messages in thread
From: Grant Likely @ 2008-07-17 18:02 UTC (permalink / raw)
  To: Wolfgang Grandegger; +Cc: Jean Delvare, Linuxppc-dev

On Thu, Jul 17, 2008 at 4:37 AM, Wolfgang Grandegger <wg@grandegger.com> wrote:
> This patch suppresses I2C device probing by clearing the class field
> of the "struct i2c_adapter" for the MPC I2C bus adapters. Some board
> configurations which rely on probing must be fixed up by adding a
> proper I2C device node to the DTS file, like the TQM85xx modules.
>
> Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
Acked-by: Grant Likely <grant.likely@secretlab.ca>

> ---
> drivers/i2c/busses/i2c-mpc.c |    1 -
> 1 file changed, 1 deletion(-)
>
> Index: powerpc/drivers/i2c/busses/i2c-mpc.c
> ===================================================================
> --- powerpc.orig/drivers/i2c/busses/i2c-mpc.c
> +++ powerpc/drivers/i2c/busses/i2c-mpc.c
> @@ -312,7 +312,6 @@ static struct i2c_adapter mpc_ops = {
>        .name = "MPC adapter",
>        .id = I2C_HW_MPC107,
>        .algo = &mpc_algo,
> -       .class = I2C_CLASS_HWMON | I2C_CLASS_SPD,
>        .timeout = 1,
> };
>
>



-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.

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

* Re: [PATCH] i2c-mpc: suppress I2C device probing
  2008-07-17 18:02 ` Grant Likely
@ 2008-08-07  8:21   ` Jean Delvare
  2008-08-07 10:20     ` Wolfgang Grandegger
  0 siblings, 1 reply; 7+ messages in thread
From: Jean Delvare @ 2008-08-07  8:21 UTC (permalink / raw)
  To: Grant Likely; +Cc: Linuxppc-dev

Hi Grant, Wolgang,

On Thu, 17 Jul 2008 12:02:50 -0600, Grant Likely wrote:
> On Thu, Jul 17, 2008 at 4:37 AM, Wolfgang Grandegger <wg@grandegger.com> wrote:
> > This patch suppresses I2C device probing by clearing the class field
> > of the "struct i2c_adapter" for the MPC I2C bus adapters. Some board
> > configurations which rely on probing must be fixed up by adding a
> > proper I2C device node to the DTS file, like the TQM85xx modules.
> >
> > Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
> Acked-by: Grant Likely <grant.likely@secretlab.ca>
> 
> > ---
> > drivers/i2c/busses/i2c-mpc.c |    1 -
> > 1 file changed, 1 deletion(-)
> >
> > Index: powerpc/drivers/i2c/busses/i2c-mpc.c
> > ===================================================================
> > --- powerpc.orig/drivers/i2c/busses/i2c-mpc.c
> > +++ powerpc/drivers/i2c/busses/i2c-mpc.c
> > @@ -312,7 +312,6 @@ static struct i2c_adapter mpc_ops = {
> >        .name = "MPC adapter",
> >        .id = I2C_HW_MPC107,
> >        .algo = &mpc_algo,
> > -       .class = I2C_CLASS_HWMON | I2C_CLASS_SPD,
> >        .timeout = 1,
> > };

Unless you intend to push this patch upstream yourself (through the ppc
tree), you should send it to Ben Dooks (who is in charge of this part
of the i2c subsystem) with Cc to the i2c list.

-- 
Jean Delvare

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

* Re: [PATCH] i2c-mpc: suppress I2C device probing
  2008-08-07  8:21   ` Jean Delvare
@ 2008-08-07 10:20     ` Wolfgang Grandegger
  2008-08-07 10:50       ` Jochen Friedrich
  0 siblings, 1 reply; 7+ messages in thread
From: Wolfgang Grandegger @ 2008-08-07 10:20 UTC (permalink / raw)
  To: Jean Delvare; +Cc: Linuxppc-dev

Jean Delvare wrote:
> Hi Grant, Wolgang,
> 
> On Thu, 17 Jul 2008 12:02:50 -0600, Grant Likely wrote:
>> On Thu, Jul 17, 2008 at 4:37 AM, Wolfgang Grandegger <wg@grandegger.com> wrote:
>>> This patch suppresses I2C device probing by clearing the class field
>>> of the "struct i2c_adapter" for the MPC I2C bus adapters. Some board
>>> configurations which rely on probing must be fixed up by adding a
>>> proper I2C device node to the DTS file, like the TQM85xx modules.
>>>
>>> Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
>> Acked-by: Grant Likely <grant.likely@secretlab.ca>
>>
>>> ---
>>> drivers/i2c/busses/i2c-mpc.c |    1 -
>>> 1 file changed, 1 deletion(-)
>>>
>>> Index: powerpc/drivers/i2c/busses/i2c-mpc.c
>>> ===================================================================
>>> --- powerpc.orig/drivers/i2c/busses/i2c-mpc.c
>>> +++ powerpc/drivers/i2c/busses/i2c-mpc.c
>>> @@ -312,7 +312,6 @@ static struct i2c_adapter mpc_ops = {
>>>        .name = "MPC adapter",
>>>        .id = I2C_HW_MPC107,
>>>        .algo = &mpc_algo,
>>> -       .class = I2C_CLASS_HWMON | I2C_CLASS_SPD,
>>>        .timeout = 1,
>>> };
> 
> Unless you intend to push this patch upstream yourself (through the ppc
> tree), you should send it to Ben Dooks (who is in charge of this part
> of the i2c subsystem) with Cc to the i2c list.

I just want to mention, that other I2 bus drivers set I2C_CLASS_HWMON as well. 
Here are the PowerPC related ones:

  $ grep I2C_CLASS_HWMON *
  i2c-cpm.c:	.class		= I2C_CLASS_HWMON | I2C_CLASS_SPD,
  i2c-mpc.c:	.class = I2C_CLASS_HWMON | I2C_CLASS_SPD,
  i2c-ibm_iic.c:	adap->class = I2C_CLASS_HWMON | I2C_CLASS_SPD;
  i2c-pasemi.c:	smbus->adapter.class = I2C_CLASS_HWMON | I2C_CLASS_SPD;
  i2c-mv64xxx.c:	drv_data->adapter.class = I2C_CLASS_HWMON | I2C_CLASS_SPD;

It would be consequent to remove them as well.

Wolfgang.

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

* Re: [PATCH] i2c-mpc: suppress I2C device probing
  2008-08-07 10:20     ` Wolfgang Grandegger
@ 2008-08-07 10:50       ` Jochen Friedrich
  2008-08-07 11:07         ` Jean Delvare
  0 siblings, 1 reply; 7+ messages in thread
From: Jochen Friedrich @ 2008-08-07 10:50 UTC (permalink / raw)
  To: Wolfgang Grandegger; +Cc: Jean Delvare, Linuxppc-dev

Hi Wolfgang,

>   $ grep I2C_CLASS_HWMON *
>   i2c-cpm.c:	.class		= I2C_CLASS_HWMON | I2C_CLASS_SPD,
>   i2c-mpc.c:	.class = I2C_CLASS_HWMON | I2C_CLASS_SPD,
>   i2c-ibm_iic.c:	adap->class = I2C_CLASS_HWMON | I2C_CLASS_SPD;
>   i2c-pasemi.c:	smbus->adapter.class = I2C_CLASS_HWMON | I2C_CLASS_SPD;
>   i2c-mv64xxx.c:	drv_data->adapter.class = I2C_CLASS_HWMON | I2C_CLASS_SPD;
> 
> It would be consequent to remove them as well.

ACK for the i2c-cpm part.

Thanks,
Jochen

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

* Re: [PATCH] i2c-mpc: suppress I2C device probing
  2008-08-07 10:50       ` Jochen Friedrich
@ 2008-08-07 11:07         ` Jean Delvare
  2008-08-07 14:33           ` Grant Likely
  0 siblings, 1 reply; 7+ messages in thread
From: Jean Delvare @ 2008-08-07 11:07 UTC (permalink / raw)
  To: Jochen Friedrich; +Cc: Linuxppc-dev

On Thu, 07 Aug 2008 12:50:11 +0200, Jochen Friedrich wrote:
> Hi Wolfgang,
> 
> >   $ grep I2C_CLASS_HWMON *
> >   i2c-cpm.c:	.class		= I2C_CLASS_HWMON | I2C_CLASS_SPD,
> >   i2c-mpc.c:	.class = I2C_CLASS_HWMON | I2C_CLASS_SPD,
> >   i2c-ibm_iic.c:	adap->class = I2C_CLASS_HWMON | I2C_CLASS_SPD;
> >   i2c-pasemi.c:	smbus->adapter.class = I2C_CLASS_HWMON | I2C_CLASS_SPD;
> >   i2c-mv64xxx.c:	drv_data->adapter.class = I2C_CLASS_HWMON | I2C_CLASS_SPD;
> > 
> > It would be consequent to remove them as well.
> 
> ACK for the i2c-cpm part.

No objection on my side. It's really up to each platform to choose the
way they want to handle i2c device creation, and stick to it.

As I understand it, the removal of the adapter class needs to be
synchronized with platform code changes. Thus it might make sense to
push these through their respective arch trees, rather than the i2c
tree.

-- 
Jean Delvare

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

* Re: [PATCH] i2c-mpc: suppress I2C device probing
  2008-08-07 11:07         ` Jean Delvare
@ 2008-08-07 14:33           ` Grant Likely
  0 siblings, 0 replies; 7+ messages in thread
From: Grant Likely @ 2008-08-07 14:33 UTC (permalink / raw)
  To: Jean Delvare; +Cc: Linuxppc-dev

On Thu, Aug 7, 2008 at 5:07 AM, Jean Delvare <khali@linux-fr.org> wrote:
> On Thu, 07 Aug 2008 12:50:11 +0200, Jochen Friedrich wrote:
>> Hi Wolfgang,
>>
>> >   $ grep I2C_CLASS_HWMON *
>> >   i2c-cpm.c:        .class          = I2C_CLASS_HWMON | I2C_CLASS_SPD,
>> >   i2c-mpc.c:        .class = I2C_CLASS_HWMON | I2C_CLASS_SPD,
>> >   i2c-ibm_iic.c:    adap->class = I2C_CLASS_HWMON | I2C_CLASS_SPD;
>> >   i2c-pasemi.c:     smbus->adapter.class = I2C_CLASS_HWMON | I2C_CLASS_SPD;
>> >   i2c-mv64xxx.c:    drv_data->adapter.class = I2C_CLASS_HWMON | I2C_CLASS_SPD;
>> >
>> > It would be consequent to remove them as well.
>>
>> ACK for the i2c-cpm part.
>
> No objection on my side. It's really up to each platform to choose the
> way they want to handle i2c device creation, and stick to it.
>
> As I understand it, the removal of the adapter class needs to be
> synchronized with platform code changes. Thus it might make sense to
> push these through their respective arch trees, rather than the i2c
> tree.

All right, I'm happy to pick these patches up if nobody objects.

g.

-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.

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

end of thread, other threads:[~2008-08-07 14:33 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-17 10:37 [PATCH] i2c-mpc: suppress I2C device probing Wolfgang Grandegger
2008-07-17 18:02 ` Grant Likely
2008-08-07  8:21   ` Jean Delvare
2008-08-07 10:20     ` Wolfgang Grandegger
2008-08-07 10:50       ` Jochen Friedrich
2008-08-07 11:07         ` Jean Delvare
2008-08-07 14:33           ` Grant Likely

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