Re: [PATCH] drm: don't link DP aux i2c adapter to the hardware device node

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

 



Am Montag, den 23.01.2017, 17:33 +0100 schrieb Thierry Reding:
> On Fri, Jan 13, 2017 at 06:36:30PM +0100, Lucas Stach wrote:
> > The i2c adapter on DP AUX is purely a software construct. Linking
> > it to the device node of the parent device is wrong, as it leads to
> > 2 devices sharing the same device node, which is bad practice, as
> 
> Who says that two devices can't share the same device node? It's done
> all the time.

Depending on the driver load order this may cause the child device to be
probed using the parent device compatible. Clearly not something you
would want to have, although it's not a problem in this specific case,
as the child device is constructed by the parent driver. But generally
this should be avoided.

The question in this specific case is: why should the pure software i2c
adapter have a DT node at all? The i2c bus isn't there in hardware, so
why should it be bound to a hardware node?

> > well as the i2c trying to populate children of the i2c adapter by
> > looking at the child device nodes of the parent device.
> 
> A set of patches landed in v4.9 to work around this issue in a better
> way. See:
> 
> 	98b00488459e dt-bindings: i2c: Add support for 'i2c-bus' subnode
> 	7e4c224abfe8 i2c: core: Add support for 'i2c-bus' subnode

I disagree. This isn't a better way for this specific case: it means I
have to add an empty i2c-bus node to a device (parallel-to-DP converter)
that does not even have a i2c bus in hardware. This is confusing and
misleading.

Regards,
Lucas

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux