[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHnoD8CtN6QMUDnd+A+WqG__CL0njSqYvgCu0oKTiieQGaE88g@mail.gmail.com>
Date: Fri, 7 Jan 2022 11:37:19 +0800
From: Jack Wu <wjack@...gle.com>
To: Sebastian Reichel <sre@...nel.org>
Cc: kernel-team@...roid.com, linux-pm@...r.kernel.org,
linux-kernel@...r.kernel.org, AleX Pelosi <apelosi@...gle.com>,
Vincent Wang <vincentwang@...gle.com>
Subject: Re: [PATCH v1] power: supply: add dock type
+ Alex and Vincent
Jack Wu <wjack@...gle.com> 於 2022年1月4日 週二 下午8:25寫道:
>
> 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@...gle.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 f7904efc4cfa..854299a0d36f 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 c3d7cbcd4fad..53494b56bbb4 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 9ca1f120a211..fa80eaa54242 100644
> --- a/include/linux/power_supply.h
> +++ b/include/linux/power_supply.h
> @@ -187,6 +187,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.34.1.448.ga2b2bfdf31-goog
>
Powered by blists - more mailing lists