mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-04 18:09:57 +00:00
![Linus Walleij](/assets/img/avatar_default.png)
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>
39 lines
923 B
C
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
|