linux-stable/include/linux/s3c_adc_battery.h
Linus Walleij 7776bcd241 power: supply: s3c-adc-battery: Convert to GPIO descriptors
This converts the S3C ADC battery to use GPIO descriptors
instead of a global GPIO number for the charging completed
GPIO. Using the pattern from the GPIO charger we name this
GPIO line "charge-status" in the board file.

Cc: linux-samsung-soc@vger.kernel.org
Cc: Sergiy Kibrik <sakib@darkstar.site>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2020-11-30 02:13:02 +01:00

39 lines
923 B
C

/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _S3C_ADC_BATTERY_H
#define _S3C_ADC_BATTERY_H
struct s3c_adc_bat_thresh {
int volt; /* mV */
int cur; /* mA */
int level; /* percent */
};
struct s3c_adc_bat_pdata {
int (*init)(void);
void (*exit)(void);
void (*enable_charger)(void);
void (*disable_charger)(void);
const struct s3c_adc_bat_thresh *lut_noac;
unsigned int lut_noac_cnt;
const struct s3c_adc_bat_thresh *lut_acin;
unsigned int lut_acin_cnt;
const unsigned int volt_channel;
const unsigned int current_channel;
const unsigned int backup_volt_channel;
const unsigned int volt_samples;
const unsigned int current_samples;
const unsigned int backup_volt_samples;
const unsigned int volt_mult;
const unsigned int current_mult;
const unsigned int backup_volt_mult;
const unsigned int internal_impedance;
const unsigned int backup_volt_max;
const unsigned int backup_volt_min;
};
#endif