linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: Nick Crews <ncrews@chromium.org>
Cc: Enric Balletbo i Serra <enric.balletbo@collabora.com>,
	Duncan Laurie <dlaurie@google.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-usb@vger.kernel.org,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Daniel Kurtz <djkurtz@google.com>
Subject: Re: Policy to keep USB ports powered in low-power states
Date: Mon, 2 Sep 2019 22:16:00 +0200	[thread overview]
Message-ID: <20190902201600.GB6546@bug> (raw)
In-Reply-To: <CAHX4x843bshZPp4oYpvYQz8uNuG=JADqc8JFTioKypmJ5Qf4JQ@mail.gmail.com>

Hi!

> > Without knowing the internal design, but having more infor now, looks to me that
> > should be modelled more as a kind of power supply? Maybe something similar to
> > UCS1002-2 device (drivers/power/supply/ucs1002_power.c) but behind the EC?
> 
> This would work, the problem would be that you lose the link to the
> actual USB port.
> On these Wilco devices, only one port supports this, and I don't think we really
> care about exposing which one it is, but theoretically you would want
> to be able to
> control this for individual ports. I talked with Duncan today and he
> will tweak the
> BIOS firmware so that it exposes which USB ports support the PowerShare ability.
> Then we can query this configuration via ACPI.
> 
> I hadn't seen that driver before, it looks very new, but looks quite
> similar. One problem
> is that the standard power_supply properties represent the present
> status of the device,
> whereas we want to control the state when the device is off.
> 
> I think that I will write this up as a power_supply driver and see
> what people think. As
> a fallback, we can look more into the USB subsystem. Greg, do you think that is
> acceptable, or would you really like this within the USB subsystem?

So, I'm not greg, but... Motorola Droid 4 (and other phones) have USB otg controllers...
They can act as a device (common use), but they can also support USB host, and they
can power the USB bus... either with battery voltage or with 5V.

Having ability to control that even if USB device is not present would be pretty
interesting for various hacks.

Best regards,								Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

      reply	other threads:[~2019-09-02 20:16 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAHX4x86QCrkrnPEfrup8k96wyqg=QR_vgetYLqP1AEa02fx1vw@mail.gmail.com>
2019-08-13  6:02 ` Policy to keep USB ports powered in low-power states Greg Kroah-Hartman
2019-08-14 20:12   ` Nick Crews
2019-08-14 21:20     ` Greg Kroah-Hartman
2019-08-15  0:08       ` Nick Crews
2019-08-15 23:42         ` Duncan Laurie
2019-08-16  9:12           ` Greg Kroah-Hartman
2019-08-16 17:02             ` Duncan Laurie
2019-08-27 15:29               ` Enric Balletbo i Serra
2019-08-29 22:10                 ` Nick Crews
2019-09-02 20:16                   ` Pavel Machek [this message]

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=20190902201600.GB6546@bug \
    --to=pavel@ucw.cz \
    --cc=djkurtz@google.com \
    --cc=dlaurie@google.com \
    --cc=enric.balletbo@collabora.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=ncrews@chromium.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).