From: Mark Brown <broonie@kernel.org>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Rob Herring <rob.herring@calxeda.com>,
Pawel Moll <pawel.moll@arm.com>,
Mark Rutland <mark.rutland@arm.com>,
Stephen Warren <swarren@wwwdotorg.org>,
Ian Campbell <ian.campbell@citrix.com>,
Felipe Balbi <balbi@ti.com>,
Grant Likely <grant.likely@linaro.org>,
devicetree@vger.kernel.org, linux-usb@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: Non-enumerable devices on USB and other enumerable buses
Date: Thu, 15 Aug 2013 20:32:42 +0100 [thread overview]
Message-ID: <20130815193242.GF30073@sirena.org.uk> (raw)
In-Reply-To: <Pine.LNX.4.44L0.1308151335310.905-100000@iolanthe.rowland.org>
[-- Attachment #1: Type: text/plain, Size: 3136 bytes --]
On Thu, Aug 15, 2013 at 01:55:18PM -0400, Alan Stern wrote:
> On Thu, 15 Aug 2013, Mark Brown wrote:
> > On Thu, Aug 15, 2013 at 10:42:00AM -0400, Alan Stern wrote:
> > To be honest I don't see how that helps much if you're going to handle
> > the case where platform data is required to enumerate the device. You
> > need to know about the device prior to enumeration in order to get the
> > platform data to the driver when it does enumerate and you can't
> > enumerate it until you do that anyway.
> You're a little imprecise here. Which driver do you mean? The driver
> that will ultimately bind to the device, or the driver that will
> discover and enumerate it (which generally is bound to the device's
> upstream parent)? I'll assume the latter.
The driver that's binding to the device - obviously going through
teaching all controller drivers about how to start up any random child
device they might encounter is not going to be a good idea, this should
be encapsulated in the child driver.
> Under what circumstances is platform data required to enumerate a
> device on a discoverable bus? We're assuming the platform has already
> taken care of everything required to make the device appear on the bus
> in the usual manner (such as bringing it to full power). Can you give
> an example where something more is needed?
Powering on the device is exactly the sort of thing I'm talking about
here. I'm not sure what you think "the platform" is here but it sounds
awfully like the sort of random board specific bodge code that people
currently use - something has got to know what's needed to get the
device up and running and how to do it and the device driver seems like
the sensible place to do that.
> (Were you thinking of the case where the device's IRQ signal doesn't go
> over the bus but uses a different platform mechanism? I don't quite
> see how this can work. What about devices on the bus that aren't known
> to the platform beforehand? How do they send their IRQ signals?)
Either the bus doesn't support anything like interrupts at all or they'd
use the standard bus mechanisms. Typical reasons for bypassing the bus
include things like latency and power, or excessive cost for
implementation on the device side.
> > A bus could insist on this if it
> > needed the information from enumeration for some reason but really it
> > seems like an implementation detail.
> It isn't an implementation detail. The "power-up for initial
> detection" scheme is a general solution to the problem of setting up a
> complicated communication path between the bus and the platform.
> (I.e., it gives a simple way to avoid the need for this communication,
> that can be used on any discoverable bus.) It also is a general
> solution for avoiding the problem of registering a device on a bus
> before that device has been discovered and enumerated.
I think I completely misunderstood what you mean by powering up on
initial use. If you're saying that we should have some platform code
for doing this I don't think that's a scalable solution.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2013-08-15 19:33 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-11 19:08 Non-enumerable devices on USB and other enumerable buses Mark Brown
2013-08-11 22:08 ` Grant Likely
2013-08-12 14:41 ` Mark Brown
2013-08-12 1:53 ` Alan Stern
2013-08-12 9:51 ` Mark Brown
2013-08-12 11:07 ` Mark Rutland
2013-08-12 11:32 ` Mark Brown
2013-08-12 18:08 ` Stephen Warren
2013-08-12 20:38 ` Mark Brown
2013-08-12 2:02 ` Greg Kroah-Hartman
2013-08-12 11:23 ` Mark Brown
2013-08-12 20:50 ` Greg Kroah-Hartman
2013-08-12 21:40 ` Mark Brown
2013-08-13 1:04 ` Alan Stern
2013-08-14 11:38 ` Mark Brown
2013-08-14 14:27 ` Alan Stern
2013-08-14 15:39 ` Mark Brown
2013-08-14 16:14 ` Alan Stern
2013-08-14 16:30 ` Stephen Warren
2013-08-14 18:49 ` Mark Brown
2013-08-14 17:30 ` Mark Brown
2013-08-14 18:35 ` Alan Stern
2013-08-14 18:46 ` Mark Brown
2013-08-14 19:39 ` Alan Stern
2013-08-14 20:16 ` Paul Zimmerman
2013-08-14 23:59 ` Mark Brown
2013-08-14 23:55 ` Mark Brown
2013-08-15 14:42 ` Alan Stern
2013-08-15 17:10 ` Mark Brown
2013-08-15 17:55 ` Alan Stern
2013-08-15 19:32 ` Mark Brown [this message]
2013-08-15 20:42 ` Alan Stern
2013-08-15 22:54 ` Mark Brown
2013-08-16 14:42 ` Alan Stern
2013-08-16 18:39 ` Mark Brown
2013-08-16 19:27 ` Alan Stern
2013-08-16 20:00 ` Mark Brown
2013-08-16 20:39 ` Alan Stern
2013-08-16 22:46 ` Mark Brown
2013-08-17 1:29 ` Alan Stern
2013-08-19 12:17 ` Ming Lei
2013-08-19 16:01 ` Mark Brown
2013-08-20 13:19 ` Ming Lei
2013-08-20 15:02 ` Mark Brown
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=20130815193242.GF30073@sirena.org.uk \
--to=broonie@kernel.org \
--cc=balbi@ti.com \
--cc=devicetree@vger.kernel.org \
--cc=grant.likely@linaro.org \
--cc=gregkh@linuxfoundation.org \
--cc=ian.campbell@citrix.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=pawel.moll@arm.com \
--cc=rob.herring@calxeda.com \
--cc=stern@rowland.harvard.edu \
--cc=swarren@wwwdotorg.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