All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] POWER SUPPLY CLASS/SUBSYSTEM : add new status 'Full charging' can show that the battery is fully charged but still charging
@ 2021-07-07  8:17 zhuguanghong
  2021-08-13 16:34 ` Sebastian Reichel
  0 siblings, 1 reply; 2+ messages in thread
From: zhuguanghong @ 2021-07-07  8:17 UTC (permalink / raw)
  To: sre; +Cc: linux-pm, linux-kernel, zhuguanghong

Signed-off-by: zhuguanghong <zhuguanghong@uniontech.com>
---
 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..0ddb84b7637f 100644
--- a/drivers/power/supply/power_supply_sysfs.c
+++ b/drivers/power/supply/power_supply_sysfs.c
@@ -78,6 +78,7 @@ static const char * const POWER_SUPPLY_STATUS_TEXT[] = {
 	[POWER_SUPPLY_STATUS_DISCHARGING]	= "Discharging",
 	[POWER_SUPPLY_STATUS_NOT_CHARGING]	= "Not charging",
 	[POWER_SUPPLY_STATUS_FULL]		= "Full",
+	[POWER_SUPPLY_STATUS_FULL_CHARGING]	= "Full charging",
 };
 
 static const char * const POWER_SUPPLY_CHARGE_TYPE_TEXT[] = {
diff --git a/include/linux/power_supply.h b/include/linux/power_supply.h
index be203985ecdd..04844dbb18c4 100644
--- a/include/linux/power_supply.h
+++ b/include/linux/power_supply.h
@@ -37,6 +37,7 @@ enum {
 	POWER_SUPPLY_STATUS_DISCHARGING,
 	POWER_SUPPLY_STATUS_NOT_CHARGING,
 	POWER_SUPPLY_STATUS_FULL,
+	POWER_SUPPLY_STATUS_FULL_CHARGING,
 };
 
 /* What algorithm is the charger using? */
-- 
2.20.1




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

* Re: [PATCH] POWER SUPPLY CLASS/SUBSYSTEM : add new status 'Full charging' can show that the battery is fully charged but still charging
  2021-07-07  8:17 [PATCH] POWER SUPPLY CLASS/SUBSYSTEM : add new status 'Full charging' can show that the battery is fully charged but still charging zhuguanghong
@ 2021-08-13 16:34 ` Sebastian Reichel
  0 siblings, 0 replies; 2+ messages in thread
From: Sebastian Reichel @ 2021-08-13 16:34 UTC (permalink / raw)
  To: zhuguanghong; +Cc: linux-pm, linux-kernel

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

Hi,

On Wed, Jul 07, 2021 at 04:17:51PM +0800, zhuguanghong wrote:

Where is the long description?

Why is this needed? If userspace wants to know the details
(trickle charging vs small leak battery usage) it can always
check current_now / power_now. I think adding this will make
things more complex without any real improvement.

> Signed-off-by: zhuguanghong <zhuguanghong@uniontech.com>
> ---


>  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..0ddb84b7637f 100644
> --- a/drivers/power/supply/power_supply_sysfs.c
> +++ b/drivers/power/supply/power_supply_sysfs.c
> @@ -78,6 +78,7 @@ static const char * const POWER_SUPPLY_STATUS_TEXT[] = {
>  	[POWER_SUPPLY_STATUS_DISCHARGING]	= "Discharging",
>  	[POWER_SUPPLY_STATUS_NOT_CHARGING]	= "Not charging",
>  	[POWER_SUPPLY_STATUS_FULL]		= "Full",
> +	[POWER_SUPPLY_STATUS_FULL_CHARGING]	= "Full charging",
>  };
>  
>  static const char * const POWER_SUPPLY_CHARGE_TYPE_TEXT[] = {
> diff --git a/include/linux/power_supply.h b/include/linux/power_supply.h
> index be203985ecdd..04844dbb18c4 100644
> --- a/include/linux/power_supply.h
> +++ b/include/linux/power_supply.h
> @@ -37,6 +37,7 @@ enum {
>  	POWER_SUPPLY_STATUS_DISCHARGING,
>  	POWER_SUPPLY_STATUS_NOT_CHARGING,
>  	POWER_SUPPLY_STATUS_FULL,
> +	POWER_SUPPLY_STATUS_FULL_CHARGING,
>  };
>  
>  /* What algorithm is the charger using? */
> -- 
> 2.20.1
> 
> 
> 

[-- 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:[~2021-08-13 16:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-07  8:17 [PATCH] POWER SUPPLY CLASS/SUBSYSTEM : add new status 'Full charging' can show that the battery is fully charged but still charging zhuguanghong
2021-08-13 16:34 ` Sebastian Reichel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.