[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1350578646-3315-5-git-send-email-jenny.tc@intel.com>
Date: Thu, 18 Oct 2012 22:14:03 +0530
From: Jenny TC <jenny.tc@...el.com>
To: Anton Vorontsov <anton.vorontsov@...aro.org>,
Anton Vorontsov <cbouatmailru@...il.com>,
linux-kernel@...r.kernel.org
Cc: Pallala Ramakrishna <ramakrishna.pallala@...el.com>,
Chanwoo Choi <cw00.choi@...sung.com>, myungjoo.ham@...sung.com,
Jenny TC <jenny.tc@...el.com>
Subject: [PATCH 4/7] power_supply: add throttle state
The charger and battery temperature contribute to the
platform thermal. The only way to control the temperature
is to control the charging. The charging can be controlled in different
way. This could be disabling charger, disabling charging, adjusting CC,
or by adjusting the INLMT. This patch adds a structure to define the
charger throttle actions. Also this patch adds a throttle_states
field to the struct power_supply which can be used by the charger
driver to define it's throttle actions for different states
Signed-off-by: Jenny TC <jenny.tc@...el.com>
---
include/linux/power_supply.h | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/include/linux/power_supply.h b/include/linux/power_supply.h
index eea1709..b4eb0af 100644
--- a/include/linux/power_supply.h
+++ b/include/linux/power_supply.h
@@ -183,6 +183,18 @@ union power_supply_propval {
const char *strval;
};
+enum psy_throttle_action {
+
+ PSY_THROTTLE_DISABLE_CHARGER = 0,
+ PSY_THROTTLE_DISABLE_CHARGING,
+ PSY_THROTTLE_CC_LIMIT,
+ PSY_THROTTLE_INPUT_LIMIT,
+};
+
+struct power_supply_throttle {
+ enum psy_throttle_action throttle_action;
+ unsigned throttle_val;
+};
struct power_supply {
const char *name;
enum power_supply_type type;
@@ -192,6 +204,7 @@ struct power_supply {
char **supplied_to;
unsigned long supported_cables;
size_t num_supplicants;
+ struct power_supply_throttle *throttle_states;
int (*get_property)(struct power_supply *psy,
enum power_supply_property psp,
--
1.7.9.5
--
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