#include <linux/devm-helpers.h>
#include <linux/err.h>
#include <linux/i2c.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/gpio/consumer.h>
#include <linux/power_supply.h>
#include <linux/slab.h>
#include <linux/power/bq24735-charger.h>
#define BQ24735_CHARGE_OPT …
#define BQ24735_CHARGE_CURRENT …
#define BQ24735_CHARGE_CURRENT_MASK …
#define BQ24735_CHARGE_VOLTAGE …
#define BQ24735_CHARGE_VOLTAGE_MASK …
#define BQ24735_INPUT_CURRENT …
#define BQ24735_INPUT_CURRENT_MASK …
#define BQ24735_MANUFACTURER_ID …
#define BQ24735_DEVICE_ID …
#define BQ24735_CHARGE_OPT_CHG_DISABLE …
#define BQ24735_CHARGE_OPT_AC_PRESENT …
struct bq24735 { … };
static inline struct bq24735 *to_bq24735(struct power_supply *psy)
{ … }
static enum power_supply_property bq24735_charger_properties[] = …;
static int bq24735_charger_property_is_writeable(struct power_supply *psy,
enum power_supply_property psp)
{ … }
static inline int bq24735_write_word(struct i2c_client *client, u8 reg,
u16 value)
{ … }
static inline int bq24735_read_word(struct i2c_client *client, u8 reg)
{ … }
static int bq24735_update_word(struct i2c_client *client, u8 reg,
u16 mask, u16 value)
{ … }
static int bq24735_config_charger(struct bq24735 *charger)
{ … }
static inline int bq24735_enable_charging(struct bq24735 *charger)
{ … }
static inline int bq24735_disable_charging(struct bq24735 *charger)
{ … }
static bool bq24735_charger_is_present(struct bq24735 *charger)
{ … }
static int bq24735_charger_is_charging(struct bq24735 *charger)
{ … }
static void bq24735_update(struct bq24735 *charger)
{ … }
static irqreturn_t bq24735_charger_isr(int irq, void *devid)
{ … }
static void bq24735_poll(struct work_struct *work)
{ … }
static int bq24735_charger_get_property(struct power_supply *psy,
enum power_supply_property psp,
union power_supply_propval *val)
{ … }
static int bq24735_charger_set_property(struct power_supply *psy,
enum power_supply_property psp,
const union power_supply_propval *val)
{ … }
static struct bq24735_platform *bq24735_parse_dt_data(struct i2c_client *client)
{ … }
static int bq24735_charger_probe(struct i2c_client *client)
{ … }
static const struct i2c_device_id bq24735_charger_id[] = …;
MODULE_DEVICE_TABLE(i2c, bq24735_charger_id);
static const struct of_device_id bq24735_match_ids[] = …;
MODULE_DEVICE_TABLE(of, bq24735_match_ids);
static struct i2c_driver bq24735_charger_driver = …;
module_i2c_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;