* [PATCH] i2c: i2c-ibm_iic message can be confusing
@ 2009-02-02 17:01 Sean MacLennan
2009-02-02 17:29 ` Jean Delvare
2009-04-18 0:36 ` Sean MacLennan
0 siblings, 2 replies; 6+ messages in thread
From: Sean MacLennan @ 2009-02-02 17:01 UTC (permalink / raw)
To: linuxppc-dev, Jean Delvare, ben-linux
This is a trivial patch that does not need to be in 2.6.29. While
tracking down an EEPROM problem, I found the messages confusing... it
looked like the EEPROM was being started before the I2C driver!
Here is an example:
at24 0-0052: 512 byte 24c04 EEPROM (writable)
ibm-iic ef600700.i2c: using standard (100 kHz) mode
ad7414 0-004a: chip found
It looks like the at24 starts first, then the i2c driver, then the
ad7414. By moving the message to after the of scan, we always get the
driver, then the devices.
Cheers,
Sean
Print the i2c driver message before scanning for devices so that the
logs show the driver, then the devices. Currently you can get
device(s), driver, device(s).
Signed-off-by: Sean MacLennan <smaclennan@pikatech.com>
---
diff --git a/drivers/i2c/busses/i2c-ibm_iic.c b/drivers/i2c/busses/i2c-ibm_iic.c
index 88f0db7..7fc0729 100644
--- a/drivers/i2c/busses/i2c-ibm_iic.c
+++ b/drivers/i2c/busses/i2c-ibm_iic.c
@@ -756,12 +756,12 @@ static int __devinit iic_probe(struct of_device *ofdev,
goto error_cleanup;
}
- /* Now register all the child nodes */
- of_register_i2c_devices(adap, np);
-
dev_info(&ofdev->dev, "using %s mode\n",
dev->fast_mode ? "fast (400 kHz)" : "standard (100 kHz)");
+ /* Now register all the child nodes */
+ of_register_i2c_devices(adap, np);
+
return 0;
error_cleanup:
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] i2c: i2c-ibm_iic message can be confusing
2009-02-02 17:01 [PATCH] i2c: i2c-ibm_iic message can be confusing Sean MacLennan
@ 2009-02-02 17:29 ` Jean Delvare
2009-02-04 3:55 ` Benjamin Herrenschmidt
2009-04-18 0:36 ` Sean MacLennan
1 sibling, 1 reply; 6+ messages in thread
From: Jean Delvare @ 2009-02-02 17:29 UTC (permalink / raw)
To: Sean MacLennan; +Cc: linuxppc-dev, ben-linux
On Mon, 2 Feb 2009 12:01:59 -0500, Sean MacLennan wrote:
> This is a trivial patch that does not need to be in 2.6.29. While
> tracking down an EEPROM problem, I found the messages confusing... it
> looked like the EEPROM was being started before the I2C driver!
>
> Here is an example:
>
> at24 0-0052: 512 byte 24c04 EEPROM (writable)
> ibm-iic ef600700.i2c: using standard (100 kHz) mode
> ad7414 0-004a: chip found
>
> It looks like the at24 starts first, then the i2c driver, then the
> ad7414. By moving the message to after the of scan, we always get the
> driver, then the devices.
>
> Cheers,
> Sean
>
> Print the i2c driver message before scanning for devices so that the
> logs show the driver, then the devices. Currently you can get
> device(s), driver, device(s).
>
> Signed-off-by: Sean MacLennan <smaclennan@pikatech.com>
> ---
> diff --git a/drivers/i2c/busses/i2c-ibm_iic.c b/drivers/i2c/busses/i2c-ibm_iic.c
> index 88f0db7..7fc0729 100644
> --- a/drivers/i2c/busses/i2c-ibm_iic.c
> +++ b/drivers/i2c/busses/i2c-ibm_iic.c
> @@ -756,12 +756,12 @@ static int __devinit iic_probe(struct of_device *ofdev,
> goto error_cleanup;
> }
>
> - /* Now register all the child nodes */
> - of_register_i2c_devices(adap, np);
> -
> dev_info(&ofdev->dev, "using %s mode\n",
> dev->fast_mode ? "fast (400 kHz)" : "standard (100 kHz)");
>
> + /* Now register all the child nodes */
> + of_register_i2c_devices(adap, np);
> +
> return 0;
>
> error_cleanup:
Indeed.
Acked-by: Jean Delvare <khali@linux-fr.org>
--
Jean Delvare
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] i2c: i2c-ibm_iic message can be confusing
2009-02-02 17:29 ` Jean Delvare
@ 2009-02-04 3:55 ` Benjamin Herrenschmidt
2009-02-04 7:36 ` Jean Delvare
0 siblings, 1 reply; 6+ messages in thread
From: Benjamin Herrenschmidt @ 2009-02-04 3:55 UTC (permalink / raw)
To: Jean Delvare; +Cc: linuxppc-dev, ben-linux, Sean MacLennan
> Acked-by: Jean Delvare <khali@linux-fr.org>
Jean, you'll take that in your tree or should I take it in mine ?
Cheers,
Ben.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] i2c: i2c-ibm_iic message can be confusing
2009-02-04 3:55 ` Benjamin Herrenschmidt
@ 2009-02-04 7:36 ` Jean Delvare
0 siblings, 0 replies; 6+ messages in thread
From: Jean Delvare @ 2009-02-04 7:36 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: linuxppc-dev, ben-linux, Sean MacLennan
Hi Ben,
On Wed, 04 Feb 2009 14:55:33 +1100, Benjamin Herrenschmidt wrote:
>
> > Acked-by: Jean Delvare <khali@linux-fr.org>
>
> Jean, you'll take that in your tree or should I take it in mine ?
No, I'm not taking it, i2c-ibm_iic is under Ben Dooks' jurisdiction. So
it's up to either him or you.
--
Jean Delvare
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] i2c: i2c-ibm_iic message can be confusing
2009-02-02 17:01 [PATCH] i2c: i2c-ibm_iic message can be confusing Sean MacLennan
2009-02-02 17:29 ` Jean Delvare
@ 2009-04-18 0:36 ` Sean MacLennan
2009-04-24 13:10 ` Josh Boyer
1 sibling, 1 reply; 6+ messages in thread
From: Sean MacLennan @ 2009-04-18 0:36 UTC (permalink / raw)
To: ben-linux; +Cc: Jean Delvare, linuxppc-dev
Any update on the status of this patch? This patch was acked by Jean.
The patchwork entry is http://patchwork.ozlabs.org/patch/21576/ and the
original patch message is below.
Cheers,
Sean
On Mon, 2 Feb 2009 12:01:59 -0500
Sean MacLennan <smaclennan@pikatech.com> wrote:
> This is a trivial patch that does not need to be in 2.6.29. While
> tracking down an EEPROM problem, I found the messages confusing... it
> looked like the EEPROM was being started before the I2C driver!
>
> Here is an example:
>
> at24 0-0052: 512 byte 24c04 EEPROM (writable)
> ibm-iic ef600700.i2c: using standard (100 kHz) mode
> ad7414 0-004a: chip found
>
> It looks like the at24 starts first, then the i2c driver, then the
> ad7414. By moving the message to after the of scan, we always get the
> driver, then the devices.
>
> Cheers,
> Sean
>
> Print the i2c driver message before scanning for devices so that the
> logs show the driver, then the devices. Currently you can get
> device(s), driver, device(s).
>
> Signed-off-by: Sean MacLennan <smaclennan@pikatech.com>
> ---
> diff --git a/drivers/i2c/busses/i2c-ibm_iic.c
> b/drivers/i2c/busses/i2c-ibm_iic.c index 88f0db7..7fc0729 100644
> --- a/drivers/i2c/busses/i2c-ibm_iic.c
> +++ b/drivers/i2c/busses/i2c-ibm_iic.c
> @@ -756,12 +756,12 @@ static int __devinit iic_probe(struct of_device
> *ofdev, goto error_cleanup;
> }
>
> - /* Now register all the child nodes */
> - of_register_i2c_devices(adap, np);
> -
> dev_info(&ofdev->dev, "using %s mode\n",
> dev->fast_mode ? "fast (400 kHz)" : "standard (100
> kHz)");
> + /* Now register all the child nodes */
> + of_register_i2c_devices(adap, np);
> +
> return 0;
>
> error_cleanup:
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] i2c: i2c-ibm_iic message can be confusing
2009-04-18 0:36 ` Sean MacLennan
@ 2009-04-24 13:10 ` Josh Boyer
0 siblings, 0 replies; 6+ messages in thread
From: Josh Boyer @ 2009-04-24 13:10 UTC (permalink / raw)
To: Sean MacLennan; +Cc: Jean Delvare, linuxppc-dev, ben-linux
On Fri, Apr 17, 2009 at 08:36:00PM -0400, Sean MacLennan wrote:
>Any update on the status of this patch? This patch was acked by Jean.
>
>The patchwork entry is http://patchwork.ozlabs.org/patch/21576/ and the
>original patch message is below.
Yeah, that's a bit annoying. A case of too many trees again.
Ben,
Do you want to take this through your tree or should I take it through the
powerpc tree? I'll be up-front and say silence will translate to 'powerpc tree'
josh
>
>Cheers,
> Sean
>
>On Mon, 2 Feb 2009 12:01:59 -0500
>Sean MacLennan <smaclennan@pikatech.com> wrote:
>
>> This is a trivial patch that does not need to be in 2.6.29. While
>> tracking down an EEPROM problem, I found the messages confusing... it
>> looked like the EEPROM was being started before the I2C driver!
>>
>> Here is an example:
>>
>> at24 0-0052: 512 byte 24c04 EEPROM (writable)
>> ibm-iic ef600700.i2c: using standard (100 kHz) mode
>> ad7414 0-004a: chip found
>>
>> It looks like the at24 starts first, then the i2c driver, then the
>> ad7414. By moving the message to after the of scan, we always get the
>> driver, then the devices.
>>
>> Cheers,
>> Sean
>>
>> Print the i2c driver message before scanning for devices so that the
>> logs show the driver, then the devices. Currently you can get
>> device(s), driver, device(s).
>>
>> Signed-off-by: Sean MacLennan <smaclennan@pikatech.com>
>> ---
>> diff --git a/drivers/i2c/busses/i2c-ibm_iic.c
>> b/drivers/i2c/busses/i2c-ibm_iic.c index 88f0db7..7fc0729 100644
>> --- a/drivers/i2c/busses/i2c-ibm_iic.c
>> +++ b/drivers/i2c/busses/i2c-ibm_iic.c
>> @@ -756,12 +756,12 @@ static int __devinit iic_probe(struct of_device
>> *ofdev, goto error_cleanup;
>> }
>>
>> - /* Now register all the child nodes */
>> - of_register_i2c_devices(adap, np);
>> -
>> dev_info(&ofdev->dev, "using %s mode\n",
>> dev->fast_mode ? "fast (400 kHz)" : "standard (100
>> kHz)");
>> + /* Now register all the child nodes */
>> + of_register_i2c_devices(adap, np);
>> +
>> return 0;
>>
>> error_cleanup:
>>
>_______________________________________________
>Linuxppc-dev mailing list
>Linuxppc-dev@ozlabs.org
>https://ozlabs.org/mailman/listinfo/linuxppc-dev
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2009-04-24 13:11 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-02 17:01 [PATCH] i2c: i2c-ibm_iic message can be confusing Sean MacLennan
2009-02-02 17:29 ` Jean Delvare
2009-02-04 3:55 ` Benjamin Herrenschmidt
2009-02-04 7:36 ` Jean Delvare
2009-04-18 0:36 ` Sean MacLennan
2009-04-24 13:10 ` Josh Boyer
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).