aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTushar Behera <tushar.behera@linaro.org>2012-04-12 08:49:51 +0530
committerTushar Behera <tushar.behera@linaro.org>2012-04-18 13:14:09 +0530
commit286bcb19934c3b0f982e608bd914754c28e83c1c (patch)
treec75624593033b2ff6215aa7742259a8a5cd3ad71
parent271420b94610a9f7c63ee346fb2f2f36c792c2d4 (diff)
drivers: i2c: s3c2410: Add DT related fixes for HDMIPHY controllertracking-samslt-hdmi-3.4-rc3-2012.04-0
Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
-rw-r--r--drivers/i2c/busses/i2c-s3c2410.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/drivers/i2c/busses/i2c-s3c2410.c b/drivers/i2c/busses/i2c-s3c2410.c
index 9f0b785a4795..22f7b32238db 100644
--- a/drivers/i2c/busses/i2c-s3c2410.c
+++ b/drivers/i2c/busses/i2c-s3c2410.c
@@ -103,8 +103,10 @@ static inline int s3c24xx_i2c_is2440(struct s3c24xx_i2c *i2c)
#ifdef CONFIG_OF
if (i2c->dev->of_node)
- return of_device_is_compatible(i2c->dev->of_node,
- "samsung,s3c2440-i2c");
+ return (of_device_is_compatible(i2c->dev->of_node,
+ "samsung,s3c2440-i2c") ||
+ of_device_is_compatible(i2c->dev->of_node,
+ "samsung,s3c2440-hdmiphy-i2c"));
#endif
type = platform_get_device_id(pdev)->driver_data;
@@ -121,6 +123,12 @@ static inline int s3c24xx_i2c_is2440_hdmiphy(struct s3c24xx_i2c *i2c)
struct platform_device *pdev = to_platform_device(i2c->dev);
enum s3c24xx_i2c_type type;
+#ifdef CONFIG_OF
+ if (i2c->dev->of_node)
+ return of_device_is_compatible(i2c->dev->of_node,
+ "samsung,s3c2440-hdmiphy-i2c");
+#endif
+
type = platform_get_device_id(pdev)->driver_data;
return type == TYPE_S3C2440_HDMIPHY;
}
@@ -1159,6 +1167,7 @@ MODULE_DEVICE_TABLE(platform, s3c24xx_driver_ids);
static const struct of_device_id s3c24xx_i2c_match[] = {
{ .compatible = "samsung,s3c2410-i2c" },
{ .compatible = "samsung,s3c2440-i2c" },
+ { .compatible = "samsung,s3c2440-hdmiphy-i2c" },
{},
};
MODULE_DEVICE_TABLE(of, s3c24xx_i2c_match);