Message ID | 1390411194-21410-2-git-send-email-jenny.tc@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Thursday, January 23, 2014 2:20 AM, Jenny TC wrote: > > Add new power supply properties for input current, charge termination > current, min and max temperature > > POWER_SUPPLY_PROP_TEMP_MIN - minimum operatable temperature > POWER_SUPPLY_PROP_TEMP_MAX - maximum operatable temperature > > POWER_SUPPLY_PROP_INLMT - input current limit programmed by charger. Indicates > the input current for a charging source. > > POWER_SUPPLY_PROP_CHARGE_TERM_CUR - Charge termination current used to detect > the end of charge condition > > Change-Id: Ifb40662bbfa24387ac7493ffa7ce01c6fae7e800 Please remove this 'Change-Id' from the commit message. Best regards, Jingoo Han > Signed-off-by: Jenny TC <jenny.tc@intel.com> > --- > Documentation/power/power_supply_class.txt | 6 ++++++ > drivers/power/power_supply_sysfs.c | 4 ++++ > include/linux/power_supply.h | 4 ++++ > 3 files changed, 14 insertions(+) -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi! > Add new power supply properties for input current, charge termination > current, min and max temperature > > POWER_SUPPLY_PROP_TEMP_MIN - minimum operatable temperature > POWER_SUPPLY_PROP_TEMP_MAX - maximum operatable temperature > > POWER_SUPPLY_PROP_INLMT - input current limit programmed by charger. Indicates > the input current for a charging source. This is pretty cryptic. Maybe the prefix should be shortened so that we get enough space for INPUT_LIMIT? -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 22/01/14 21:19, Jenny TC wrote: > Add new power supply properties for input current, charge termination > current, min and max temperature > > POWER_SUPPLY_PROP_TEMP_MIN - minimum operatable temperature > POWER_SUPPLY_PROP_TEMP_MAX - maximum operatable temperature What is the difference from TEMP_ALERT_MIN/TEMP_ALERT_MAX ? There is a difference in definitions, but what is the logical difference? > POWER_SUPPLY_PROP_INLMT - input current limit programmed by charger. Indicates > the input current for a charging source. > POWER_SUPPLY_PROP_CHARGE_TERM_CUR - Charge termination current used to detect > the end of charge condition For both of them: 1) Please don't use obscure abbreviations 2) Is this generic enough? I.e. besides your charge manager who will use that?
On Fri, Jan 24, 2014 at 08:25:19AM -0700, Dmitry Eremin-Solenikov wrote: > On 22/01/14 21:19, Jenny TC wrote: > > Add new power supply properties for input current, charge termination > > current, min and max temperature > > > > POWER_SUPPLY_PROP_TEMP_MIN - minimum operatable temperature > > POWER_SUPPLY_PROP_TEMP_MAX - maximum operatable temperature > > What is the difference from TEMP_ALERT_MIN/TEMP_ALERT_MAX ? > There is a difference in definitions, but what is the logical difference? TEMP_ALERT_MIN/MAX is to ALERT when temperature cross the threshold. TEMP_MIN/MAX is to stop charging/discharging when cross the threshold. > > > POWER_SUPPLY_PROP_INLMT - input current limit programmed by charger. Indicates > > the input current for a charging source. > > POWER_SUPPLY_PROP_CHARGE_TERM_CUR - Charge termination current used to detect > > the end of charge condition > > For both of them: > > 1) Please don't use obscure abbreviations Agreed > 2) Is this generic enough? I.e. besides your charge manager who will > use that? Generic and all charger drivers can use this. > > -- > With best wishes > Dmitry -Jenny -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/Documentation/power/power_supply_class.txt b/Documentation/power/power_supply_class.txt index 89a8816..f7e06d7 100644 --- a/Documentation/power/power_supply_class.txt +++ b/Documentation/power/power_supply_class.txt @@ -118,6 +118,10 @@ relative, time-based measurements. CONSTANT_CHARGE_CURRENT - constant charge current programmed by charger. CONSTANT_CHARGE_CURRENT_MAX - maximum charge current supported by the power supply object. +INPUT_CURRENT_LIMIT - input current limit programmed by charger. Indicates +the current drawn from a charging source. +CHARGE_TERM_CUR - Charge termination current used to detect the end of charge +condition CONSTANT_CHARGE_VOLTAGE - constant charge voltage programmed by charger. CONSTANT_CHARGE_VOLTAGE_MAX - maximum charge voltage supported by the @@ -140,6 +144,8 @@ TEMP_ALERT_MAX - maximum battery temperature alert. TEMP_AMBIENT - ambient temperature. TEMP_AMBIENT_ALERT_MIN - minimum ambient temperature alert. TEMP_AMBIENT_ALERT_MAX - maximum ambient temperature alert. +TEMP_MIN - minimum operatable temperature +TEMP_MAX - maximum operatable temperature TIME_TO_EMPTY - seconds left for battery to be considered empty (i.e. while battery powers a load) diff --git a/drivers/power/power_supply_sysfs.c b/drivers/power/power_supply_sysfs.c index 44420d1..222dd78 100644 --- a/drivers/power/power_supply_sysfs.c +++ b/drivers/power/power_supply_sysfs.c @@ -167,6 +167,7 @@ static struct device_attribute power_supply_attrs[] = { POWER_SUPPLY_ATTR(constant_charge_voltage_max), POWER_SUPPLY_ATTR(charge_control_limit), POWER_SUPPLY_ATTR(charge_control_limit_max), + POWER_SUPPLY_ATTR(input_cur_limit), POWER_SUPPLY_ATTR(energy_full_design), POWER_SUPPLY_ATTR(energy_empty_design), POWER_SUPPLY_ATTR(energy_full), @@ -178,6 +179,8 @@ static struct device_attribute power_supply_attrs[] = { POWER_SUPPLY_ATTR(capacity_alert_max), POWER_SUPPLY_ATTR(capacity_level), POWER_SUPPLY_ATTR(temp), + POWER_SUPPLY_ATTR(temp_max), + POWER_SUPPLY_ATTR(temp_min), POWER_SUPPLY_ATTR(temp_alert_min), POWER_SUPPLY_ATTR(temp_alert_max), POWER_SUPPLY_ATTR(temp_ambient), @@ -189,6 +192,7 @@ static struct device_attribute power_supply_attrs[] = { POWER_SUPPLY_ATTR(time_to_full_avg), POWER_SUPPLY_ATTR(type), POWER_SUPPLY_ATTR(scope), + POWER_SUPPLY_ATTR(charge_term_cur), /* Properties of type `const char *' */ POWER_SUPPLY_ATTR(model_name), POWER_SUPPLY_ATTR(manufacturer), diff --git a/include/linux/power_supply.h b/include/linux/power_supply.h index c9dc4e0..4dbb543 100644 --- a/include/linux/power_supply.h +++ b/include/linux/power_supply.h @@ -120,6 +120,7 @@ enum power_supply_property { POWER_SUPPLY_PROP_CONSTANT_CHARGE_VOLTAGE_MAX, POWER_SUPPLY_PROP_CHARGE_CONTROL_LIMIT, POWER_SUPPLY_PROP_CHARGE_CONTROL_LIMIT_MAX, + POWER_SUPPLY_PROP_INLMT, POWER_SUPPLY_PROP_ENERGY_FULL_DESIGN, POWER_SUPPLY_PROP_ENERGY_EMPTY_DESIGN, POWER_SUPPLY_PROP_ENERGY_FULL, @@ -131,6 +132,8 @@ enum power_supply_property { POWER_SUPPLY_PROP_CAPACITY_ALERT_MAX, /* in percents! */ POWER_SUPPLY_PROP_CAPACITY_LEVEL, POWER_SUPPLY_PROP_TEMP, + POWER_SUPPLY_PROP_TEMP_MAX, + POWER_SUPPLY_PROP_TEMP_MIN, POWER_SUPPLY_PROP_TEMP_ALERT_MIN, POWER_SUPPLY_PROP_TEMP_ALERT_MAX, POWER_SUPPLY_PROP_TEMP_AMBIENT, @@ -142,6 +145,7 @@ enum power_supply_property { POWER_SUPPLY_PROP_TIME_TO_FULL_AVG, POWER_SUPPLY_PROP_TYPE, /* use power_supply.type instead */ POWER_SUPPLY_PROP_SCOPE, + POWER_SUPPLY_PROP_CHARGE_TERM_CUR, /* Properties of type `const char *' */ POWER_SUPPLY_PROP_MODEL_NAME, POWER_SUPPLY_PROP_MANUFACTURER,
Add new power supply properties for input current, charge termination current, min and max temperature POWER_SUPPLY_PROP_TEMP_MIN - minimum operatable temperature POWER_SUPPLY_PROP_TEMP_MAX - maximum operatable temperature POWER_SUPPLY_PROP_INLMT - input current limit programmed by charger. Indicates the input current for a charging source. POWER_SUPPLY_PROP_CHARGE_TERM_CUR - Charge termination current used to detect the end of charge condition Change-Id: Ifb40662bbfa24387ac7493ffa7ce01c6fae7e800 Signed-off-by: Jenny TC <jenny.tc@intel.com> --- Documentation/power/power_supply_class.txt | 6 ++++++ drivers/power/power_supply_sysfs.c | 4 ++++ include/linux/power_supply.h | 4 ++++ 3 files changed, 14 insertions(+)