aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c/busses/i2c-omap.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/i2c/busses/i2c-omap.c')
-rw-r--r--drivers/i2c/busses/i2c-omap.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
index 7c409606f20c..0ca50e71731b 100644
--- a/drivers/i2c/busses/i2c-omap.c
+++ b/drivers/i2c/busses/i2c-omap.c
@@ -192,7 +192,6 @@ struct omap_i2c_dev {
192 void (*set_mpu_wkup_lat)(struct device *dev, 192 void (*set_mpu_wkup_lat)(struct device *dev,
193 long latency); 193 long latency);
194 u32 speed; /* Speed of bus in kHz */ 194 u32 speed; /* Speed of bus in kHz */
195 u32 dtrev; /* extra revision from DT */
196 u32 flags; 195 u32 flags;
197 u16 cmd_err; 196 u16 cmd_err;
198 u8 *buf; 197 u8 *buf;
@@ -1075,7 +1074,7 @@ omap_i2c_probe(struct platform_device *pdev)
1075 int irq; 1074 int irq;
1076 int r; 1075 int r;
1077 u32 rev; 1076 u32 rev;
1078 u16 minor, major; 1077 u16 minor, major, scheme;
1079 1078
1080 /* NOTE: driver uses the static register mapping */ 1079 /* NOTE: driver uses the static register mapping */
1081 mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); 1080 mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
@@ -1107,7 +1106,6 @@ omap_i2c_probe(struct platform_device *pdev)
1107 u32 freq = 100000; /* default to 100000 Hz */ 1106 u32 freq = 100000; /* default to 100000 Hz */
1108 1107
1109 pdata = match->data; 1108 pdata = match->data;
1110 dev->dtrev = pdata->rev;
1111 dev->flags = pdata->flags; 1109 dev->flags = pdata->flags;
1112 1110
1113 of_property_read_u32(node, "clock-frequency", &freq); 1111 of_property_read_u32(node, "clock-frequency", &freq);
@@ -1117,7 +1115,6 @@ omap_i2c_probe(struct platform_device *pdev)
1117 dev->speed = pdata->clkrate; 1115 dev->speed = pdata->clkrate;
1118 dev->flags = pdata->flags; 1116 dev->flags = pdata->flags;
1119 dev->set_mpu_wkup_lat = pdata->set_mpu_wkup_lat; 1117 dev->set_mpu_wkup_lat = pdata->set_mpu_wkup_lat;
1120 dev->dtrev = pdata->rev;
1121 } 1118 }
1122 1119
1123 dev->pins = devm_pinctrl_get_select_default(&pdev->dev); 1120 dev->pins = devm_pinctrl_get_select_default(&pdev->dev);
@@ -1156,7 +1153,8 @@ omap_i2c_probe(struct platform_device *pdev)
1156 */ 1153 */
1157 rev = __raw_readw(dev->base + 0x04); 1154 rev = __raw_readw(dev->base + 0x04);
1158 1155
1159 switch (OMAP_I2C_SCHEME(rev)) { 1156 scheme = OMAP_I2C_SCHEME(rev);
1157 switch (scheme) {
1160 case OMAP_I2C_SCHEME_0: 1158 case OMAP_I2C_SCHEME_0:
1161 dev->regs = (u8 *)reg_map_ip_v1; 1159 dev->regs = (u8 *)reg_map_ip_v1;
1162 dev->rev = omap_i2c_read_reg(dev, OMAP_I2C_REV_REG); 1160 dev->rev = omap_i2c_read_reg(dev, OMAP_I2C_REV_REG);
@@ -1241,8 +1239,8 @@ omap_i2c_probe(struct platform_device *pdev)
1241 goto err_unuse_clocks; 1239 goto err_unuse_clocks;
1242 } 1240 }
1243 1241
1244 dev_info(dev->dev, "bus %d rev%d.%d.%d at %d kHz\n", adap->nr, 1242 dev_info(dev->dev, "bus %d rev%d.%d at %d kHz\n", adap->nr,
1245 dev->dtrev, major, minor, dev->speed); 1243 major, minor, dev->speed);
1246 1244
1247 of_i2c_register_devices(adap); 1245 of_i2c_register_devices(adap);
1248 1246