lkml.org 
[lkml]   [2013]   [Oct]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/7] power_supply: Add charger control properties
On Mon, Oct 28, 2013 at 03:36:36AM +0000, Tc, Jenny wrote:
> > But do we really want to control the chargers through the power_supply's user-visible
> > interface? It makes the whole power supply thing so complicated that I'm already losing
> > track of it. Right now I think I would prefer to move all the charger logic out of the psy
> > class.
> >
>
> I think exposing properties make the logic generic, otherwise it may end up in having callback
> functions.
>
> Also there are some scenarios where the charging algorithm has to be in the
> user space.

Which scenarios?

Plus, I am more questioning if the power supply framework is the right
thing to control the *chargers*. Chargers are not the power supply to the
system or any device (well, except for the batteries themselves).

> Using the patch https://lkml.org/lkml/2013/7/25/204,
> the power supply change notification can be broadcasted. We can add notifier events
> for power_supply_register and thermal throttling. This way power_supply_charger.c can
> be a separate driver and it can listen to psy notifications to take actions.

If you ever need this particular notifier, I am OK with it (but I'll
consider applying it only together with some its users).

Basically, I am more against these three patches:

[PATCH 3/7] power_supply: add throttle state
[PATCH 2/7] power_supply: add charger cable properties
[PATCH 1/7] power_supply: Add charger control properties (enable_charger part)

These three add too much "charger" specifics to the power_supply stuff. I
think they deserve their own subsystem/class/whatever.

Also, the battid framework is written without any notion of device/driver
separation, uses global variables, and I suspect it should not exist at
all (psy_get_batt_prop function makes me think that you should just
register the i2c/spi/w1 battery with the power_supply and not use the
ad-hoc stuff).

Anton


\
 
 \ /
  Last update: 2013-10-28 07:41    [W:0.067 / U:4.928 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site