diff mbox series

[v1] power: supply: add dock type

Message ID 20211215033410.4113857-1-wjack@google.com
State Superseded
Headers show
Series [v1] power: supply: add dock type | expand

Commit Message

Jack Wu Dec. 15, 2021, 3:34 a.m. UTC
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>
---
 drivers/power/supply/power_supply_sysfs.c | 1 +
 include/linux/power_supply.h              | 1 +
 2 files changed, 2 insertions(+)

Comments

Sebastian Reichel Jan. 3, 2022, 5:52 p.m. UTC | #1
Hi,

On Wed, Dec 15, 2021 at 11:34:09AM +0800, Jack Wu wrote:
> 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>
> ---

This is missing updates to Documentation and a driver using this
feature.

-- Sebastian

>  drivers/power/supply/power_supply_sysfs.c | 1 +
>  include/linux/power_supply.h              | 1 +
>  2 files changed, 2 insertions(+)
> 
> 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.173.g76aa8bc2d0-goog
>
diff mbox series

Patch

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 {