All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: Segher Boessenkool <segher@kernel.crashing.org>
Cc: linuxppc-dev@ozlabs.org, linux-usb-devel@lists.sourceforge.net
Subject: Re: [PATCH 2/3] usb: ehci-ppc-of dts bindings.
Date: Thu, 20 Sep 2007 10:52:01 +1000	[thread overview]
Message-ID: <20070920005201.GE14404@localhost.localdomain> (raw)
In-Reply-To: <d0e5786123822b4d178932d9048f6a22@kernel.crashing.org>

On Wed, Sep 19, 2007 at 06:50:02PM +0200, Segher Boessenkool wrote:
> >>> +  Required properties:
> >>> +  - device_type : should be "usb".
> >> No device_type please.  The published USB binding doesn't define
> >> one on purpose.
> >
> > Could you please, explain why?
> > Sorry, I don't think I get the concept of device description here.
> 
> "device_type" is meant to be used only by OF for determining the OF
> programming model for a device.  No such thing has been defined for
> USB busses, so the USB binding does not define a "device_type" either.
> 
> Nothing in a flat device tree should ever define a device_type, except
> perhaps for compatibility with legacy kernel code.

This is not necessarily true.  As Segher says, device_type originally
indicated the OF programming model for a device.  However, we've
extended the notion for the flat device tree to allow device_type to
cover "device classes" which could have certain common properties and
semantics.  However, in this case, a meaningful class binding must
already be defined: it might make sense for usb to have a defined
device_type, but it's not been defined so far, so for now you must
omit device_type (if a device_type is defined in future, it's easier
to add legacy hooks that will include devices which are missing the
relevant device_type marker than to work around devices which *do*
have the marker, but pre-date and don't follow the defined class
binding).

> >>> +  - compatible : should be "ehci".
> >> Just "ehci" isn't enough -- compare to OHCI, which is the name for
> >> a kind of USB host controller as well as for a kind of Firewire
> >> host controller.
> >
> > Actually, I though device type="usb" + compatible="ehci" would be 
> > enough.
> 
> "compatible" values are their own namespace, you should in principle
> be able to find a driver for a device with them without having to look
> at other properties.

Yes.  Regardless of the state of any class / device_type binding, the
compatible property *alone* should be sufficient to select a driver.

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

  parent reply	other threads:[~2007-09-20  0:52 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-17 12:50 [PATCH 0/3] usb: ehci ppc device-tree-aware driver Valentine Barshak
2007-09-17 12:55 ` [PATCH 1/3] usb: add device-tree-aware ehci driver Valentine Barshak
2007-09-17 13:00   ` [PATCH 2/3] usb: ehci-ppc-of dts bindings Valentine Barshak
2007-09-19  0:25     ` Segher Boessenkool
2007-09-19 13:52       ` Valentine Barshak
2007-09-19 16:50         ` Segher Boessenkool
2007-09-19 16:55           ` Valentine Barshak
2007-09-24 19:32             ` [linux-usb-devel] " Valentine Barshak
2007-09-20  0:52           ` David Gibson [this message]
2007-09-24 21:40             ` Segher Boessenkool
2007-09-17 13:28   ` [PATCH 1/3] usb: add device-tree-aware ehci driver Stephen Rothwell
2007-09-17 14:00     ` Josh Boyer
2007-09-17 18:17     ` Valentine Barshak
2007-09-18  4:26       ` Stephen Rothwell
2007-09-18  5:39         ` David Gibson
2007-09-17 18:18     ` Valentine Barshak
2007-09-17 13:02 ` [PATCH 3/3] Add PowerPC 440EPx Sequoia ehci dts entry Valentine Barshak
2007-09-22 23:00 ` [PATCH 0/3] usb: ehci ppc device-tree-aware driver Hollis Blanchard
2007-09-24 10:33   ` Valentine Barshak
2007-10-08 18:15   ` Jerone Young
2007-10-08 18:18     ` Valentine Barshak
2007-10-08 18:22       ` Valentine Barshak
  -- strict thread matches above, loose matches on Subject: below --
2007-09-24 19:25 Valentine Barshak
2007-09-24 19:27 ` [PATCH 2/3] usb: ehci-ppc-of dts bindings Valentine Barshak

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=20070920005201.GE14404@localhost.localdomain \
    --to=david@gibson.dropbear.id.au \
    --cc=linux-usb-devel@lists.sourceforge.net \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=segher@kernel.crashing.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.