[PATCH v2 2/2] USB: doc: Binding document for ehci-platform driver

Alan Stern stern at rowland.harvard.edu
Tue Oct 23 13:59:42 EDT 2012

On Tue, 23 Oct 2012, Stephen Warren wrote:

> >> So, rather than:
> >>
> >> compatible = "usb-ehci";
> >>
> >> You should always have e.g.:
> >>
> >> compatible = "nvidia,tegra20-ehci", "usb-ehci";
> >>
> >> Given that, there is then always enough information in the device tree
> >> for the driver to be able to derive the other values from the compatible
> >> value.
> > 
> > Yes, I get it.
> > 
> >> Whether you want to derive the information, or whether you want to
> >> explicitly represent it via properties, is a decision to make based on
> >> the trade-offs.
> >>
> >> Oh, and I note that quite a few device trees already use compatible
> >> value "usb-ehci" in their device-trees. Care needs to be taken not to
> >> usurp that value from any existing device drivers if that was to be
> >> picked as the compatible value required by this binding.
> > 
> > Right.  I think Tony's new binding should use compatible value 
> > "usb-ehci-platform".  It will essentially be a superset of "usb-ehci".
> I know this is bike-shedding a little bit, but...
> The word "platform" isn't really about describing the HW, but rather is
> derived from the Linux SW used to program that HW. DT should be purely
> about describing the HW.
> Perhaps "usb-ehci-generic" or "usb-ehci-simple" would be better?

Neither of those really describes the hardware either.  Which name gets 
used seems pretty arbitrary.

Nothing intrinsically distinguishes this class of hardware.  The only
thing these devices have in common is that they can be managed by
Linux's ehci-platform driver.  For that purpose, "usb-ehci-platform"
makes more sense than "usb-ehci-generic" or "usb-ehci-simple".

(It also allows the class to enlarge over time as the driver becomes
more capable -- is that a bad thing?  Are DT board descriptions written
for a later kernel supposed to be unusable with an earlier kernel that
doesn't support the same features?)

In essense, we're trying to say that the HW is compatible with a 
particular driver rather than with some other type of HW.  Maybe DT 
wasn't intended to provide this kind of information, but it seems like 
a logical thing to do.  Unless DT already offers some other way to 
accomplish the same thing?

Alan Stern

More information about the linux-arm-kernel mailing list