From: Vincent Palatin <vpala...@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 <vpala...@chromium.org>
Reviewed-by: Olof Johansson <ol...@chromium.org>
Tested-by: Vincent Palatin <vpala...@chromium.org>
Reviewed-by: Doug Anderson <diand...@chromium.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

--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to