From: Mike Frysinger Date: Tue, 17 Jan 2012 14:23:04 -0500 Subject: [U-Boot] [PATCH 1/3] i2c: add i2c_core and prepare for new multibus support In-Reply-To: <1326784345-19953-2-git-send-email-sjg@chromium.org> References: <1326784345-19953-1-git-send-email-sjg@chromium.org> <1326784345-19953-2-git-send-email-sjg@chromium.org> Message-ID: <201201171423.05666.vapier@gentoo.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Tuesday 17 January 2012 02:12:23 Simon Glass wrote: > +#if defined(CONFIG_SYS_I2C) > + void *cur_adap; /* current used i2c adapter */ > +#endif let's have "i2c" in the variable name somewhere. "curr_i2c" ? > --- /dev/null > +++ b/drivers/i2c/i2c_core.c > > +#ifdef CONFIG_TEGRA2_I2C > +extern struct i2c_adapter tegra_i2c_adap[]; > +#endif i feel like if your initial run includes i2c bus specific defines, the end result is a failure > +struct i2c_adapter *i2c_adap[CONFIG_SYS_NUM_I2C_ADAPTERS] = > + CONFIG_SYS_I2C_ADAPTERS; > +#ifndef CONFIG_SYS_I2C_DIRECT_BUS > +struct i2c_bus i2c_bus[CONFIG_SYS_NUM_I2C_BUSSES] = CONFIG_SYS_I2C_BUSSES; > +#endif the nand layer is moving away from this style ... > + * mux_id is the multiplexer chip type from defined in i2c.h. So far only > + * NXP (Philips) PCA954x multiplexers are supported. Switches are NOT > + * supported (anybody uses them?) does part-specific stuff belong in the core ? seems like it should be in a part-specific driver ... > +int i2c_probe(u_int8_t chip) use uintx_t types. the u_intx_t types are deprecated. -mike -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: This is a digitally signed message part. URL: