From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kuo-Jung Su Date: Wed, 8 May 2013 13:47:55 +0800 Subject: [U-Boot] [PATCH v4 03/16] i2c: add Faraday FTI2C010 I2C controller support In-Reply-To: <5189D4E8.8090807@denx.de> References: <1366963360-2987-5-git-send-email-dantesu@gmail.com> <1367908350-12061-1-git-send-email-dantesu@gmail.com> <5188FF62.7080007@denx.de> <5189D4E8.8090807@denx.de> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 2013/5/8 Heiko Schocher : > Hello Kuo-Jung, > > Am 08.05.2013 03:51, schrieb Kuo-Jung Su: >> 2013/5/7 Heiko Schocher : >>> Hello Kuo-Jung, >>> >>> Am 07.05.2013 08:32, schrieb Kuo-Jung Su: >>>> From: Kuo-Jung Su >>>> >>>> Faraday FTI2C010 is a multi-function I2C controller >>>> which supports both master and slave mode. >>>> This patch simplily implements the master mode only. >>>> >>>> Signed-off-by: Kuo-Jung Su >>>> CC: Heiko Schocher >>>> --- > [...] >>>> drivers/i2c/Makefile | 1 + >>>> drivers/i2c/fti2c010.c | 371 ++++++++++++++++++++++++++++++++++++++++++++++++ >>>> drivers/i2c/fti2c010.h | 81 +++++++++++ >>>> 3 files changed, 453 insertions(+) >>>> create mode 100644 drivers/i2c/fti2c010.c >>>> create mode 100644 drivers/i2c/fti2c010.h >>> >>> As I posted the new i2c multibus/multiadapter framework: >>> >>> http://lists.denx.de/pipermail/u-boot/2013-May/153452.html >>> >>> maybe it is possible you can adapt your i2c driver based on >>> this patches? >>> >> >> Sure, why not? >> But it looks to me that the new i2c framework has not yet committed >> into the mainline u-boot git repository, so I'll only update the fti2c010 driver >> and postpone the board related stuff until the new i2c framework get accepted. > > Ok, thanks! Hope to get the new framework ASAP into mainline. > > [...] > >>>> COBJS-$(CONFIG_I2C_MVTWSI) += mvtwsi.o >>>> COBJS-$(CONFIG_I2C_MV) += mv_i2c.o >>>> COBJS-$(CONFIG_I2C_MXC) += mxc_i2c.o >>> [...] >>> >>> Rest of your patch looks good to me ... >>> >> >> I think it would be better to update the 'CONFIG_HARD_I2C' ifdef statement >> of the fti2c010 as bellow: >> >> #if !defined(CONFIG_SYS_I2C) && !defined(CONFIG_HARD_I2C) >> #error "fti2c010: either CONFIG_SYS_I2C or CONFIG_HARD_I2C would be defined" >> #endif > > No! If you convert to the new i2c framework, you not longer need > the old (CONFIG_HARD_I2C) style. If all i2c drivers are ported to > the new framework, CONFIG_HARD_I2C will be dropped. So please delete > the CONFIG_HARD_I2C define completely when switching to the new > framework. Also the CONFIG_I2C_MULTI_BUS define is no longer needed. > Got it, thanks. So I'll leave the CONFIG_HARD_I2C & CONFIG_I2C_MULTI_BUS ifdef statement untouched until the new i2c framework get accepted. > bye, > Heiko > -- > DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel > HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany -- Best wishes, Kuo-Jung Su