linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 1/1] power: supply: add wireless power_supply_type
@ 2020-08-13 18:34 Guru Das Srinagesh
  2020-08-26 14:55 ` Sebastian Reichel
  0 siblings, 1 reply; 2+ messages in thread
From: Guru Das Srinagesh @ 2020-08-13 18:34 UTC (permalink / raw)
  To: Sebastian Reichel, linux-pm
  Cc: Subbaraman Narayanamurthy, David Collins, linux-kernel,
	Guru Das Srinagesh

From: Subbaraman Narayanamurthy <subbaram@codeaurora.org>

Currently, power_supply framework supports only Battery, UPS,
Mains and USB power_supply_type. Add wireless power_supply_type
so that the drivers which supports wireless can register a power
supply class device with POWER_SUPPLY_TYPE_WIRELESS.

Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
Signed-off-by: Guru Das Srinagesh <gurus@codeaurora.org>
---
 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 40213c7..651599f 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"
+		Valid values: "Battery", "UPS", "Mains", "USB", "Wireless"
 
 ===== Battery Properties =====
 
diff --git a/drivers/power/supply/power_supply_sysfs.c b/drivers/power/supply/power_supply_sysfs.c
index 3d38308..a616b9d 100644
--- a/drivers/power/supply/power_supply_sysfs.c
+++ b/drivers/power/supply/power_supply_sysfs.c
@@ -56,6 +56,7 @@ static const char * const POWER_SUPPLY_TYPE_TEXT[] = {
 	[POWER_SUPPLY_TYPE_USB_PD]		= "USB_PD",
 	[POWER_SUPPLY_TYPE_USB_PD_DRP]		= "USB_PD_DRP",
 	[POWER_SUPPLY_TYPE_APPLE_BRICK_ID]	= "BrickID",
+	[POWER_SUPPLY_TYPE_WIRELESS]		= "Wireless",
 };
 
 static const char * const POWER_SUPPLY_USB_TYPE_TEXT[] = {
diff --git a/include/linux/power_supply.h b/include/linux/power_supply.h
index 97cc4b8..ef03299 100644
--- a/include/linux/power_supply.h
+++ b/include/linux/power_supply.h
@@ -186,6 +186,7 @@ enum power_supply_type {
 	POWER_SUPPLY_TYPE_USB_PD,		/* Power Delivery Port */
 	POWER_SUPPLY_TYPE_USB_PD_DRP,		/* PD Dual Role Port */
 	POWER_SUPPLY_TYPE_APPLE_BRICK_ID,	/* Apple Charging Method */
+	POWER_SUPPLY_TYPE_WIRELESS,		/* Wireless */
 };
 
 enum power_supply_usb_type {
-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v1 1/1] power: supply: add wireless power_supply_type
  2020-08-13 18:34 [PATCH v1 1/1] power: supply: add wireless power_supply_type Guru Das Srinagesh
@ 2020-08-26 14:55 ` Sebastian Reichel
  0 siblings, 0 replies; 2+ messages in thread
From: Sebastian Reichel @ 2020-08-26 14:55 UTC (permalink / raw)
  To: Guru Das Srinagesh
  Cc: linux-pm, Subbaraman Narayanamurthy, David Collins, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 2538 bytes --]

Hi,

On Thu, Aug 13, 2020 at 11:34:08AM -0700, Guru Das Srinagesh wrote:
> From: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
> 
> Currently, power_supply framework supports only Battery, UPS,
> Mains and USB power_supply_type. Add wireless power_supply_type
> so that the drivers which supports wireless can register a power
> supply class device with POWER_SUPPLY_TYPE_WIRELESS.
> 
> Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
> Signed-off-by: Guru Das Srinagesh <gurus@codeaurora.org>
> ---

Thanks, queued.

-- Sebastian

>  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 40213c7..651599f 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"
> +		Valid values: "Battery", "UPS", "Mains", "USB", "Wireless"
>  
>  ===== Battery Properties =====
>  
> diff --git a/drivers/power/supply/power_supply_sysfs.c b/drivers/power/supply/power_supply_sysfs.c
> index 3d38308..a616b9d 100644
> --- a/drivers/power/supply/power_supply_sysfs.c
> +++ b/drivers/power/supply/power_supply_sysfs.c
> @@ -56,6 +56,7 @@ static const char * const POWER_SUPPLY_TYPE_TEXT[] = {
>  	[POWER_SUPPLY_TYPE_USB_PD]		= "USB_PD",
>  	[POWER_SUPPLY_TYPE_USB_PD_DRP]		= "USB_PD_DRP",
>  	[POWER_SUPPLY_TYPE_APPLE_BRICK_ID]	= "BrickID",
> +	[POWER_SUPPLY_TYPE_WIRELESS]		= "Wireless",
>  };
>  
>  static const char * const POWER_SUPPLY_USB_TYPE_TEXT[] = {
> diff --git a/include/linux/power_supply.h b/include/linux/power_supply.h
> index 97cc4b8..ef03299 100644
> --- a/include/linux/power_supply.h
> +++ b/include/linux/power_supply.h
> @@ -186,6 +186,7 @@ enum power_supply_type {
>  	POWER_SUPPLY_TYPE_USB_PD,		/* Power Delivery Port */
>  	POWER_SUPPLY_TYPE_USB_PD_DRP,		/* PD Dual Role Port */
>  	POWER_SUPPLY_TYPE_APPLE_BRICK_ID,	/* Apple Charging Method */
> +	POWER_SUPPLY_TYPE_WIRELESS,		/* Wireless */
>  };
>  
>  enum power_supply_usb_type {
> -- 
> The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
> a Linux Foundation Collaborative Project
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-08-26 14:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-13 18:34 [PATCH v1 1/1] power: supply: add wireless power_supply_type Guru Das Srinagesh
2020-08-26 14:55 ` Sebastian Reichel

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).