[U-Boot] [PATCH v4 03/16] i2c: add Faraday FTI2C010 I2C controller support

Heiko Schocher hs at denx.de
Wed May 8 06:30:32 CEST 2013


Hello Kuo-Jung,

Am 08.05.2013 03:51, schrieb Kuo-Jung Su:
> 2013/5/7 Heiko Schocher <hs at denx.de>:
>> Hello Kuo-Jung,
>>
>> Am 07.05.2013 08:32, schrieb Kuo-Jung Su:
>>> From: Kuo-Jung Su <dantesu at faraday-tech.com>
>>>
>>> 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 <dantesu at faraday-tech.com>
>>> CC: Heiko Schocher <hs at denx.de>
>>> ---
[...]
>>>  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.

bye,
Heiko
-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany


More information about the U-Boot mailing list