#include <linux/i2c.h>
#include <linux/interrupt.h>
#include <linux/mfd/max77650.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/power_supply.h>
#include <linux/regmap.h>
#define MAX77650_CHARGER_ENABLED …
#define MAX77650_CHARGER_DISABLED …
#define MAX77650_CHARGER_CHG_EN_MASK …
#define MAX77650_CHG_DETAILS_MASK …
#define MAX77650_CHG_DETAILS_BITS(_reg) …
#define MAX77650_CHG_OFF …
#define MAX77650_CHG_PREQ …
#define MAX77650_CHG_ON_CURR …
#define MAX77650_CHG_ON_CURR_JEITA …
#define MAX77650_CHG_ON_VOLT …
#define MAX77650_CHG_ON_VOLT_JEITA …
#define MAX77650_CHG_ON_TOPOFF …
#define MAX77650_CHG_ON_TOPOFF_JEITA …
#define MAX77650_CHG_DONE …
#define MAX77650_CHG_DONE_JEITA …
#define MAX77650_CHG_SUSP_PREQ_TIM_FAULT …
#define MAX77650_CHG_SUSP_FAST_CHG_TIM_FAULT …
#define MAX77650_CHG_SUSP_BATT_TEMP_FAULT …
#define MAX77650_CHGIN_DETAILS_MASK …
#define MAX77650_CHGIN_DETAILS_BITS(_reg) …
#define MAX77650_CHGIN_UNDERVOLTAGE_LOCKOUT …
#define MAX77650_CHGIN_OVERVOLTAGE_LOCKOUT …
#define MAX77650_CHGIN_OKAY …
#define MAX77650_CHARGER_CHG_MASK …
#define MAX77650_CHARGER_CHG_CHARGING(_reg) …
#define MAX77650_CHARGER_VCHGIN_MIN_MASK …
#define MAX77650_CHARGER_VCHGIN_MIN_SHIFT(_val) …
#define MAX77650_CHARGER_ICHGIN_LIM_MASK …
#define MAX77650_CHARGER_ICHGIN_LIM_SHIFT(_val) …
struct max77650_charger_data { … };
static enum power_supply_property max77650_charger_properties[] = …;
static const unsigned int max77650_charger_vchgin_min_table[] = …;
static const unsigned int max77650_charger_ichgin_lim_table[] = …;
static int max77650_charger_set_vchgin_min(struct max77650_charger_data *chg,
unsigned int val)
{ … }
static int max77650_charger_set_ichgin_lim(struct max77650_charger_data *chg,
unsigned int val)
{ … }
static int max77650_charger_enable(struct max77650_charger_data *chg)
{ … }
static void max77650_charger_disable(struct max77650_charger_data *chg)
{ … }
static irqreturn_t max77650_charger_check_status(int irq, void *data)
{ … }
static int max77650_charger_get_property(struct power_supply *psy,
enum power_supply_property psp,
union power_supply_propval *val)
{ … }
static const struct power_supply_desc max77650_battery_desc = …;
static int max77650_charger_probe(struct platform_device *pdev)
{ … }
static void max77650_charger_remove(struct platform_device *pdev)
{ … }
static const struct of_device_id max77650_charger_of_match[] = …;
MODULE_DEVICE_TABLE(of, max77650_charger_of_match);
static struct platform_driver max77650_charger_driver = …;
module_platform_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;
MODULE_ALIAS(…) …;