From eeedd1c5023084a7b934141d281cee0097da6ba9 Mon Sep 17 00:00:00 2001 From: Anirudh Ghayal Date: Wed, 30 Dec 2015 13:16:19 +0530 Subject: 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 --- include/uapi/linux/Kbuild | 1 + include/uapi/linux/batterydata-interface.h | 30 ++++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 include/uapi/linux/batterydata-interface.h (limited to 'include/uapi/linux') 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 + +/** + * 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 -- cgit v1.2.3