[PATCH] i2c: xiic: Make bus names unique

Michal Simek michal.simek at xilinx.com
Wed Mar 2 07:29:24 PST 2022



On 3/1/22 22:43, Wolfram Sang wrote:
> On Thu, Jan 27, 2022 at 11:50:13AM -0600, Robert Hancock wrote:
>> This driver is for an FPGA logic core, so there can be arbitrarily many
>> instances of the bus on a given system. Previously all of the I2C bus
>> names were "xiic-i2c" which caused issues with lm_sensors when trying to
>> map human-readable names to sensor inputs because it could not properly
>> distinguish the busses, for example. Append the platform device name to
>> the I2C bus name so it is unique between different instances.
>>
>> Fixes: e1d5b6598cdc ("i2c: Add support for Xilinx XPS IIC Bus Interface")
>> Signed-off-by: Robert Hancock <robert.hancock at calian.com>
> 
> Michal, is this okay with you?
> 

Origin state

~# cat /sys/class/i2c-adapter/i2c-0/name
xiic-i2c

new state.

~# cat /sys/class/i2c-adapter/i2c-0/name
xiic-i2c 40800000.i2c

I am fine with it.

Tested-by: Michal Simek <michal.simek at xilinx.com>

Thanks,
Michal



More information about the linux-arm-kernel mailing list