* barebox :i2c error
@ 2010-08-31 5:16 Nataraj S Narayan
2010-08-31 14:33 ` [PATCH] i2c: fix wrong comment and symbol export for i2c_add_numbered_adapter() Wolfram Sang
0 siblings, 1 reply; 2+ messages in thread
From: Nataraj S Narayan @ 2010-08-31 5:16 UTC (permalink / raw)
To: barebox
[-- Attachment #1.1: Type: text/plain, Size: 884 bytes --]
Hi
On commit 3d5d2279c0c5d3a7e83f94d98434c1cf29e35311.
root@debian:/software/barebox# make ARCH=arm
CROSS_COMPILE=/armbin/arm-linux-
make[1]: `arch/arm/include/asm/mach-types.h' is up to date.
CHK include/linux/version.h
CHK include/linux/utsrelease.h
SYMLINK include/config.h -> arch/arm/boards/at91sam9263ek//config.h
CC drivers/i2c/i2c.o
drivers/i2c/i2c.c:375: error: 'i2c_register_master' undeclared here (not in
a function)
drivers/i2c/i2c.c:375: warning: type defaults to 'int' in declaration of
'i2c_register_master'
make[2]: *** [drivers/i2c/i2c.o] Error 1
make[1]: *** [drivers/i2c] Error 2
make: *** [drivers] Error 2
# grep I2C .config
# CONFIG_CMD_I2C is not set
CONFIG_I2C=y
CONFIG_DRIVER_I2C_MC13892=y
CONFIG_DRIVER_I2C_MC34704=y
CONFIG_DRIVER_I2C_MC9SDZ60=y
CONFIG_DRIVER_I2C_LP3972=y
# CONFIG_DRIVER_I2C_TWL4030 is not set
regards
Nataraj
[-- Attachment #1.2: Type: text/html, Size: 1018 bytes --]
[-- Attachment #2: Type: text/plain, Size: 149 bytes --]
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH] i2c: fix wrong comment and symbol export for i2c_add_numbered_adapter()
2010-08-31 5:16 barebox :i2c error Nataraj S Narayan
@ 2010-08-31 14:33 ` Wolfram Sang
0 siblings, 0 replies; 2+ messages in thread
From: Wolfram Sang @ 2010-08-31 14:33 UTC (permalink / raw)
To: barebox
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
---
Can you please check this patch?
drivers/i2c/i2c.c | 26 ++++++++++++--------------
1 files changed, 12 insertions(+), 14 deletions(-)
diff --git a/drivers/i2c/i2c.c b/drivers/i2c/i2c.c
index 87360f3..5df0d30 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);
--
1.7.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-08-31 14:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-31 5:16 barebox :i2c error Nataraj S Narayan
2010-08-31 14:33 ` [PATCH] i2c: fix wrong comment and symbol export for i2c_add_numbered_adapter() Wolfram Sang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox