#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/power_supply.h>
#include <linux/mfd/max14577-private.h>
#include <linux/mfd/max14577.h>
struct max14577_charger { … };
static enum max14577_muic_charger_type maxim_get_charger_type(
enum maxim_device_type dev_type, u8 val) { … }
static int max14577_get_charger_state(struct max14577_charger *chg, int *val)
{ … }
static int max14577_get_charge_type(struct max14577_charger *chg, int *val)
{ … }
static int max14577_get_online(struct max14577_charger *chg, int *val)
{ … }
static int max14577_get_battery_health(struct max14577_charger *chg, int *val)
{ … }
static int max14577_get_present(struct max14577_charger *chg, int *val)
{ … }
static int max14577_set_fast_charge_timer(struct max14577_charger *chg,
unsigned long hours)
{ … }
static int max14577_init_constant_voltage(struct max14577_charger *chg,
unsigned int uvolt)
{ … }
static int max14577_init_eoc(struct max14577_charger *chg,
unsigned int uamp)
{ … }
static int max14577_init_fast_charge(struct max14577_charger *chg,
unsigned int uamp)
{ … }
static int max14577_charger_reg_init(struct max14577_charger *chg)
{ … }
static enum power_supply_property max14577_charger_props[] = …;
static const char * const model_names[] = …;
static const char *manufacturer = …;
static int max14577_charger_get_property(struct power_supply *psy,
enum power_supply_property psp,
union power_supply_propval *val)
{ … }
static const struct power_supply_desc max14577_charger_desc = …;
#ifdef CONFIG_OF
static struct max14577_charger_platform_data *max14577_charger_dt_init(
struct platform_device *pdev)
{ … }
#else
static struct max14577_charger_platform_data *max14577_charger_dt_init(
struct platform_device *pdev)
{
return NULL;
}
#endif
static ssize_t show_fast_charge_timer(struct device *dev,
struct device_attribute *attr, char *buf)
{ … }
static ssize_t store_fast_charge_timer(struct device *dev,
struct device_attribute *attr, const char *buf, size_t count)
{ … }
static DEVICE_ATTR(fast_charge_timer, S_IRUGO | S_IWUSR,
show_fast_charge_timer, store_fast_charge_timer);
static int max14577_charger_probe(struct platform_device *pdev)
{ … }
static void max14577_charger_remove(struct platform_device *pdev)
{ … }
static const struct platform_device_id max14577_charger_id[] = …;
MODULE_DEVICE_TABLE(platform, max14577_charger_id);
static const struct of_device_id of_max14577_charger_dt_match[] = …;
MODULE_DEVICE_TABLE(of, of_max14577_charger_dt_match);
static struct platform_driver max14577_charger_driver = …;
module_platform_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;