1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 * Dumb driver for LiIon batteries using TWL4030 madc.
5 * Copyright 2013 Golden Delicious Computers
6 * Nikolaus Schaller <hns@goldelico.com>
9 #ifndef __TWL4030_MADC_BATTERY_H
10 #define __TWL4030_MADC_BATTERY_H
13 * Usually we can assume 100% @ 4.15V and 0% @ 3.3V but curves differ for
14 * charging and discharging!
17 struct twl4030_madc_bat_calibration {
18 short voltage; /* in mV - specify -1 for end of list */
19 short level; /* in percent (0 .. 100%) */
22 struct twl4030_madc_bat_platform_data {
23 unsigned int capacity; /* total capacity in uAh */
24 struct twl4030_madc_bat_calibration *charging;
26 struct twl4030_madc_bat_calibration *discharging;