Files
kernel_xiaomi_sm8250/include/uapi/linux/batterydata-interface.h
Shilpa Suresh 84905217ec include: uapi: Add charger specific headers for QM215
Add all the header files required for the charger/fg/bms
drivers for QM215 target.
Add snapshots of the new files as of msm-4.9 commit 0848b3af1d2f
("ARM: dts: qcom: disabled wled bl type for sim_vid panel").

Change-Id: Idd1485908488f5eddcee17bb536411abfc4ff6e6
Signed-off-by: Shilpa Suresh <sbsure@codeaurora.org>
2021-04-01 13:29:57 +05:30

32 lines
952 B
C

/* SPDX-License-Identifier: GPL-2.0-only WITH Linux-syscall-note */
#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