linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nick Crews <ncrews@chromium.org>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-usb@vger.kernel.org,
	Enric Balletbo i Serra <enric.balletbo@collabora.com>,
	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: Wed, 14 Aug 2019 14:12:07 -0600	[thread overview]
Message-ID: <CAHX4x87DbJ4cKuwVO3OS=UzwtwSucFCV073W8bYHOPHW8NiA=A@mail.gmail.com> (raw)
In-Reply-To: <20190813060249.GD6670@kroah.com>

Thanks for the fast response!

On Tue, Aug 13, 2019 at 12:02 AM Greg Kroah-Hartman
<gregkh@linuxfoundation.org> wrote:
>
> On Mon, Aug 12, 2019 at 06:08:43PM -0600, Nick Crews wrote:
> > Hi Greg!
>
> Hi!
>
> First off, please fix your email client to not send html so that vger
> does not reject your messages :)

Thanks, should be good now.

>
> > I am working on a Chrome OS device that supports a policy called "USB Power
> > Share," which allows users to turn the laptop into a charge pack for their
> > phone. When the policy is enabled, power will be supplied to the USB ports
> > even when the system is in low power states such as S3 and S5. When
> > disabled, then no power will be supplied in S3 and S5. I wrote a driver
> > <https://lore.kernel.org/patchwork/patch/1062995/> for this already as part
> > of drivers/platform/chrome/, but Enric Balletbo i Serra, the maintainer,
> > had the reasonable suggestion of trying to move this into the USB subsystem.
>
> Correct suggestion.
>
> > Has anything like this been done before? Do you have any preliminary
> > thoughts on this before I start writing code? A few things that I haven't
> > figured out yet:
> > - How to make this feature only available on certain devices. Using device
> > tree? Kconfig? Making a separate driver just for this device that plugs
> > into the USB core?
> > - The feature is only supported on some USB ports, so we need a way of
> > filtering on a per-port basis.
>
> Look at the drivers/usb/typec/ code, I think that should do everything
> you need here as this is a typec standard functionality, right?

Unfortunately this is for USB 2.0 ports, so it's not type-C.
Is the type-C code still worth looking at?

>
> thanks,
>
> greg k-h

  reply	other threads:[~2019-08-14 20:12 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 [this message]
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

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='CAHX4x87DbJ4cKuwVO3OS=UzwtwSucFCV073W8bYHOPHW8NiA=A@mail.gmail.com' \
    --to=ncrews@chromium.org \
    --cc=djkurtz@google.com \
    --cc=enric.balletbo@collabora.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.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).