summaryrefslogtreecommitdiff
path: root/include/linux/power/generic-adc-battery.h
blob: 40f9c7628f7b3e2b20446f9a27cddadcc58595d1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * Copyright (C) 2012, Anish Kumar <anish198519851985@gmail.com>
 */

#ifndef GENERIC_ADC_BATTERY_H
#define GENERIC_ADC_BATTERY_H

/**
 * struct gab_platform_data - platform_data for generic adc iio battery driver.
 * @battery_info:         recommended structure to specify static power supply
 *			   parameters
 * @cal_charge:           calculate charge level.
 * @gpio_charge_finished: gpio for the charger.
 * @gpio_inverted:        Should be 1 if the GPIO is active low otherwise 0
 * @jitter_delay:         delay required after the interrupt to check battery
 *			  status.Default set is 10ms.
 */
struct gab_platform_data {
	struct power_supply_info battery_info;
	int	(*cal_charge)(long value);
	int	gpio_charge_finished;
	bool	gpio_inverted;
	int     jitter_delay;
};

#endif /* GENERIC_ADC_BATTERY_H */