Re: [PATCH 2/3] drm/bridge: Add ti-ftp410 HDMI transmitter driver

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

 



Hi Jyri,

On Monday 14 Nov 2016 10:49:43 Jyri Sarha wrote:
> On 11/03/16 19:46, Laurent Pinchart wrote:
> >> +Required properties:
> >> > +	- compatible: "ti,tfp410"
> > 
> > The device is an I2C slave, it should have a reg property. Given that the
> > chip can be used without being controlled through I2C, the reg property
> > should be optional. You should document this clearly, and explain how the
> > DT node can be instantiated as a child of an I2C controller when the I2C
> > interface is used, or in other parts of the device tree otherwise.
> 
> Shouldn't I have two different compatible strings if want to make both
> platform driver probe and i2c client probe to work?

I don't think so, it's still the same chip.

> Or can it be done with single compatible string? Would you know of an
> example of such a driver?

You will need to register both a i2c_driver and a platform_driver in the 
tfp410 driver. Both will advertise the same compatible string. As you'll have 
two probe functions, it should be easy to handle the differences between the 
two situations there, with common code shared in common functions. A quick 
grep points to at least drivers/power/bq27x00_battery.c as an example (albeit 
without DT support).

-- 
Regards,

Laurent Pinchart

_______________________________________________
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