#include <linux/module.h>
#include <linux/err.h>
#include <linux/platform_device.h>
#include <linux/power_supply.h>
#include <linux/mfd/wm8350/supply.h>
#include <linux/mfd/wm8350/core.h>
#include <linux/mfd/wm8350/comparator.h>
static int wm8350_read_battery_uvolts(struct wm8350 *wm8350)
{ … }
static int wm8350_read_line_uvolts(struct wm8350 *wm8350)
{ … }
static int wm8350_read_usb_uvolts(struct wm8350 *wm8350)
{ … }
#define WM8350_BATT_SUPPLY …
#define WM8350_USB_SUPPLY …
#define WM8350_LINE_SUPPLY …
static inline int wm8350_charge_time_min(struct wm8350 *wm8350, int min)
{ … }
static int wm8350_get_supplies(struct wm8350 *wm8350)
{ … }
static int wm8350_charger_config(struct wm8350 *wm8350,
struct wm8350_charger_policy *policy)
{ … }
static int wm8350_batt_status(struct wm8350 *wm8350)
{ … }
static ssize_t charger_state_show(struct device *dev,
struct device_attribute *attr, char *buf)
{ … }
static DEVICE_ATTR_RO(charger_state);
static irqreturn_t wm8350_charger_handler(int irq, void *data)
{ … }
static int wm8350_ac_get_prop(struct power_supply *psy,
enum power_supply_property psp,
union power_supply_propval *val)
{ … }
static enum power_supply_property wm8350_ac_props[] = …;
static int wm8350_usb_get_prop(struct power_supply *psy,
enum power_supply_property psp,
union power_supply_propval *val)
{ … }
static enum power_supply_property wm8350_usb_props[] = …;
static int wm8350_bat_check_health(struct wm8350 *wm8350)
{ … }
static int wm8350_bat_get_charge_type(struct wm8350 *wm8350)
{ … }
static int wm8350_bat_get_property(struct power_supply *psy,
enum power_supply_property psp,
union power_supply_propval *val)
{ … }
static enum power_supply_property wm8350_bat_props[] = …;
static const struct power_supply_desc wm8350_ac_desc = …;
static const struct power_supply_desc wm8350_battery_desc = …;
static const struct power_supply_desc wm8350_usb_desc = …;
static int wm8350_init_charger(struct wm8350 *wm8350)
{ … }
static void free_charger_irq(struct wm8350 *wm8350)
{ … }
static int wm8350_power_probe(struct platform_device *pdev)
{ … }
static void wm8350_power_remove(struct platform_device *pdev)
{ … }
static struct platform_driver wm8350_power_driver = …;
module_platform_driver(…) …;
MODULE_LICENSE(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_ALIAS(…) …;