Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6a6deeda authored by Anirudh Ghayal's avatar Anirudh Ghayal
Browse files

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: default avatarAnirudh Ghayal <aghayal@codeaurora.org>
parent acd5ad63
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
/* Copyright (c) 2014-2015, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
 * only version 2 as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that 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.
 */

#include <uapi/linux/batterydata-interface.h>

int config_battery_data(struct bms_battery_data *profile);
+1 −0
Original line number Diff line number Diff line
@@ -65,6 +65,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
+30 −0
Original line number Diff line number Diff line
#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