linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] i2c: s3c2410: do not put a default class for the adapter
@ 2014-02-07  8:29 Naveen Krishna Chatradhi
  2014-02-15 15:10 ` Wolfram Sang
  0 siblings, 1 reply; 3+ messages in thread
From: Naveen Krishna Chatradhi @ 2014-02-07  8:29 UTC (permalink / raw)
  To: linux-i2c-u79uwXL29TY76Z2rM5mHXA
  Cc: linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA,
	naveenkrishna.ch-Re5JQEeQqe8AvxtiuMwx3w,
	wsa-z923LK4zBo2bacvFa/9K2g, ben-linux-elnMNo+KYs3YtjvyW6yDsg,
	cpgs-Sze3O3UU22JBDgjK7y7TUQ, broonie-DgEjT+Ai2ygdnm+yROfE0A,
	Vincent Palatin

From: Vincent Palatin <vpalatin-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>

Avoid adding I2C_CLASS_HWMON and I2C_CLASS_SPD class flags to all
Samsung I2C adapters when the I2C mappings are defined in a device tree.
So the drivers doing an auto-detection by probing busses won't mess-up
sensitive I2C devices or trigger long timeouts on non-functional busses.

Signed-off-by: Vincent Palatin <vpalatin-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
Reviewed-by: Olof Johansson <olofj-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
Tested-by: Vincent Palatin <vpalatin-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
Reviewed-by: Doug Anderson <dianders-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
---
 drivers/i2c/busses/i2c-s3c2410.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/i2c/busses/i2c-s3c2410.c b/drivers/i2c/busses/i2c-s3c2410.c
index 684d21e..63bc64c 100644
--- a/drivers/i2c/busses/i2c-s3c2410.c
+++ b/drivers/i2c/busses/i2c-s3c2410.c
@@ -1106,7 +1106,8 @@ static int s3c24xx_i2c_probe(struct platform_device *pdev)
 	i2c->adap.owner   = THIS_MODULE;
 	i2c->adap.algo    = &s3c24xx_i2c_algorithm;
 	i2c->adap.retries = 2;
-	i2c->adap.class   = I2C_CLASS_HWMON | I2C_CLASS_SPD;
+	if (!pdev->dev.of_node)
+		i2c->adap.class = I2C_CLASS_HWMON | I2C_CLASS_SPD;
 	i2c->tx_setup     = 50;
 
 	init_waitqueue_head(&i2c->wait);
-- 
1.7.9.5

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

* Re: [PATCH] i2c: s3c2410: do not put a default class for the adapter
  2014-02-07  8:29 [PATCH] i2c: s3c2410: do not put a default class for the adapter Naveen Krishna Chatradhi
@ 2014-02-15 15:10 ` Wolfram Sang
  2014-03-12 19:23   ` Wolfram Sang
  0 siblings, 1 reply; 3+ messages in thread
From: Wolfram Sang @ 2014-02-15 15:10 UTC (permalink / raw)
  To: Naveen Krishna Chatradhi
  Cc: linux-i2c, linux-samsung-soc, naveenkrishna.ch, ben-linux, cpgs,
	broonie, Vincent Palatin

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

On Fri, Feb 07, 2014 at 01:59:55PM +0530, Naveen Krishna Chatradhi wrote:
> From: Vincent Palatin <vpalatin@chromium.org>
> 
> Avoid adding I2C_CLASS_HWMON and I2C_CLASS_SPD class flags to all
> Samsung I2C adapters when the I2C mappings are defined in a device tree.
> So the drivers doing an auto-detection by probing busses won't mess-up
> sensitive I2C devices or trigger long timeouts on non-functional busses.
> 
> Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
> Reviewed-by: Olof Johansson <olofj@chromium.org>
> Tested-by: Vincent Palatin <vpalatin@chromium.org>
> Reviewed-by: Doug Anderson <dianders@chromium.org>

I'd prefer to drop it in favour of this series:

http://lkml.org/lkml/2014/2/10/836


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

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

* Re: [PATCH] i2c: s3c2410: do not put a default class for the adapter
  2014-02-15 15:10 ` Wolfram Sang
@ 2014-03-12 19:23   ` Wolfram Sang
  0 siblings, 0 replies; 3+ messages in thread
From: Wolfram Sang @ 2014-03-12 19:23 UTC (permalink / raw)
  To: Naveen Krishna Chatradhi
  Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA,
	linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA,
	naveenkrishna.ch-Re5JQEeQqe8AvxtiuMwx3w,
	ben-linux-elnMNo+KYs3YtjvyW6yDsg, cpgs-Sze3O3UU22JBDgjK7y7TUQ,
	broonie-DgEjT+Ai2ygdnm+yROfE0A, Vincent Palatin

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

On Sat, Feb 15, 2014 at 04:10:39PM +0100, Wolfram Sang wrote:
> On Fri, Feb 07, 2014 at 01:59:55PM +0530, Naveen Krishna Chatradhi wrote:
> > From: Vincent Palatin <vpalatin-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
> > 
> > Avoid adding I2C_CLASS_HWMON and I2C_CLASS_SPD class flags to all
> > Samsung I2C adapters when the I2C mappings are defined in a device tree.
> > So the drivers doing an auto-detection by probing busses won't mess-up
> > sensitive I2C devices or trigger long timeouts on non-functional busses.
> > 
> > Signed-off-by: Vincent Palatin <vpalatin-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
> > Reviewed-by: Olof Johansson <olofj-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
> > Tested-by: Vincent Palatin <vpalatin-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
> > Reviewed-by: Doug Anderson <dianders-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>

Your Signed-off was missing BTW.

> 
> I'd prefer to drop it in favour of this series:
> 
> http://lkml.org/lkml/2014/2/10/836
> 

I'll go ahead and apply my patch.


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

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

end of thread, other threads:[~2014-03-12 19:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-07  8:29 [PATCH] i2c: s3c2410: do not put a default class for the adapter Naveen Krishna Chatradhi
2014-02-15 15:10 ` Wolfram Sang
2014-03-12 19:23   ` 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).