linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC 0/4] Enable power supply charging control
@ 2015-03-06 10:33 Jenny TC
  2015-03-06 10:33 ` [RFC 1/4] power_supply: Introduce charging object table Jenny TC
                   ` (3 more replies)
  0 siblings, 4 replies; 18+ messages in thread
From: Jenny TC @ 2015-03-06 10:33 UTC (permalink / raw)
  To: linux-pm, linux-kernel, Sebastian Reichel
  Cc: Anton Vorontsov, David Woodhouse, jonghwa3.lee, myungjoo.ham,
	Pallala Ramakrishna, Jenny TC

Enable power supply based charging control for charger manager.
At present charger manager allows to control charging using
regulator interface. This series of patch extends the charger
manager to setup and monitor charging using power supply based
controls. This patch moves the features introduced in
https://lkml.org/lkml/2014/8/13/355  to charger manager.

Jenny TC (4):
  power_supply: Introduce charging object table
  power: core: Add generic interface to get battery specification.
  power_supply: Introduce charger control interface
  charger-manager: Enable psy based charge control

 drivers/power/charger-manager.c       |  486 +++++++++++++++++++++++++--------
 drivers/power/power_supply_core.c     |   86 ++++++
 include/linux/power/charger-manager.h |   30 +-
 include/linux/power_supply.h          |   67 +++++
 4 files changed, 552 insertions(+), 117 deletions(-)

-- 
1.7.9.5


^ permalink raw reply	[flat|nested] 18+ messages in thread
* RE: [RFC 1/4] power_supply: Introduce charging object table
@ 2015-03-09 12:26 Tc, Jenny
  2015-03-09 14:08 ` 'Sebastian Reichel'
  0 siblings, 1 reply; 18+ messages in thread
From: Tc, Jenny @ 2015-03-09 12:26 UTC (permalink / raw)
  To: 'Sebastian Reichel'
  Cc: linux-pm, linux-kernel, Anton Vorontsov, David Woodhouse,
	jonghwa3.lee, myungjoo.ham, Pallala, Ramakrishna


Hi,

> > +#define PSY_MAX_BAT_NAME_LEN 8
> > +#define PSY_MAX_TEMP_ZONE 6
> > +
> > +struct psy_charging_obj {
> 
> This is not just about charging data, but also about the batteries
> thermal limits, technology and full capacity, so how about
> 
> struct psy_battery_information {

Ok, Agree.
> 
> > +	char name[PSY_MAX_BAT_NAME_LEN];
> 
> char *name;
> 
> No need for arbitrary length limitation.

The length limitation is introduced to form a packed structure so that
the data can be read directly from memory without parsing.

> 
> > +	int battery_type;
> > +	int temp_max;
> > +	int temp_min;
> > +	int full_condition_soc;
> 
> Please be more verbose about the information being stored here.

Ok..Agree.
> 
> > +	int full_condition_capacity;
> > +	int full_condition_voltage;
> > +	int iterm; /* charge termination current */
> > +	/* CC/CV table for different temperature range */
> > +	int temp_mon_count; /* number of entries in temp_mon_table */
> > +	struct psy_temp_mon_table temp_mon_table[PSY_MAX_TEMP_ZONE];
> 
> No need to embed this into the struct. Just point to the array and
> remove the size limitation.

This is to make sure that the array is packed so that the data can be
read directly from memory without parsing.

-Jenny

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

end of thread, other threads:[~2015-03-10  5:21 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-06 10:33 [RFC 0/4] Enable power supply charging control Jenny TC
2015-03-06 10:33 ` [RFC 1/4] power_supply: Introduce charging object table Jenny TC
2015-03-06 11:12   ` Oliver Neukum
2015-03-08  1:31     ` Sebastian Reichel
2015-03-08  1:00   ` Sebastian Reichel
2015-03-06 10:33 ` [RFC 2/4] power: core: Add generic interface to get battery specification Jenny TC
2015-03-06 11:16   ` Oliver Neukum
2015-03-09 11:24     ` jonghwa3.lee
2015-03-06 10:33 ` [RFC 3/4] power_supply: Introduce charger control interface Jenny TC
2015-03-08  1:55   ` Sebastian Reichel
2015-03-09 12:47     ` Tc, Jenny
2015-03-09 14:55       ` Sebastian Reichel
2015-03-06 10:33 ` [RFC 4/4] charger-manager: Enable psy based charge control Jenny TC
2015-03-08  2:14   ` Sebastian Reichel
2015-03-10  5:21     ` Tc, Jenny
2015-03-09 12:26 [RFC 1/4] power_supply: Introduce charging object table Tc, Jenny
2015-03-09 14:08 ` 'Sebastian Reichel'
2015-03-10  5:16   ` Tc, Jenny

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).