linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] omap-i2c: fix incorrect log message when using a device tree
@ 2012-08-31 11:02 Florian Vaussard
  2012-08-31 12:36 ` Benoit Cousson
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Florian Vaussard @ 2012-08-31 11:02 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA,
	linux-omap-u79uwXL29TY76Z2rM5mHXA, Ben Dooks, Wolfram Sang,
	Benoit Cousson, Florian Vaussard, Philippe Rétornaz

When booting using a device tree, the adapter number is dynamically
assigned after the log message is sent.
This patch modifies the log message to get a correct adapter id.

Applies on 3.6-rc3. Tested on OMAP3 (Gumstix Overo).

Signed-off-by: Florian Vaussard <florian.vaussard-p8DiymsW2f8@public.gmane.org>
---
 drivers/i2c/busses/i2c-omap.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
index 5d19a49..136b4fe 100644
--- a/drivers/i2c/busses/i2c-omap.c
+++ b/drivers/i2c/busses/i2c-omap.c
@@ -1064,9 +1064,6 @@ omap_i2c_probe(struct platform_device *pdev)
 		goto err_unuse_clocks;
 	}
 
-	dev_info(dev->dev, "bus %d rev%d.%d.%d at %d kHz\n", pdev->id,
-		 dev->dtrev, dev->rev >> 4, dev->rev & 0xf, dev->speed);
-
 	adap = &dev->adapter;
 	i2c_set_adapdata(adap, dev);
 	adap->owner = THIS_MODULE;
@@ -1084,6 +1081,9 @@ omap_i2c_probe(struct platform_device *pdev)
 		goto err_free_irq;
 	}
 
+	dev_info(dev->dev, "bus %d rev%d.%d.%d at %d kHz\n", adap->nr,
+		 dev->dtrev, dev->rev >> 4, dev->rev & 0xf, dev->speed);
+
 	of_i2c_register_devices(adap);
 
 	pm_runtime_put(dev->dev);
-- 
1.7.5.4

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

* Re: [PATCH] omap-i2c: fix incorrect log message when using a device tree
  2012-08-31 11:02 [PATCH] omap-i2c: fix incorrect log message when using a device tree Florian Vaussard
@ 2012-08-31 12:36 ` Benoit Cousson
       [not found]   ` <5040AFCC.5060004-l0cyMroinI0@public.gmane.org>
  2012-09-11  9:28 ` Shubhrajyoti
       [not found] ` <1346410975-29930-1-git-send-email-florian.vaussard-p8DiymsW2f8@public.gmane.org>
  2 siblings, 1 reply; 5+ messages in thread
From: Benoit Cousson @ 2012-08-31 12:36 UTC (permalink / raw)
  To: Florian Vaussard
  Cc: Tony Lindgren, linux-i2c, linux-omap, Ben Dooks, Wolfram Sang,
	Philippe Rétornaz

On 08/31/2012 01:02 PM, Florian Vaussard wrote:
> When booting using a device tree, the adapter number is dynamically
> assigned after the log message is sent.
> This patch modifies the log message to get a correct adapter id.
> 
> Applies on 3.6-rc3. Tested on OMAP3 (Gumstix Overo).

Thanks for the fix. Tested successfully on OMAP4 SDP DT boot as well.

[    0.000000] Linux version 3.6.0-rc3-00030-g491038d (bcousson@lnwes3201) (gcc version 4.5.2 (Sourcery G++ Lite 2011.03-41) ) #6 SMP Fri Aug 31 13:50:48 CEST 2012
[    0.000000] CPU: ARMv7 Processor [411fc092] revision 2 (ARMv7), cr=10c53c7d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] Machine: Generic OMAP4 (Flattened Device Tree), model: TI OMAP4 SDP board
...
[    0.667205] omap_i2c i2c.15: bus 0 rev2.4.0 at 400 kHz
...
[    0.768341] omap_i2c i2c.16: bus 1 rev2.4.0 at 400 kHz
[    0.783905] omap_i2c i2c.17: bus 2 rev2.4.0 at 400 kHz
[    0.799530] omap_i2c i2c.18: bus 3 rev2.4.0 at 400 kHz


> Signed-off-by: Florian Vaussard <florian.vaussard@epfl.ch>

Tested-by: Benoit Cousson <b-cousson@ti.com>
and
Acked-by: Benoit Cousson <b-cousson@ti.com>

Regards,
Benoit


> ---
>  drivers/i2c/busses/i2c-omap.c |    6 +++---
>  1 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
> index 5d19a49..136b4fe 100644
> --- a/drivers/i2c/busses/i2c-omap.c
> +++ b/drivers/i2c/busses/i2c-omap.c
> @@ -1064,9 +1064,6 @@ omap_i2c_probe(struct platform_device *pdev)
>  		goto err_unuse_clocks;
>  	}
>  
> -	dev_info(dev->dev, "bus %d rev%d.%d.%d at %d kHz\n", pdev->id,
> -		 dev->dtrev, dev->rev >> 4, dev->rev & 0xf, dev->speed);
> -
>  	adap = &dev->adapter;
>  	i2c_set_adapdata(adap, dev);
>  	adap->owner = THIS_MODULE;
> @@ -1084,6 +1081,9 @@ omap_i2c_probe(struct platform_device *pdev)
>  		goto err_free_irq;
>  	}
>  
> +	dev_info(dev->dev, "bus %d rev%d.%d.%d at %d kHz\n", adap->nr,
> +		 dev->dtrev, dev->rev >> 4, dev->rev & 0xf, dev->speed);
> +
>  	of_i2c_register_devices(adap);
>  
>  	pm_runtime_put(dev->dev);
> 


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

* Re: [PATCH] omap-i2c: fix incorrect log message when using a device tree
       [not found]   ` <5040AFCC.5060004-l0cyMroinI0@public.gmane.org>
