All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sebastian Reichel <sre@kernel.org>
To: Liam Breck <liam@networkimprov.net>
Cc: Tony Lindgren <tony@atomide.com>,
	linux-pm@vger.kernel.org, Hans de Goede <hdegoede@redhat.com>
Subject: Re: [PATCH v1 7/7] power: bq24190_charger: Set bq24190-battery device .type=unknown
Date: Fri, 24 Mar 2017 12:22:15 +0100	[thread overview]
Message-ID: <20170324112215.uleonp3hu4oxprau@earth> (raw)
In-Reply-To: <CAKvHMgTVvytGyzxR_ay7v216qwYnekn_c3O72XzdPANhX7zwtQ@mail.gmail.com>

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

Hi,

On Fri, Mar 24, 2017 at 03:44:51AM -0700, Liam Breck wrote:
> On Fri, Mar 24, 2017 at 2:39 AM, Sebastian Reichel <sre@kernel.org> wrote:
> > On Thu, Mar 23, 2017 at 01:47:23PM -0700, Liam Breck wrote:
> > > On Thu, Mar 23, 2017 at 3:52 AM, Sebastian Reichel <sre@kernel.org> wrote:
> > > > That still leaves the health status reading, though. From
> > > > userspace's point-of-view this should be merged into the
> > > > battery device, if fuel-gauge can't provide that information.
> > >
> > > You mean merged into the -charger device? -battery is the one
> > > we're dropping.
> > >
> > > If you did mean -battery, could you elaborate?
> >
> > I was not talking about bq24190-battery. I meant the battery
> > device provided by the fuel-gauge. From userspace's point of
> > view a battery device, which is usually derived from the
> > fuel-gauge should contain battery related information.
> 
> It doesn't sound right to ask every gauge to absorb features from a
> specific charger. Userspace apps are already watching both USB and
> battery power supply types for a given battery. They'll pick up a
> health issue if we merge -battery and -charger health. Isn't that
> enough?

Technically it's not correct, since high battery temperature is a
much bigger safety risk than high charger chip temperature. I guess
it's good enough, though. I guess the battery temperature health is
related to charging anyways, which is different from the ones making
the battery itself dangerous. So I'm fine with that solution.

> > Since the battery health information is battery related it
> > should somehow be merged into the data from the fuel-gauge.
> > That's what Hans implemented with the function-pointer
> > construct and what you suggested to implement in this mail:
> >
> > http://marc.info/?l=linux-pm&m=149026871313238&w=2
> 
> The merge I suggested was of properties from all power drivers into a
> single sysfs device. Which I would work on if you are eager to have
> it. I realize it would take a while to be merged.

Only the devices belonging to the same battery should be
exposed as one device. Also charger is extra device, since
it may be used to charge multiple batteries. So far its
pretty uncommon, that charger chip provides information
about the battery, so you would spent lots of time for
a single corner case. So while I would like to have it,
I don't think its worth the time to implement it.

-- Sebastian

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

  reply	other threads:[~2017-03-24 11:22 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-21 22:09 [PATCH v1 0/7] BQ24190 support for power_supply_battery_info and DT binding Liam Breck
2017-03-21 22:09 ` [PATCH v1 1/7] devicetree: power: battery: Add properties for pre-charge and end-charge current Liam Breck
2017-03-24  9:01   ` Sebastian Reichel
2017-03-25  0:34     ` Liam Breck
2017-03-29  0:43       ` Rob Herring
     [not found]   ` <20170321220921.5834-2-liam-RYWXG+zxWwBdeoIcmNTgJF6hYfS7NtTn@public.gmane.org>
2017-03-22 12:04     ` Hans de Goede
2017-03-29  0:39     ` Rob Herring
2017-03-29  1:42       ` Liam Breck
2017-03-21 22:09 ` [PATCH v1 2/7] devicetree: power: Add docs for TI BQ24190 battery charger Liam Breck
2017-03-24  9:00   ` Sebastian Reichel
     [not found]   ` <20170321220921.5834-3-liam-RYWXG+zxWwBdeoIcmNTgJF6hYfS7NtTn@public.gmane.org>
2017-03-22 12:04     ` Hans de Goede
2017-03-29  0:47     ` Rob Herring
2017-03-29  1:48       ` Liam Breck
2017-03-21 22:09 ` [PATCH v1 3/7] power: power_supply_core: Add *_battery_info fields for pre- and end-charge current Liam Breck
2017-03-22 12:12   ` Hans de Goede
2017-03-24  9:07   ` Sebastian Reichel
2017-03-21 22:09 ` [PATCH v1 4/7] power: bq24190_charger: Uniform pm_runtime_get() failure handling Liam Breck
2017-03-22 12:14   ` Hans de Goede
2017-03-22 15:35   ` Tony Lindgren
2017-03-24  9:13   ` Sebastian Reichel
2017-03-21 22:09 ` [PATCH v1 5/7] power: bq24190_charger: Reorder init sequence in probe() Liam Breck
2017-03-22 12:14   ` Hans de Goede
2017-03-22 15:36     ` Tony Lindgren
2017-03-21 22:09 ` [PATCH v1 6/7] power: bq24190_charger: Add power_supply_battery_info and devicetree support Liam Breck
2017-03-22 12:15   ` Hans de Goede
2017-03-24  9:20   ` Sebastian Reichel
2017-03-21 22:09 ` [PATCH v1 7/7] power: bq24190_charger: Set bq24190-battery device .type=unknown Liam Breck
2017-03-22 12:25   ` Hans de Goede
2017-03-22 13:15     ` Hans de Goede
2017-03-22 13:37       ` Liam Breck
2017-03-22 14:41         ` Hans de Goede
2017-03-22 18:33           ` Liam Breck
2017-03-23  8:18             ` Hans de Goede
2017-03-23  8:55               ` Liam Breck
2017-03-22 13:22     ` Liam Breck
2017-03-23 10:52   ` Sebastian Reichel
2017-03-23 11:31     ` Liam Breck
2017-03-23 13:37       ` Sebastian Reichel
2017-03-23 19:05         ` Liam Breck
2017-03-23 20:47     ` Liam Breck
2017-03-24  9:39       ` Sebastian Reichel
2017-03-24 10:44         ` Liam Breck
2017-03-24 11:22           ` Sebastian Reichel [this message]
2017-03-24 11:56             ` Liam Breck
2017-03-29 14:12               ` Sebastian Reichel
2017-04-14 22:43     ` Liam Breck

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=20170324112215.uleonp3hu4oxprau@earth \
    --to=sre@kernel.org \
    --cc=hdegoede@redhat.com \
    --cc=liam@networkimprov.net \
    --cc=linux-pm@vger.kernel.org \
    --cc=tony@atomide.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.