From: Anton Vorontsov <anton@enomsg.org>
To: "Tc, Jenny" <jenny.tc@intel.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"Kim, Milo" <Milo.Kim@ti.com>, "Lee Jones" <lee.jones@linaro.org>,
"Jingoo Han" <jg1.han@samsung.com>,
"Chanwoo Choi" <cw00.choi@samsung.com>,
"Sachin Kamat" <sachin.kamat@linaro.org>,
"Rupesh Kumar" <rupesh.kumar@stericsson.com>,
"Lars-Peter Clausen" <lars@metafoo.de>,
"Pali Rohár" <pali.rohar@gmail.com>,
"Mark Brown" <broonie@opensource.wolfsonmicro.com>,
"Rhyland Klein" <rklein@nvidia.com>
Subject: Re: [PATCH 1/7] power_supply: Add charger control properties
Date: Sun, 27 Oct 2013 23:18:08 -0700 [thread overview]
Message-ID: <20131028061807.GA31266@teo> (raw)
In-Reply-To: <20ADAB092842284E95860F279283C5640AA99A32@BGSMSX104.gar.corp.intel.com>
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
next prev parent reply other threads:[~2013-10-28 6:18 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-23 18:03 [PATCH 0/7] power_supply: Introduce Power Supply Charging Framework Jenny TC
2013-09-23 18:03 ` [PATCH 1/7] power_supply: Add charger control properties Jenny TC
2013-10-27 23:46 ` Anton Vorontsov
2013-10-28 3:36 ` Tc, Jenny
2013-10-28 6:18 ` Anton Vorontsov [this message]
2013-10-29 4:57 ` NeilBrown
2013-09-23 18:04 ` [PATCH 2/7] power_supply : add charger cable properties Jenny TC
2013-09-23 18:04 ` [PATCH 3/7] power_supply: add throttle state Jenny TC
2013-09-23 18:04 ` [PATCH 4/7] power_supply: Add power_supply notifier Jenny TC
2013-09-23 18:04 ` [PATCH 5/7] power_supply : Introduce battery identification framework Jenny TC
2013-09-23 18:04 ` [PATCH 6/7] power_supply: Introduce Power Supply charging framework Jenny TC
2013-09-23 18:04 ` [PATCH 7/7] power_supply: Introduce PSE compliant algorithm Jenny TC
2013-10-28 6:17 ` Anton Vorontsov
2013-10-25 16:49 ` [PATCH 0/7] power_supply: Introduce Power Supply Charging Framework Tc, Jenny
-- strict thread matches above, loose matches on Subject: below --
2013-11-01 5:18 [PATCH 1/7] power_supply: Add charger control properties Tc, Jenny
2013-11-27 17:52 ` Tc, Jenny
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=20131028061807.GA31266@teo \
--to=anton@enomsg.org \
--cc=Milo.Kim@ti.com \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=cw00.choi@samsung.com \
--cc=jenny.tc@intel.com \
--cc=jg1.han@samsung.com \
--cc=lars@metafoo.de \
--cc=lee.jones@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pali.rohar@gmail.com \
--cc=rklein@nvidia.com \
--cc=rupesh.kumar@stericsson.com \
--cc=sachin.kamat@linaro.org \
/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.