public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: 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@kernel.org, linux-usb@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: Non-enumerable devices on USB and other enumerable buses
Date: Mon, 12 Aug 2013 12:23:44 +0100	[thread overview]
Message-ID: <20130812112344.GS6427@sirena.org.uk> (raw)
In-Reply-To: <20130812020257.GA7028@kroah.com>

[-- Attachment #1: Type: text/plain, Size: 2343 bytes --]

On Sun, Aug 11, 2013 at 07:02:57PM -0700, Greg Kroah-Hartman wrote:
> On Sun, Aug 11, 2013 at 08:08:26PM +0100, Mark Brown wrote:

> > I know there's been some discussion of this topic but do we have any
> > general consensus on how to handle such things both from a Linux driver
> > model point of view and from a DT/ACPI point of view?

> As these are usually bus-specific things, and really, platform-specific

I don't think they're bus specific - the main issue with a lot of this
is that they're outside the infrastructure that the bus standardises so
we should have a general way of understanding this.  There will be bits
where the bus needs to get involved but the overall pattern is generic.

> things, I'd fall back and just recommend a "platform driver" that
> "knows" about where these gpios are, and how/when to enable them, which
> will cause the discoverable bus logic to kick in now that it notices a
> device is present/removed.

This doesn't work in general.  These things aren't really platform
specific at all, they're features of the devices that apply to any
system using them and while for some use cases (like WiFi and BT power)
an external thing that just manually applies power will be enough in
other cases we want to know about the device even while it's off and the
driver might be able to do extra things at runtime if it knows about for
example having some control over signals to the device.

For example in the Slimbus case we're normally talking about audio
CODECs.  In order to preserve the userspace API the device has to appear
to be present at all times, the driver will remember the settings the
user is making to be applied when it actually powers up and indeed the
powering up should be kicked off as a result of userspac acting on the
apparently present device.

Another example here (including USB devices) is interrupt signals wired
directly back to the processor, completely outside of the bus.

> Perhaps a semi-generic "platform" driver could be created, that knows
> how to handle these settings in the DT, but odds are, that might be
> difficult to make generic enough to cover a wide range of boards, but
> without specifics, it's hard to tell.

There's things like the rfkill stuff already, and the reset controller
on the way, but again this only covers a fairly small subset of the
issues.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  reply	other threads:[~2013-08-12 11:24 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 [this message]
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
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=20130812112344.GS6427@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=balbi@ti.com \
    --cc=devicetree@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=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