Re: 回复: [PATCH v2 2/3] i2c: designware: Export symbols and add __weak for Starfive I2C driver
From: Krzysztof Kozlowski
Date: Thu May 28 2026 - 03:50:53 EST
On 28/05/2026 04:36, Lianfeng Ouyang wrote:
>>> { .compatible = "mobileye,eyeq6lplus-i2c" },
>>> { .compatible = "mscc,ocelot-i2c" },
>>> { .compatible = "snps,designware-i2c" },
>>> + { .compatible = "starfive,jhb100-i2c-master" },
>>> + { .compatible = "starfive,jhb100-i2c-slave" },
>>
>> So both devices are the same... Or you miss proper entry in ID table.
>> Don't sprinkle compatibles around the code - ID table match data is for
>> variant customization.
>>
>> Best regards,
>> Krzysztof
>
> Ok, Master and slave have different base addresses and interrupt numbers, but
> the register layout is the same, so in the next version, I will only use the same
> compatible ”starfive, jhb100-i2c“, and then add starfive, i2c-slave to the dts node
> of the slave to distinguish them
You do not need to distinguish same devices usually, but I still do not
understand why do you need all these different compatibles and your
commit msgs or binding text do not help, so I don't know what to advise.
Best regards,
Krzysztof