summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSivaram Nair <sivaramn@nvidia.com>2013-04-26 09:36:17 +0300
committerRiham Haidar <rhaidar@nvidia.com>2013-05-08 16:30:01 -0700
commit4370ec5809e6286ceac79cbce6e1a4f3de1c2391 (patch)
treedf087660d7effd0f1ac6a77b282d6049b17a7a21 /include
parentd7c0ee0e66b0a9e4b302a06012aaaa776ad687bc (diff)
EDP: adding power-supply depletion driver
Power-supply depletion driver. Bug 1274376 Change-Id: I1e18db9bb06a18bb1cc6446fe36ce8422bae67cf Signed-off-by: Sivaram Nair <sivaramn@nvidia.com> Reviewed-on: http://git-master/r/226227 GVS: Gerrit_Virtual_Submit Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/edpdev.h58
1 files changed, 58 insertions, 0 deletions
diff --git a/include/linux/edpdev.h b/include/linux/edpdev.h
new file mode 100644
index 000000000000..1a917cadc826
--- /dev/null
+++ b/include/linux/edpdev.h
@@ -0,0 +1,58 @@
+/*
+ * Copyright (c) 2013, NVIDIA CORPORATION. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms and conditions of the GNU General Public License,
+ * version 2, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef _LINUX_EDPDEV_H
+#define _LINUX_EDPDEV_H
+
+#include <linux/kernel.h>
+#include <linux/errno.h>
+#include <linux/edp.h>
+
+/*
+ * Temperature -> IBAT LUT
+ * Should be descending wrt temp
+ * { ..., .ibat = 0 } must be the last entry
+ */
+struct psy_depletion_ibat_lut {
+ int temp;
+ unsigned int ibat;
+};
+
+/*
+ * Capacity -> RBAT LUT
+ * Should be descending wrt capacity
+ * { .capacity = 0, ... } must be the last entry
+ */
+struct psy_depletion_rbat_lut {
+ unsigned int capacity;
+ unsigned int rbat;
+};
+
+/* Power supply depletion EDP client */
+struct psy_depletion_platform_data {
+ char *power_supply;
+ unsigned int *states;
+ unsigned int num_states;
+ unsigned int e0_index;
+ unsigned int r_const;
+ unsigned int vsys_min;
+ unsigned int vcharge;
+ unsigned int ibat_nom;
+ struct psy_depletion_ibat_lut *ibat_lut;
+ struct psy_depletion_rbat_lut *rbat_lut;
+};
+
+#endif