From mboxrd@z Thu Jan 1 00:00:00 1970 From: Heiko Schocher Date: Sun, 22 Sep 2013 09:32:40 +0200 Subject: [U-Boot] [PATCH] i2c:zynq: I2C multi-bus support on Zynq In-Reply-To: References: Message-ID: <523E9D18.9080509@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hello Michael, Am 20.09.2013 22:40, schrieb Michael Burr: > Changes: > 'zynq_i2c.c': > Adapted driver for compliance with "new" I2C driver model > (CONFIG_SYS_I2C). > Support for 0-length register address in 'i2c_write', 'i2c_read'. > 'i2c.h', 'i2c_core.c': > Support for Texas Instruments PCA9548 bus multiplexer. Your commit message implements, that your patch contains 3 independent changes ... it would be better to seperate your patch in 3 pieces ... so if your patch introduces a problem, it is better to identify, which part it introduced ... Can you do this easy? Except of this, I have only one minor Codingstyle comment > Tested: > Xilinx ZC702 eval board (single bus master 'I2C0' with multiplexer > PCA9548). > Write and read registers with addresses of length 0 and 1. > > Note: > Mainline code does not work "out of the box" on ZC702 at this time; > ad hoc adaptations based on 'u-boot-xlnx' repository were needed > in order to test on this board. (Those adapatations are not included > with this patch.) ? Where can I find this repository? > Signed-off-by: Michael Burr > Cc: Heiko Schocher > Cc: Michal Simek > --- > drivers/i2c/i2c_core.c | 5 ++ > drivers/i2c/zynq_i2c.c | 148 +++++++++++++++++++++++++++++------------------- > include/i2c.h | 3 + > 3 files changed, 97 insertions(+), 59 deletions(-) [...] > diff --git a/include/i2c.h b/include/i2c.h > index 8fd17d1..683affe 100644 > --- a/include/i2c.h > +++ b/include/i2c.h > @@ -40,6 +40,7 @@ > #define CONFIG_SYS_I2C_MAX_HOPS 0 > #define CONFIG_SYS_NUM_I2C_BUSES ll_entry_count(struct i2c_adapter, i2c) > #else > + Change not needed! > /* we use i2c muxes */ > #undef CONFIG_SYS_I2C_DIRECT_BUS > #endif > @@ -135,6 +136,8 @@ extern struct i2c_bus_hose i2c_bus[]; > #define I2C_MUX_PCA9544 {I2C_MUX_PCA9544_ID, "PCA9544A"} > #define I2C_MUX_PCA9547_ID 4 > #define I2C_MUX_PCA9547 {I2C_MUX_PCA9547_ID, "PCA9547A"} > +#define I2C_MUX_PCA9548_ID 5 > +#define I2C_MUX_PCA9548 {I2C_MUX_PCA9548_ID, "PCA9548"} > #endif > > #ifndef I2C_SOFT_DECLARATIONS bye, Heiko -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany