[PATCH linux dev-4.10] i2c: fsi: Add SMBUS emulation

Eddie James eajames at linux.vnet.ibm.com
Wed Jul 19 23:57:36 AEST 2017



On 07/19/2017 08:40 AM, Eddie James wrote:
>
>
> On 07/19/2017 04:45 AM, Joel Stanley wrote:
>> On Thu, Jul 6, 2017 at 4:14 PM, Joel Stanley <joel at jms.id.au> wrote:
>>> Userspace expects this to be enabled. For example, it is required for
>>> using i2cdetect.

FYI, i2cget/i2cset don't seem to work with these i2c busses, as those 
tools don't have 10-bit address support... Not sure how i2cdetect 
behaves with that. I have been using 
https://github.com/eddiejames/fsidbg to access those devices for debug 
purposes.

Thanks,
Eddie

>>>
>>> Signed-off-by: Joel Stanley <joel at jms.id.au>
>> What do you think Eddie?
>
> Sorry, forgot about this one. Looks good, thanks.
>
> Acked-by: Eddie James <eajames at linux.vnet.ibm.com>
>
>>
>>> ---
>>>   drivers/i2c/busses/i2c-fsi.c | 3 ++-
>>>   1 file changed, 2 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/i2c/busses/i2c-fsi.c 
>>> b/drivers/i2c/busses/i2c-fsi.c
>>> index d5135b4bc607..952cf8f392b4 100644
>>> --- a/drivers/i2c/busses/i2c-fsi.c
>>> +++ b/drivers/i2c/busses/i2c-fsi.c
>>> @@ -467,7 +467,8 @@ static int fsi_i2c_xfer(struct i2c_adapter 
>>> *adap, struct i2c_msg *msgs,
>>>
>>>   static u32 fsi_i2c_functionality(struct i2c_adapter *adap)
>>>   {
>>> -       return I2C_FUNC_I2C | I2C_FUNC_PROTOCOL_MANGLING | 
>>> I2C_FUNC_10BIT_ADDR;
>>> +       return I2C_FUNC_I2C | I2C_FUNC_PROTOCOL_MANGLING | 
>>> I2C_FUNC_10BIT_ADDR
>>> +               | I2C_FUNC_SMBUS_EMUL | I2C_FUNC_SMBUS_BLOCK_DATA;
>>>   }
>>>
>>>   static int fsi_i2c_low_level_recover_bus(struct fsi_i2c_master *i2c)
>>> -- 
>>> 2.13.2
>>>
>



More information about the openbmc mailing list