From: Chunfeng Yun <chunfeng.yun@mediatek.com>
To: Paul Cercueil <paul@crapouillou.net>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, <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: Thu, 9 Jan 2020 10:27:52 +0800 [thread overview]
Message-ID: <1578536872.21256.25.camel@mhfsdcap03> (raw)
In-Reply-To: <1578504370.3.1@crapouillou.net>
Hi Paul,
On Wed, 2020-01-08 at 14:26 -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.
There is no charger IC on your platform?
>
> 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.
>
> > 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?
Do you also need it if the platform don't have battery?
> Is gpio-b-connector not always used for
> OTG connectors?
It also supports device only mode, usually uses vBus pin to
enable/disable controller
>
> Cheers,
> -Paul
>
>
> > You need a lot more text here to make this mergable.
> >
> > thanks,
> >
> > greg k-h
>
>
next prev parent reply other threads:[~2020-01-09 2:28 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
2020-01-09 2:27 ` Chunfeng Yun [this message]
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=1578536872.21256.25.camel@mhfsdcap03 \
--to=chunfeng.yun@mediatek.com \
--cc=gregkh@linuxfoundation.org \
--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).