linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jenny TC <jenny.tc@intel.com>
To: linux-kernel@vger.kernel.org,
	Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Cc: "Anton Vorontsov" <cbouatmailru@gmail.com>,
	"Anton Vorontsov" <anton.vorontsov@linaro.org>,
	"Jenny TC" <jenny.tc@intel.com>, "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>,
	"Lars-Peter Clausen" <lars@metafoo.de>,
	"Pali Rohár" <pali.rohar@gmail.com>,
	"Rhyland Klein" <rklein@nvidia.com>,
	"Pavel Machek" <pavel@ucw.cz>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	"David Woodhouse" <dwmw2@infradead.org>,
	"Tony Lindgren" <tony@atomide.com>,
	"Russell King" <linux@arm.linux.org.uk>,
	"Sebastian Reichel" <sre@ring0.de>,
	aaro.koskinen@iki.fi,
	"Pallala Ramakrishna" <ramakrishna.pallala@intel.com>,
	freemangordon@abv.bg, linux-omap@vger.kernel.org
Subject: [PATCH 1/4] power_supply: Add inlmt,iterm, min/max temp props
Date: Tue,  4 Feb 2014 10:42:57 +0530	[thread overview]
Message-ID: <1391490780-6141-2-git-send-email-jenny.tc@intel.com> (raw)
In-Reply-To: <1391490780-6141-1-git-send-email-jenny.tc@intel.com>

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

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(+)

diff --git a/Documentation/power/power_supply_class.txt b/Documentation/power/power_supply_class.txt
index 89a8816..48cff88 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_CURRENT - 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..750a202 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_current_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_current),
 	/* 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..0278600 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_INPUT_CURRENT_LIMIT,
 	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_CURRENT,
 	/* Properties of type `const char *' */
 	POWER_SUPPLY_PROP_MODEL_NAME,
 	POWER_SUPPLY_PROP_MANUFACTURER,
-- 
1.7.9.5


  reply	other threads:[~2014-02-04  5:13 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-04  5:12 [PATCH v5 0/4] power_supply: Introduce power supply charging driver Jenny TC
2014-02-04  5:12 ` Jenny TC [this message]
2014-02-04  5:12 ` [PATCH 2/4] power_supply: Introduce generic psy " Jenny TC
2014-02-04 11:36   ` Pavel Machek
2014-02-05  8:14     ` Jenny Tc
2014-02-12 11:00       ` Pavel Machek
2014-02-13  0:51         ` Jingoo Han
2014-02-04  5:12 ` [PATCH 3/4] power_supply: Introduce PSE compliant algorithm Jenny TC
2014-02-04 11:36   ` Pavel Machek
2014-02-20  5:16     ` Jenny Tc
2014-02-21 14:45       ` Pavel Machek
2014-02-26  2:54         ` Jenny Tc
2014-02-27 19:47           ` Linus Walleij
2014-02-28  2:52             ` Jenny Tc
2014-02-27 20:46           ` Pavel Machek
2014-02-27 20:18   ` Linus Walleij
2014-02-28  3:07     ` Jenny Tc
2014-02-28 10:08       ` Pavel Machek
2014-03-03  3:11         ` Jenny Tc
2014-03-03 10:42           ` Pavel Machek
2014-03-07  3:34       ` Linus Walleij
2014-03-07  3:43         ` Jenny Tc
2014-02-04  5:13 ` [PATCH 4/4] power_supply: bq24261 charger driver Jenny TC
2014-02-04 11:36   ` Pavel Machek
2014-02-20  5:03     ` Jenny Tc
2014-02-21 14:44       ` Pavel Machek
2014-02-25 11:51         ` Jenny Tc
  -- strict thread matches above, loose matches on Subject: below --
2014-07-08  6:04 [PATCHv11 0/4] power_supply: Introduce power supply charging driver Jenny TC
2014-07-08  6:04 ` [PATCH 1/4] power_supply: Add inlmt,iterm, min/max temp props Jenny TC
2014-07-14 13:05   ` Pavel Machek
2014-07-17 23:34   ` Sebastian Reichel
2014-06-30  9:55 [PATCHv10 0/4] power_supply: Introduce power supply charging driver Jenny TC
2014-06-30  9:55 ` [PATCH 1/4] power_supply: Add inlmt,iterm, min/max temp props Jenny TC
2014-07-03 13:05   ` Sebastian Reichel
2014-06-19 14:02 [PATCHv9 0/4] power_supply: Introduce power supply charging driver Jenny TC
2014-06-19 14:02 ` [PATCH 1/4] power_supply: Add inlmt,iterm, min/max temp props Jenny TC
2014-02-20  5:53 [PATCH v6 0/4] power_supply: Introduce power supply charging driver Jenny TC
2014-02-20  5:53 ` [PATCH 1/4] power_supply: Add inlmt,iterm, min/max temp props Jenny TC
2014-01-30 17:30 [PATCH v4 0/4] power_supply: Introduce power supply charging driver Jenny TC
2014-01-30 17:30 ` [PATCH 1/4] power_supply: Add inlmt,iterm, min/max temp props Jenny TC
2014-01-22 17:19 [PATCH v3 0/4] power_supply: Introduce power supply charging driver Jenny TC
2014-01-22 17:19 ` [PATCH 1/4] power_supply: Add inlmt,iterm, min/max temp props Jenny TC
2014-01-23  9:00   ` Jingoo Han
2014-01-24 13:01   ` Pavel Machek
2014-01-24 15:25   ` Dmitry Eremin-Solenikov
2014-01-29 13:08     ` Jenny Tc

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=1391490780-6141-2-git-send-email-jenny.tc@intel.com \
    --to=jenny.tc@intel.com \
    --cc=Milo.Kim@ti.com \
    --cc=aaro.koskinen@iki.fi \
    --cc=anton.vorontsov@linaro.org \
    --cc=cbouatmailru@gmail.com \
    --cc=cw00.choi@samsung.com \
    --cc=dbaryshkov@gmail.com \
    --cc=dwmw2@infradead.org \
    --cc=freemangordon@abv.bg \
    --cc=jg1.han@samsung.com \
    --cc=lars@metafoo.de \
    --cc=lee.jones@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=pali.rohar@gmail.com \
    --cc=pavel@ucw.cz \
    --cc=ramakrishna.pallala@intel.com \
    --cc=rjw@rjwysocki.net \
    --cc=rklein@nvidia.com \
    --cc=sachin.kamat@linaro.org \
    --cc=sre@ring0.de \
    --cc=tony@atomide.com \
    /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 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).