From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756291AbbCFLNZ (ORCPT ); Fri, 6 Mar 2015 06:13:25 -0500 Received: from cantor2.suse.de ([195.135.220.15]:58230 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756268AbbCFLNV (ORCPT ); Fri, 6 Mar 2015 06:13:21 -0500 Message-ID: <1425640370.2197.0.camel@suse.de> Subject: Re: [RFC 1/4] power_supply: Introduce charging object table From: Oliver Neukum To: Jenny TC Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Sebastian Reichel , Anton Vorontsov , David Woodhouse , jonghwa3.lee@samsung.com, myungjoo.ham@gmail.com, Pallala Ramakrishna Date: Fri, 06 Mar 2015 12:12:50 +0100 In-Reply-To: <1425638007-9411-2-git-send-email-jenny.tc@intel.com> References: <1425638007-9411-1-git-send-email-jenny.tc@intel.com> <1425638007-9411-2-git-send-email-jenny.tc@intel.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.12.9 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 2015-03-06 at 16:03 +0530, Jenny TC wrote: > Charging current (CC) and charging voltage (CV) may vary based on > battery temperature. To support CC and CV for different temperature > zones, defined a charging object which holds the properties related > to battery charging. > > Signed-off-by: Jenny TC > --- > include/linux/power_supply.h | 27 +++++++++++++++++++++++++++ > 1 file changed, 27 insertions(+) > > diff --git a/include/linux/power_supply.h b/include/linux/power_supply.h > index 096dbce..7aada44 100644 > --- a/include/linux/power_supply.h > +++ b/include/linux/power_supply.h > @@ -252,6 +252,33 @@ struct power_supply_info { > int use_for_apm; > }; > > + > +struct psy_temp_mon_table { > + int temp_max; > + int temp_min; > + int charging_current; /* CC */ > + int charging_voltage; /* CV */ In which units? > + /* delta voltage at which charging should restart */ > + int maint_voltage_delta; > +}; > + > +#define PSY_MAX_BAT_NAME_LEN 8 > +#define PSY_MAX_TEMP_ZONE 6 > + > +struct psy_charging_obj { > + char name[PSY_MAX_BAT_NAME_LEN]; > + int battery_type; > + int temp_max; > + int temp_min; > + int full_condition_soc; > + 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]; > +}; > + > extern struct atomic_notifier_head power_supply_notifier; > extern int power_supply_reg_notifier(struct notifier_block *nb); > extern void power_supply_unreg_notifier(struct notifier_block *nb); -- Oliver Neukum