@ 2012-09-11  7:01     ` Florian Vaussard
  0 siblings, 0 replies; 5+ messages in thread
From: Florian Vaussard @ 2012-09-11  7:01 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: Benoit Cousson, Tony Lindgren, linux-i2c-u79uwXL29TY76Z2rM5mHXA,
	linux-omap-u79uwXL29TY76Z2rM5mHXA, Ben Dooks,
	Philippe Rétornaz

Hello Wolfram,

>> When booting using a device tree, the adapter number is dynamically
>> assigned after the log message is sent.
>> This patch modifies the log message to get a correct adapter id.
>>
>> Applies on 3.6-rc3. Tested on OMAP3 (Gumstix Overo).
>
> Thanks for the fix. Tested successfully on OMAP4 SDP DT boot as well.
>
> [    0.000000] Linux version 3.6.0-rc3-00030-g491038d (bcousson@lnwes3201) (gcc version 4.5.2 (Sourcery G++ Lite 2011.03-41) ) #6 SMP Fri Aug 31 13:50:48 CEST 2012
> [    0.000000] CPU: ARMv7 Processor [411fc092] revision 2 (ARMv7), cr=10c53c7d
> [    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
> [    0.000000] Machine: Generic OMAP4 (Flattened Device Tree), model: TI OMAP4 SDP board
> ...
> [    0.667205] omap_i2c i2c.15: bus 0 rev2.4.0 at 400 kHz
> ...
> [    0.768341] omap_i2c i2c.16: bus 1 rev2.4.0 at 400 kHz
> [    0.783905] omap_i2c i2c.17: bus 2 rev2.4.0 at 400 kHz
> [    0.799530] omap_i2c i2c.18: bus 3 rev2.4.0 at 400 kHz
>
>
>> Signed-off-by: Florian Vaussard <florian.vaussard-p8DiymsW2f8@public.gmane.org>
>
> Tested-by: Benoit Cousson <b-cousson-l0cyMroinI0@public.gmane.org>
> and
> Acked-by: Benoit Cousson <b-cousson-l0cyMroinI0@public.gmane.org>
>
> Regards,
> Benoit
>

Was this patch picked-up by the i2c-embedded subsystem?

Thank you.

Regards,
Florian

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

* Re: [PATCH] omap-i2c: fix incorrect log message when using a device tree
  2012-08-31 11:02 [PATCH] omap-i2c: fix incorrect log message when using a device tree Florian Vaussard
  2012-08-31 12:36 ` Benoit Cousson
@ 2012-09-11  9:28 ` Shubhrajyoti
       [not found] ` <1346410975-29930-1-git-send-email-florian.vaussard-p8DiymsW2f8@public.gmane.org>
  2 siblings, 0 replies; 5+ messages in thread
From: Shubhrajyoti @ 2012-09-11  9:28 UTC (permalink / raw)
  To: Florian Vaussard
  Cc: Tony Lindgren, linux-i2c, linux-omap, Ben Dooks, Wolfram Sang,
	Benoit Cousson, Philippe Rétornaz

On Friday 31 August 2012 04:32 PM, Florian Vaussard wrote:
> When booting using a device tree, the adapter number is dynamically
> assigned after the log message is sent.
> This patch modifies the log message to get a correct adapter id.
>
> Applies on 3.6-rc3. Tested on OMAP3 (Gumstix Overo).
>
> Signed-off-by: Florian Vaussard <florian.vaussard@epfl.ch>
Looks good to me.

Acked-by: Shubhrajyoti D <shubhrajyoti@ti.com>
> ---
>  drivers/i2c/busses/i2c-omap.c |    6 +++---
>  1 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
> index 5d19a49..136b4fe 100644
> --- a/drivers/i2c/busses/i2c-omap.c
> +++ b/drivers/i2c/busses/i2c-omap.c
> @@ -1064,9 +1064,6 @@ omap_i2c_probe(struct platform_device *pdev)
>  		goto err_unuse_clocks;
>  	}
>  
> -	dev_info(dev->dev, "bus %d rev%d.%d.%d at %d kHz\n", pdev->id,
> -		 dev->dtrev, dev->rev >> 4, dev->rev & 0xf, dev->speed);
> -
>  	adap = &dev->adapter;
>  	i2c_set_adapdata(adap, dev);
>  	adap->owner = THIS_MODULE;
> @@ -1084,6 +1081,9 @@ omap_i2c_probe(struct platform_device *pdev)
>  		goto err_free_irq;
>  	}
>  
> +	dev_info(dev->dev, "bus %d rev%d.%d.%d at %d kHz\n", adap->nr,
> +		 dev->dtrev, dev->rev >> 4, dev->rev & 0xf, dev->speed);
> +
>  	of_i2c_register_devices(adap);
>  
>  	pm_runtime_put(dev->dev);


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

* Re: [PATCH] omap-i2c: fix incorrect log message when using a device tree
       [not found] ` <1346410975-29930-1-git-send-email-florian.vaussard-p8DiymsW2f8@public.gmane.org>
@ 2012-09-12 13:55   ` Wolfram Sang
  0 siblings, 0 replies; 5+ messages in thread
From: Wolfram Sang @ 2012-09-12 13:55 UTC (permalink / raw)
  To: Florian Vaussard
  Cc: Tony Lindgren, linux-i2c-u79uwXL29TY76Z2rM5mHXA,
	linux-omap-u79uwXL29TY76Z2rM5mHXA, Ben Dooks, Benoit Cousson,
	Philippe Rétornaz

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

On Fri, Aug 31, 2012 at 01:02:55PM +0200, Florian Vaussard wrote:
> When booting using a device tree, the adapter number is dynamically
> assigned after the log message is sent.
> This patch modifies the log message to get a correct adapter id.
> 
> Applies on 3.6-rc3. Tested on OMAP3 (Gumstix Overo).
> 
> Signed-off-by: Florian Vaussard <florian.vaussard-p8DiymsW2f8@public.gmane.org>

Pushed to -next, thanks.

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

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

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

end of thread, other threads:[~2012-09-12 13:55 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-31 11:02 [PATCH] omap-i2c: fix incorrect log message when using a device tree Florian Vaussard
2012-08-31 12:36 ` Benoit Cousson
     [not found]   ` <5040AFCC.5060004-l0cyMroinI0@public.gmane.org>
2012-09-11  7:01     ` Florian Vaussard
2012-09-11  9:28 ` Shubhrajyoti
     [not found] ` <1346410975-29930-1-git-send-email-florian.vaussard-p8DiymsW2f8@public.gmane.org>
2012-09-12 13:55   ` Wolfram Sang

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