#include <linux/module.h>
#include <linux/param.h>
#include <linux/delay.h>
#include <linux/workqueue.h>
#include <linux/platform_device.h>
#include <linux/power_supply.h>
#include <linux/slab.h>
#include <linux/sort.h>
#include <linux/power/twl4030_madc_battery.h>
#include <linux/iio/consumer.h>
struct twl4030_madc_battery { … };
static enum power_supply_property twl4030_madc_bat_props[] = …;
static int madc_read(struct iio_channel *channel)
{ … }
static int twl4030_madc_bat_get_charging_status(struct twl4030_madc_battery *bt)
{ … }
static int twl4030_madc_bat_get_voltage(struct twl4030_madc_battery *bt)
{ … }
static int twl4030_madc_bat_get_current(struct twl4030_madc_battery *bt)
{ … }
static int twl4030_madc_bat_get_temp(struct twl4030_madc_battery *bt)
{ … }
static int twl4030_madc_bat_voltscale(struct twl4030_madc_battery *bat,
int volt)
{ … }
static int twl4030_madc_bat_get_property(struct power_supply *psy,
enum power_supply_property psp,
union power_supply_propval *val)
{ … }
static const struct power_supply_desc twl4030_madc_bat_desc = …;
static int twl4030_cmp(const void *a, const void *b)
{ … }
static int twl4030_madc_battery_probe(struct platform_device *pdev)
{ … }
static struct platform_driver twl4030_madc_battery_driver = …;
module_platform_driver(…) …;
MODULE_LICENSE(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_ALIAS(…) …;