projects
/
platform
/
kernel
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
677f970
)
i2c: Instantiate I2C controllers when selected
author
Michal Simek
<michal.simek@xilinx.com>
Tue, 27 Oct 2015 15:02:36 +0000
(16:02 +0100)
committer
Heiko Schocher
<hs@denx.de>
Wed, 28 Oct 2015 08:53:49 +0000
(09:53 +0100)
Do not enable both I2C controllers by default. Enable them only when
they are selected.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
drivers/i2c/zynq_i2c.c
patch
|
blob
|
history
diff --git
a/drivers/i2c/zynq_i2c.c
b/drivers/i2c/zynq_i2c.c
index
b3264af
..
380863b
100644
(file)
--- a/
drivers/i2c/zynq_i2c.c
+++ b/
drivers/i2c/zynq_i2c.c
@@
-297,11
+297,15
@@
static unsigned int zynq_i2c_set_bus_speed(struct i2c_adapter *adap,
return 0;
}
+#ifdef CONFIG_ZYNQ_I2C0
U_BOOT_I2C_ADAP_COMPLETE(zynq_0, zynq_i2c_init, zynq_i2c_probe, zynq_i2c_read,
zynq_i2c_write, zynq_i2c_set_bus_speed,
CONFIG_SYS_I2C_ZYNQ_SPEED, CONFIG_SYS_I2C_ZYNQ_SLAVE,
0)
+#endif
+#ifdef CONFIG_ZYNQ_I2C1
U_BOOT_I2C_ADAP_COMPLETE(zynq_1, zynq_i2c_init, zynq_i2c_probe, zynq_i2c_read,
zynq_i2c_write, zynq_i2c_set_bus_speed,
CONFIG_SYS_I2C_ZYNQ_SPEED, CONFIG_SYS_I2C_ZYNQ_SLAVE,
1)
+#endif