#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/platform_data/wilco-ec.h>
#include <linux/power_supply.h>
#define DRV_NAME …
#define PID_CHARGE_MODE …
#define PID_CHARGE_LOWER_LIMIT …
#define PID_CHARGE_UPPER_LIMIT …
enum charge_mode { … };
#define CHARGE_LOWER_LIMIT_MIN …
#define CHARGE_LOWER_LIMIT_MAX …
#define CHARGE_UPPER_LIMIT_MIN …
#define CHARGE_UPPER_LIMIT_MAX …
static int psp_val_to_charge_mode(int psp_val)
{ … }
static int charge_mode_to_psp_val(enum charge_mode mode)
{ … }
static enum power_supply_property wilco_charge_props[] = …;
static int wilco_charge_get_property(struct power_supply *psy,
enum power_supply_property psp,
union power_supply_propval *val)
{ … }
static int wilco_charge_set_property(struct power_supply *psy,
enum power_supply_property psp,
const union power_supply_propval *val)
{ … }
static int wilco_charge_property_is_writeable(struct power_supply *psy,
enum power_supply_property psp)
{ … }
static const struct power_supply_desc wilco_ps_desc = …;
static int wilco_charge_probe(struct platform_device *pdev)
{ … }
static struct platform_driver wilco_charge_driver = …;
module_platform_driver(…) …;
MODULE_ALIAS(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;
MODULE_DESCRIPTION(…) …;