From: Sebastian Reichel <sebastian.reichel@collabora.com>
To: Jack Wu <wjack@google.com>
Cc: kernel-team@android.com, linux-pm@vger.kernel.org,
linux-kernel@vger.kernel.org, Ken Yang <yangken@google.com>,
AleX Pelosi <apelosi@google.com>,
Vincent Wang <vincentwang@google.com>
Subject: Re: [PATCH v2] power: supply: add dock type
Date: Thu, 9 Jun 2022 22:26:13 +0200 [thread overview]
Message-ID: <20220609202613.pjojjw7meb4bekfr@mercury.elektranox.org> (raw)
In-Reply-To: <CAHnoD8BTEPeRToRtan7LZJae-K3dv0pvBYQrXkrr3scbjUUcTg@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 3115 bytes --]
Hi,
On Mon, Mar 07, 2022 at 12:05:25PM +0800, Jack Wu wrote:
> Currently, power_supply framework supports only Battery, UPS,
> Mains, USB and WIRELESS power_supply_type. Add dock
> power_supply_type so that the drivers which supports dock can
> register a power supply class device with POWER_SUPPLY_TYPE_DOCK.
I asked for a driver using this. We do not add/extend sysfs API just
for the sake of downstream drivers. Either you send the
new driver/driver changes upstream that need POWER_SUPPLY_TYPE_DOCK,
or this will not get added.
Please don't waste reviewer's time!
-- Sebastian
> v2: updates to Documentation
>
> Thanks!
> Jack
>
> Jack Wu <wjack@google.com> 於 2022年3月7日 週一 上午11:44寫道:
> >
> > Add dock power_supply_type for the drivers which supports dock can
> > register a power supply class device with POWER_SUPPLY_TYPE_DOCK.
> >
> > Signed-off-by: Jack Wu <wjack@google.com>
> > ---
> > Documentation/ABI/testing/sysfs-class-power | 2 +-
> > drivers/power/supply/power_supply_sysfs.c | 1 +
> > include/linux/power_supply.h | 1 +
> > 3 files changed, 3 insertions(+), 1 deletion(-)
> >
> > diff --git a/Documentation/ABI/testing/sysfs-class-power b/Documentation/ABI/testing/sysfs-class-power
> > index 859501366777..0b45d9d3a50f 100644
> > --- a/Documentation/ABI/testing/sysfs-class-power
> > +++ b/Documentation/ABI/testing/sysfs-class-power
> > @@ -34,7 +34,7 @@ Description:
> > Describes the main type of the supply.
> >
> > Access: Read
> > - Valid values: "Battery", "UPS", "Mains", "USB", "Wireless"
> > + Valid values: "Battery", "UPS", "Mains", "USB", "Wireless", "Dock"
> >
> > **Battery and USB properties**
> >
> > diff --git a/drivers/power/supply/power_supply_sysfs.c b/drivers/power/supply/power_supply_sysfs.c
> > index c0dfcfa33206..2b1f18b7f98c 100644
> > --- a/drivers/power/supply/power_supply_sysfs.c
> > +++ b/drivers/power/supply/power_supply_sysfs.c
> > @@ -57,6 +57,7 @@ static const char * const POWER_SUPPLY_TYPE_TEXT[] = {
> > [POWER_SUPPLY_TYPE_USB_PD_DRP] = "USB_PD_DRP",
> > [POWER_SUPPLY_TYPE_APPLE_BRICK_ID] = "BrickID",
> > [POWER_SUPPLY_TYPE_WIRELESS] = "Wireless",
> > + [POWER_SUPPLY_TYPE_DOCK] = "Dock",
> > };
> >
> > static const char * const POWER_SUPPLY_USB_TYPE_TEXT[] = {
> > diff --git a/include/linux/power_supply.h b/include/linux/power_supply.h
> > index e218041cc000..8f0425f00803 100644
> > --- a/include/linux/power_supply.h
> > +++ b/include/linux/power_supply.h
> > @@ -189,6 +189,7 @@ enum power_supply_type {
> > POWER_SUPPLY_TYPE_USB_PD_DRP, /* PD Dual Role Port */
> > POWER_SUPPLY_TYPE_APPLE_BRICK_ID, /* Apple Charging Method */
> > POWER_SUPPLY_TYPE_WIRELESS, /* Wireless */
> > + POWER_SUPPLY_TYPE_DOCK, /* Dock Charging */
> > };
> >
> > enum power_supply_usb_type {
> > --
> > 2.35.1.616.g0bdcbb4464-goog
> >
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2022-06-09 20:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-07 3:43 [PATCH v2] power: supply: add dock type Jack Wu
2022-03-07 4:05 ` Jack Wu
2022-06-09 20:26 ` Sebastian Reichel [this message]
-- strict thread matches above, loose matches on Subject: below --
2022-03-07 3:31 [PATCH v1] " Jack Wu
2022-03-07 3:31 ` [PATCH v2] " Jack Wu
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=20220609202613.pjojjw7meb4bekfr@mercury.elektranox.org \
--to=sebastian.reichel@collabora.com \
--cc=apelosi@google.com \
--cc=kernel-team@android.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=vincentwang@google.com \
--cc=wjack@google.com \
--cc=yangken@google.com \
/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).