[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20ADAB092842284E95860F279283C5642EEC90C3@BGSMSX104.gar.corp.intel.com>
Date: Mon, 9 Mar 2015 12:26:21 +0000
From: "Tc, Jenny" <jenny.tc@...el.com>
To: 'Sebastian Reichel' <sre@...nel.org>
CC: "linux-pm@...r.kernel.org" <linux-pm@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"Anton Vorontsov" <anton.vorontsov@...aro.org>,
David Woodhouse <dwmw2@...radead.org>,
"jonghwa3.lee@...sung.com" <jonghwa3.lee@...sung.com>,
"myungjoo.ham@...il.com" <myungjoo.ham@...il.com>,
"Pallala, Ramakrishna" <ramakrishna.pallala@...el.com>
Subject: RE: [RFC 1/4] power_supply: Introduce charging object table
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists