summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQuinn Jensen <quinn.jensen@freescale.com>2007-05-24 18:12:17 -0600
committerQuinn Jensen <quinn.jensen@freescale.com>2007-05-24 18:12:17 -0600
commit6b6b4ef17f7d8d3c4535537005c40264862d8da2 (patch)
tree34afebad791aaf16c6a7240b0115ea26a9b7a897
parentd51235ee61ab27c87e3fefe39566d388ce25bd46 (diff)
CR ENGR00028553: Fixed i2c part of isp1301 usb transceiver code.
http://www.bitshrine.org/gpp/linux-2.6.19.2-mx-isp1301_i2c.patch
-rw-r--r--include/asm-arm/arch-mxc/isp1301.h31
1 files changed, 19 insertions, 12 deletions
diff --git a/include/asm-arm/arch-mxc/isp1301.h b/include/asm-arm/arch-mxc/isp1301.h
index 826f530e81dc..90c556a20d35 100644
--- a/include/asm-arm/arch-mxc/isp1301.h
+++ b/include/asm-arm/arch-mxc/isp1301.h
@@ -85,19 +85,9 @@ static struct i2c_client isp1301_i2c_client = {
.driver = &isp1301_i2c_driver,
};
-/*!
- * isp1301 I2C attach function
- *
- * @param adapter struct i2c_adapter *
- * @return Error code indicating success or failure
- */
-static int isp1301_attach(struct i2c_adapter *adapter)
+static int isp1301_detect_client(struct i2c_adapter *adapter, int address,
+ int kind)
{
- if (strcmp(adapter->name, MXC_ADAPTER_NAME) != 0) {
- printk(KERN_ERR "isp1301_attach: %s\n", adapter->name);
- return -1;
- }
-
isp1301_i2c_client.adapter = adapter;
if (i2c_attach_client(&isp1301_i2c_client)) {
isp1301_i2c_client.adapter = NULL;
@@ -105,9 +95,26 @@ static int isp1301_attach(struct i2c_adapter *adapter)
return -1;
}
+ printk(KERN_INFO "isp1301 Detected\n");
return 0;
}
+static unsigned short normal_i2c[] = { ISP1301_DEV_ADDR, I2C_CLIENT_END };
+
+/* Magic definition of all other variables and things */
+I2C_CLIENT_INSMOD;
+
+/*!
+ * isp1301 I2C attach function
+ *
+ * @param adapter struct i2c_adapter *
+ * @return Error code indicating success or failure
+ */
+static int isp1301_attach(struct i2c_adapter *adap)
+{
+ return i2c_probe(adap, &addr_data, &isp1301_detect_client);
+}
+
/*!
* isp1301 I2C detach function
*