]> xenbits.xensource.com Git - people/aperard/linux-chromebook.git/commitdiff
CHROMIUM: i2c: samsung: do not put a default class for the adapter
authorVincent Palatin <vpalatin@chromium.org>
Wed, 30 Jan 2013 19:06:04 +0000 (11:06 -0800)
committerChromeBot <chrome-bot@google.com>
Tue, 5 Feb 2013 07:03:07 +0000 (23:03 -0800)
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>
BUG=chrome-os-partner:16725
TEST=emerge-daisy_spring chromeos-kernel
On spring, run with LM90 driver compiled and do not see timeout at
startup on non-functional busses

Change-Id: Iacdba3846c59f605224ff61f5b7c605828486db3
Reviewed-on: https://gerrit.chromium.org/gerrit/42480
Reviewed-by: Olof Johansson <olofj@chromium.org>
Tested-by: Vincent Palatin <vpalatin@chromium.org>
Commit-Queue: Vincent Palatin <vpalatin@chromium.org>

drivers/i2c/busses/i2c-s3c2410.c

index 74332fd1ce4b85104ca2a0eaef20772130a1bb35..b7f1ab6b635d9f4f2f9c5a2cd734e74b99af09ca 100644 (file)
@@ -1179,7 +1179,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);