summaryrefslogtreecommitdiff
path: root/include/uapi/linux
diff options
context:
space:
mode:
authorAnirudh Ghayal <aghayal@codeaurora.org>2015-12-30 13:16:19 +0530
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-23 21:16:24 -0700
commiteeedd1c5023084a7b934141d281cee0097da6ba9 (patch)
tree7cf3d1a665846aaa2749c39ddf22e206b84c33a6 /include/uapi/linux
parent8e26a3a840eea77649a98b3864f065f288add5f6 (diff)
include: batterydata-interface: Add snapshot of the batterydata files
Add snapshot of the batterydata-interface files from msm-3.10, this is required for qpnp-vmbms module. (msm-3.10 commit - 7704c94d47f8ed7cc81e487ab9d576ef52e0f1e5) Change-Id: I322774879dec5856443c90280f7eb8b1b7f07798 Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
Diffstat (limited to 'include/uapi/linux')
-rw-r--r--include/uapi/linux/Kbuild1
-rw-r--r--include/uapi/linux/batterydata-interface.h30
2 files changed, 31 insertions, 0 deletions
diff --git a/include/uapi/linux/Kbuild b/include/uapi/linux/Kbuild
index 6f380069bab7..309fac816082 100644
--- a/include/uapi/linux/Kbuild
+++ b/include/uapi/linux/Kbuild
@@ -67,6 +67,7 @@ header-y += auxvec.h
header-y += avtimer.h
header-y += ax25.h
header-y += b1lli.h
+header-y += batterydata-interface.h
header-y += baycom.h
header-y += bcm933xx_hcs.h
header-y += bfs_fs.h
diff --git a/include/uapi/linux/batterydata-interface.h b/include/uapi/linux/batterydata-interface.h
new file mode 100644
index 000000000000..498f4e0335e6
--- /dev/null
+++ b/include/uapi/linux/batterydata-interface.h
@@ -0,0 +1,30 @@
+#ifndef __BATTERYDATA_LIB_H__
+#define __BATTERYDATA_LIB_H__
+
+#include <linux/ioctl.h>
+
+/**
+ * struct battery_params - Battery profile data to be exchanged.
+ * @soc: SOC (state of charge) of the battery
+ * @ocv_uv: OCV (open circuit voltage) of the battery
+ * @rbatt_sf: RBATT scaling factor
+ * @batt_temp: Battery temperature in deci-degree.
+ * @slope: Slope of the OCV-SOC curve.
+ * @fcc_mah: FCC (full charge capacity) of the battery.
+ */
+struct battery_params {
+ int soc;
+ int ocv_uv;
+ int rbatt_sf;
+ int batt_temp;
+ int slope;
+ int fcc_mah;
+};
+
+/* IOCTLs to query battery profile data */
+#define BPIOCXSOC _IOWR('B', 0x01, struct battery_params) /* SOC */
+#define BPIOCXRBATT _IOWR('B', 0x02, struct battery_params) /* RBATT SF */
+#define BPIOCXSLOPE _IOWR('B', 0x03, struct battery_params) /* SLOPE */
+#define BPIOCXFCC _IOWR('B', 0x04, struct battery_params) /* FCC */
+
+#endif