* Compatibles for i2c muxes nxp,pca954x and ti,tca954x
@ 2017-08-03 10:00 Peter Rosin
2017-08-03 13:44 ` Andrew Lunn
0 siblings, 1 reply; 3+ messages in thread
From: Peter Rosin @ 2017-08-03 10:00 UTC (permalink / raw)
To: devicetree@vger.kernel.org
Cc: linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org,
Shawn Guo, Sascha Hauer, Stefan Agner, Rob Herring, Mark Rutland,
Russell King, linux-arm-kernel
Hi!
Texas has apparently made copies for some of the NXP devices
handled by the drivers/i2c/muxes/i2c-mux-pca954x.c driver.
How is that best handled?
I see e.g. that arch/arm/boot/dts/vf610-zii-dev-rev-{b,c}.dts has
this snippet:
&i2c2 {
tca9548@70 {
compatible = "nxp,pca9548";
Which indicates that it really is a Texas chip sitting there, but that
someone did not bother to state that explicitly.
As I see it, there are two levels to this.
1. Update the above to be
compatible = "ti,tca9548a", "nxp,pca9548";
and rely on the secondary compatible to be matched with the driver.
2. Also update the driver to recognize the "ti,tca9548a" compatible.
There are also "ti,tca9543a", "ti,tca9544a", "ti,tca9545a" and
"ti,tca9546a" to consider (but no "ti,tca9542a" or "ti,tca9547a").
AFAIU, the Texas chips are completely compatible from the driver
point of view.
Step 1 above is probably a bugfix, should someone find some
unexpected incompatibility in the future. Without differentiating
the compatibles now, there's just no way to handle that in a future
driver.
But is step 2 needed/desired until such a time that differences between
the chips are found? How is this situation handled elsewhere?
Cheers,
peda
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: Compatibles for i2c muxes nxp,pca954x and ti,tca954x
2017-08-03 10:00 Compatibles for i2c muxes nxp,pca954x and ti,tca954x Peter Rosin
@ 2017-08-03 13:44 ` Andrew Lunn
[not found] ` <20170803134401.GG15018-g2DYL2Zd6BY@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Andrew Lunn @ 2017-08-03 13:44 UTC (permalink / raw)
To: Peter Rosin
Cc: devicetree@vger.kernel.org, Mark Rutland,
linux-kernel@vger.kernel.org, Stefan Agner, Russell King,
Rob Herring, linux-i2c@vger.kernel.org, Sascha Hauer, Shawn Guo,
linux-arm-kernel
On Thu, Aug 03, 2017 at 12:00:27PM +0200, Peter Rosin wrote:
> Hi!
>
> Texas has apparently made copies for some of the NXP devices
> handled by the drivers/i2c/muxes/i2c-mux-pca954x.c driver.
This happens a lot in the i2c space. Look at all the at24 EEPROM
clones. Yet they all use the same compatible string.
Andrew
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-08-03 14:22 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-03 10:00 Compatibles for i2c muxes nxp,pca954x and ti,tca954x Peter Rosin
2017-08-03 13:44 ` Andrew Lunn
[not found] ` <20170803134401.GG15018-g2DYL2Zd6BY@public.gmane.org>
2017-08-03 14:22 ` Peter Rosin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox