Re: i2c: slave support framework improvements

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2016-07-28 08:55, Peter Rosin wrote:
> On 2016-07-26 18:51, Kachalov Anton wrote:
>> I'm able to register individual slave clients on each muxed bus like the following:
>>
>> echo slave-24c02 0x1011 > /sys/bus/i2c/devices/i2c-9/new_device
>> echo slave-24c02 0x1011 > /sys/bus/i2c/devices/i2c-10/new_device
>> echo slave-24c02 0x1013 > /sys/bus/i2c/devices/i2c-11/new_device
>> echo slave-24c02 0x1011 > /sys/bus/i2c/devices/i2c-12/new_device
>>
>> only if I do not access i2c muxed bus somewhere between adding devices, like:
>>
>> echo aspeed,i2c-ipmb 0x11 > /sys/bus/i2c/devices/i2c-9/new_device
>> i2cdetect -y 10
>> # next command will return (-16)
>> # [...] i2c i2c-10: Failed to register i2c client slave-24c02 at 0x11 (-16)
>> echo slave-24c02 0x1011 > /sys/bus/i2c/devices/i2c-10/new_device
>> # [...] i2c i2c-11: Failed to register i2c client slave-24c02 at 0x11 (-16)
>> echo slave-24c02 0x1011 > /sys/bus/i2c/devices/i2c-11/new_device
> 
> Is this with your patch? If so, then that makes perfect sense since
> your dummy device sits on the root adapter, and you are not allowed
> to create address conflicts between clients on the root adapter and
> clients on downstream muxes.
> 
> I think the problem is that when you call i2c_new_dummy, it calls
> i2c_new_device without the I2C_CLIENT_SLAVE flag (which you try to
> add too late). If you open code i2c_new_dummy and add this flag
> before calling i2c_new_device, it might work better?

No, it might not. See my reply to Wolfram...

Cheers,
Peter

--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux