linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Paul Cercueil <paul@crapouillou.net>
Cc: Chunfeng Yun <chunfeng.yun@mediatek.com>,
	od@zcrc.me, linux-usb@vger.kernel.org, linux-pm@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] usb: common: usb-conn-gpio: Register charger
Date: Wed, 8 Jan 2020 18:58:34 +0100	[thread overview]
Message-ID: <20200108175834.GC2546185@kroah.com> (raw)
In-Reply-To: <1578504370.3.1@crapouillou.net>

On Wed, Jan 08, 2020 at 02:26:10PM -0300, Paul Cercueil wrote:
> Hi Greg,
> 
> 
> Le mer., janv. 8, 2020 at 17:53, Greg Kroah-Hartman
> <gregkh@linuxfoundation.org> a écrit :
> > On Tue, Jan 07, 2020 at 01:29:01AM +0100, Paul Cercueil wrote:
> > >  Register a power supply charger, whose online state depends on
> > > whether
> > >  the USB role is set to device or not.
> > 
> > That says _what_ you are doing, but I have no idea _why_ you want to do
> > this.
> > 
> > What is this going to cause to have happen?  What new userspace api is
> > going to result?  What will a user do with this?
> 
> This is useful when the USB role is the only way to know if the device is
> charging from USB.
> 
> The API is the standard power supply charger API, you get a
> /sys/class/power_supply/xxx/online node which tells you the state of the
> charger.
> 
> The sole purpose of this is to give userspace applications a way to know
> whether or not the charger is plugged.

Ok, this is all good info that should go into the changelog text for
when you resend this.

> > Is this going to always show up, no matter if the role is not even
> > relevant for a power supply?
> 
> I guess it'd always show up, yes. In which case would the role not be
> relevant for a power supply? Is gpio-b-connector not always used for OTG
> connectors?

I do not know, I thought OTG was dead :)

thanks,

greg k-h

  reply	other threads:[~2020-01-08 17:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-07  0:29 [PATCH] usb: common: usb-conn-gpio: Register charger Paul Cercueil
2020-01-08 16:53 ` Greg Kroah-Hartman
2020-01-08 17:26   ` Paul Cercueil
2020-01-08 17:58     ` Greg Kroah-Hartman [this message]
2020-01-09  2:27     ` Chunfeng Yun
2020-01-14 15:15       ` Paul Cercueil

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=20200108175834.GC2546185@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=chunfeng.yun@mediatek.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=od@zcrc.me \
    --cc=paul@crapouillou.net \
    /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).