All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: Sebastian Reichel <sebastian.reichel@collabora.com>
Cc: Armin Wolf <W_Armin@gmx.de>, Hans de Goede <hdegoede@redhat.com>,
	 platform-driver-x86@vger.kernel.org, linux-pm@vger.kernel.org,
	 LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 1/4] power: supply: core: Add additional health status values
Date: Fri, 9 May 2025 13:09:43 +0300 (EEST)	[thread overview]
Message-ID: <ff044893-04bd-84e1-cfc6-842787a8ba54@linux.intel.com> (raw)
In-Reply-To: <8cb0e0f7-a48e-5770-0c82-f0a75ed23d66@linux.intel.com>

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

On Mon, 5 May 2025, Ilpo Järvinen wrote:
> On Wed, 30 Apr 2025, Sebastian Reichel wrote:
> > On Tue, Apr 29, 2025 at 02:36:03AM +0200, Armin Wolf wrote:
> > > Some batteries can signal when an internal fuse was blown. In such a
> > > case POWER_SUPPLY_HEALTH_DEAD is too vague for userspace applications
> > > to perform meaningful diagnostics.
> > > 
> > > Additionally some batteries can also signal when some of their
> > > internal cells are imbalanced. In such a case returning
> > > POWER_SUPPLY_HEALTH_UNSPEC_FAILURE is again too vague for userspace
> > > applications to perform meaningful diagnostics.
> > > 
> > > Add new health status values for both cases.
> > > 
> > > Signed-off-by: Armin Wolf <W_Armin@gmx.de>
> > 
> > Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com>
> 
> Hi Sebastian,
> 
> Is it okay with you I take this through pdx86 tree?

Ping?

-- 
 i.

> 
> --
>  i.
> 
> > 
> > -- Sebastian
> > 
> > > ---
> > > Changes since v1:
> > >  - rename "Fuse blown" to "Blown fuse"
> > >  - rename "Cell imbalanced" to "Cell imbalance"
> > > ---
> > >  Documentation/ABI/testing/sysfs-class-power | 2 +-
> > >  drivers/power/supply/power_supply_sysfs.c   | 2 ++
> > >  include/linux/power_supply.h                | 2 ++
> > >  3 files changed, 5 insertions(+), 1 deletion(-)
> > > 
> > > diff --git a/Documentation/ABI/testing/sysfs-class-power b/Documentation/ABI/testing/sysfs-class-power
> > > index 2a5c1a09a28f..be8be54b183d 100644
> > > --- a/Documentation/ABI/testing/sysfs-class-power
> > > +++ b/Documentation/ABI/testing/sysfs-class-power
> > > @@ -456,7 +456,7 @@ Description:
> > >  			      "Over voltage", "Under voltage", "Unspecified failure", "Cold",
> > >  			      "Watchdog timer expire", "Safety timer expire",
> > >  			      "Over current", "Calibration required", "Warm",
> > > -			      "Cool", "Hot", "No battery"
> > > +			      "Cool", "Hot", "No battery", "Blown fuse", "Cell imbalance"
> > >  
> > >  What:		/sys/class/power_supply/<supply_name>/precharge_current
> > >  Date:		June 2017
> > > diff --git a/drivers/power/supply/power_supply_sysfs.c b/drivers/power/supply/power_supply_sysfs.c
> > > index edb058c19c9c..2703ed1dd943 100644
> > > --- a/drivers/power/supply/power_supply_sysfs.c
> > > +++ b/drivers/power/supply/power_supply_sysfs.c
> > > @@ -110,6 +110,8 @@ static const char * const POWER_SUPPLY_HEALTH_TEXT[] = {
> > >  	[POWER_SUPPLY_HEALTH_COOL]		    = "Cool",
> > >  	[POWER_SUPPLY_HEALTH_HOT]		    = "Hot",
> > >  	[POWER_SUPPLY_HEALTH_NO_BATTERY]	    = "No battery",
> > > +	[POWER_SUPPLY_HEALTH_BLOWN_FUSE]	    = "Blown fuse",
> > > +	[POWER_SUPPLY_HEALTH_CELL_IMBALANCE]	    = "Cell imbalance",
> > >  };
> > >  
> > >  static const char * const POWER_SUPPLY_TECHNOLOGY_TEXT[] = {
> > > diff --git a/include/linux/power_supply.h b/include/linux/power_supply.h
> > > index 888824592953..69df3a452918 100644
> > > --- a/include/linux/power_supply.h
> > > +++ b/include/linux/power_supply.h
> > > @@ -71,6 +71,8 @@ enum {
> > >  	POWER_SUPPLY_HEALTH_COOL,
> > >  	POWER_SUPPLY_HEALTH_HOT,
> > >  	POWER_SUPPLY_HEALTH_NO_BATTERY,
> > > +	POWER_SUPPLY_HEALTH_BLOWN_FUSE,
> > > +	POWER_SUPPLY_HEALTH_CELL_IMBALANCE,
> > >  };
> > >  
> > >  enum {
> > > -- 
> > > 2.39.5
> > > 
> > 
> 

  reply	other threads:[~2025-05-09 10:09 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-29  0:36 [PATCH v2 1/4] power: supply: core: Add additional health status values Armin Wolf
2025-04-29  0:36 ` [PATCH v2 2/4] platform/x86: dell-ddv: Implement the battery matching algorithm Armin Wolf
2025-04-29  0:36 ` [PATCH v2 3/4] platform/x86: dell-ddv: Expose the battery manufacture date to userspace Armin Wolf
2025-04-29  0:36 ` [PATCH v2 4/4] platform/x86: dell-ddv: Expose the battery health " Armin Wolf
2025-04-29 23:44 ` [PATCH v2 1/4] power: supply: core: Add additional health status values Sebastian Reichel
2025-05-05 12:22   ` Ilpo Järvinen
2025-05-09 10:09     ` Ilpo Järvinen [this message]
2025-05-11 22:22       ` Sebastian Reichel
2025-05-11 22:32 ` Ilpo Järvinen
2025-05-11 22:33   ` Armin Wolf

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=ff044893-04bd-84e1-cfc6-842787a8ba54@linux.intel.com \
    --to=ilpo.jarvinen@linux.intel.com \
    --cc=W_Armin@gmx.de \
    --cc=hdegoede@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=sebastian.reichel@collabora.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 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.