summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorWolfram Sang <w.sang@pengutronix.de>2010-08-31 16:33:18 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2010-09-16 08:29:40 +0200
commitcf6d0d0e1980d67f2be76bd317226d4678160aad (patch)
treedcc902c4e7b6bfb07383ec8117f35c3e2d73c1c3 /drivers
parent80f9963207ab876c7bcab0e729a1b074f0acc2b0 (diff)
downloadbarebox-cf6d0d0e1980d67f2be76bd317226d4678160aad.tar.gz
barebox-cf6d0d0e1980d67f2be76bd317226d4678160aad.tar.xz
i2c: fix wrong comment and symbol export for i2c_add_numbered_adapter()
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/i2c/i2c.c26
1 files changed, 12 insertions, 14 deletions
diff --git a/drivers/i2c/i2c.c b/drivers/i2c/i2c.c
index 87360f3fd6..5df0d30f41 100644
--- a/drivers/i2c/i2c.c
+++ b/drivers/i2c/i2c.c
@@ -344,21 +344,19 @@ struct i2c_adapter *i2c_get_adapter(int busnum)
}
/**
- * i2c_register_master - register I2C master controller
+ * i2c_add_numbered_adapter - declare i2c adapter, use static bus number
+ * @adapter: the adapter to register (with adap->nr initialized)
*
- * @param master initialized master, originally from i2c_alloc_master()
- *
- * I2C master controllers connect to their drivers using some non-I2C
- * bus, such as the platform bus. The final stage of probe() in that
- * code includes calling i2c_register_master() to hook up to this I2C
- * bus glue.
- *
- * I2C controllers use board specific (often SOC specific) bus
- * numbers, and board-specific addressing for I2C devices combines
- * those numbers with chip select numbers. Since I2C does not directly
- * support dynamic device identification, boards need configuration
- * tables telling which chip is at which address.
+ * This routine is used to declare an I2C adapter when its bus number
+ * matters. For example, use it for I2C adapters from system-on-chip CPUs,
+ * or otherwise built in to the system's mainboard, and where i2c_board_info
+ * is used to properly configure I2C devices.
*
+ * When this returns zero, the specified adapter became available for
+ * clients using the bus number provided in adap->nr. Also, the table
+ * of I2C devices pre-declared using i2c_register_board_info() is scanned,
+ * and the appropriate driver model device nodes are created. Otherwise, a
+ * negative errno value is returned.
*/
int i2c_add_numbered_adapter(struct i2c_adapter *adapter)
{
@@ -372,4 +370,4 @@ int i2c_add_numbered_adapter(struct i2c_adapter *adapter)
return 0;
}
-EXPORT_SYMBOL(i2c_register_master);
+EXPORT_SYMBOL(i2c_add_numbered_adapter);