linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: robherring2@gmail.com (Rob Herring)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 2/2] USB: doc: Binding document for ehci-platform driver
Date: Tue, 23 Oct 2012 15:06:46 -0500	[thread overview]
Message-ID: <5086F8D6.5050605@gmail.com> (raw)
In-Reply-To: <Pine.LNX.4.44L0.1210231522230.1635-100000@iolanthe.rowland.org>

On 10/23/2012 02:33 PM, Alan Stern wrote:
> On Tue, 23 Oct 2012, Stephen Warren wrote:
> 
>>> 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.
>>
>> I don't agree. They're all EHCI USB controllers (or all EHCI USB
>> controllers that don't require custom drivers due to quirks), which is a
>> much more general statement than anything related to which driver Linux
>> uses for them.
> 
> That's true, but it doesn't distinguish these devices.  There are other
> EHCI controllers with no quirks that nevertheless can't be handled by
> ehci-platform because they have requirements (_not_ quirks) that
> ehci-platform is unable to deal with currently -- clocks or power
> supplies or special register settings or PHYs or etc.

But what if the h/w has quirks you haven't yet discovered? You need the
compatible property to be specific now, so if there are any future
driver changes needed the DT does not have to change (as it may be in
firmware which you can't change).

>>> In essense, we're trying to say that the HW is compatible with a 
>>> particular driver rather than with some other type of HW.
>>
>> Using a compatible value in order to pick a specific driver in Linux is
>> explicitly against the device tree design principles; DT is supposed to
>> represent just the hardware.
>>
>>> 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?
>>
>> The typical way is for the Linux driver to declare that is supports a
>> variety of different HW models.
>>
>> Admittedly this is annoying when there are many HW models that otherwise
>> wouldn't need any driver changes, hence the desire to (additionally)
>> include some generic value in the compatible field, but again, what that
>> generic value is should be driven by the HW itself, not the SW that's
>> using it.
> 
> Okay, fine.  But then what should the binding documentation specify for
> the compatible value?  A list of all the HW models that the driver
> currently supports?

The binding docs should be independent of the driver. There may be
fields the driver ignores. So you need to document all defined
compatible strings. It is fine if the driver only has "usb-ehci", but it
is not fine for the DT to only have that.

Rob

  reply	other threads:[~2012-10-23 20:06 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-20 22:10 [PATCH v2 0/2] Update ehci-platform driver to support devicetree Tony Prisk
2012-10-20 22:10 ` [PATCH v2 1/2] USB: Update EHCI-platform driver to devicetree Tony Prisk
2012-10-21  2:02   ` Alan Stern
2012-10-20 22:10 ` [PATCH v2 2/2] USB: doc: Binding document for ehci-platform driver Tony Prisk
2012-10-21 17:34   ` Florian Fainelli
2012-10-22 16:07   ` Stephen Warren
2012-10-22 17:34     ` Alan Stern
2012-10-22 17:48       ` Stephen Warren
2012-10-22 19:00         ` Alan Stern
2012-10-22 22:10           ` Stephen Warren
2012-10-23 14:10             ` Alan Stern
2012-10-23 16:15               ` Stephen Warren
2012-10-23 17:59                 ` Alan Stern
2012-10-23 18:47                   ` Stephen Warren
2012-10-23 19:33                     ` Alan Stern
2012-10-23 20:06                       ` Rob Herring [this message]
2012-10-24 14:57                         ` Alan Stern
2012-10-24 15:26                           ` Sebastian Andrzej Siewior
2012-10-24 16:16                             ` Stephen Warren
2012-10-24 16:36                               ` Florian Fainelli
2012-10-24 16:38                               ` Alan Stern
2012-10-24 16:44                                 ` Florian Fainelli
2012-10-24 18:04                                   ` Alan Stern
2012-10-24 18:18                                     ` Florian Fainelli
2012-10-24 16:45                                 ` Stephen Warren
2012-10-24 17:46                                   ` Alan Stern
2012-10-24 18:09                                     ` Stephen Warren
2012-10-24 18:55                                       ` Mitch Bradley
2012-10-24 19:30                                         ` Alan Stern
2012-10-25 10:23                                         ` Sebastian Andrzej Siewior
2012-10-25 14:36                                           ` Alan Stern
2012-10-26  8:02                                             ` Sebastian Andrzej Siewior
2012-10-26 14:54                                               ` Alan Stern
2012-10-25 15:53                                           ` Stephen Warren
2012-10-24 19:41                                       ` Alan Stern
2012-10-24 16:44                               ` Alan Stern
2012-10-24 16:48                                 ` Stephen Warren
2012-10-24 17:42                                 ` Rob Herring
2012-10-24 17:57                                   ` Alan Stern
2012-10-24 16:28                           ` Stephen Warren
2012-10-24 16:54                             ` Alan Stern
2012-10-24 17:37                               ` Florian Fainelli

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5086F8D6.5050605@gmail.com \
    --to=robherring2@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).