#include <linux/gpio/driver.h>
#include <linux/module.h>
#include <linux/i2c.h>
#include <linux/i2c-mux.h>
#include <linux/power_supply.h>
#include <linux/property.h>
#define SBSM_MAX_BATS …
#define SBSM_RETRY_CNT …
#define SBSM_CMD_BATSYSSTATE …
#define SBSM_CMD_BATSYSSTATECONT …
#define SBSM_CMD_BATSYSINFO …
#define SBSM_CMD_LTC …
#define SBSM_MASK_BAT_SUPPORTED …
#define SBSM_MASK_CHARGE_BAT …
#define SBSM_BIT_AC_PRESENT …
#define SBSM_BIT_TURBO …
#define SBSM_SMB_BAT_OFFSET …
struct sbsm_data { … };
static enum power_supply_property sbsm_props[] = …;
static int sbsm_read_word(struct i2c_client *client, u8 address)
{ … }
static int sbsm_write_word(struct i2c_client *client, u8 address, u16 word)
{ … }
static int sbsm_get_property(struct power_supply *psy,
enum power_supply_property psp,
union power_supply_propval *val)
{ … }
static int sbsm_prop_is_writeable(struct power_supply *psy,
enum power_supply_property psp)
{ … }
static int sbsm_set_property(struct power_supply *psy,
enum power_supply_property psp,
const union power_supply_propval *val)
{ … }
static int sbsm_select(struct i2c_mux_core *muxc, u32 chan)
{ … }
static int sbsm_gpio_get_value(struct gpio_chip *gc, unsigned int off)
{ … }
static int sbsm_gpio_direction_input(struct gpio_chip *gc, unsigned int off)
{ … }
static int sbsm_do_alert(struct device *dev, void *d)
{ … }
static void sbsm_alert(struct i2c_client *client, enum i2c_alert_protocol prot,
unsigned int d)
{ … }
static int sbsm_gpio_setup(struct sbsm_data *data)
{ … }
static const struct power_supply_desc sbsm_default_psy_desc = …;
static void sbsm_del_mux_adapter(void *data)
{ … }
static int sbsm_probe(struct i2c_client *client)
{ … }
static const struct i2c_device_id sbsm_ids[] = …;
MODULE_DEVICE_TABLE(i2c, sbsm_ids);
#ifdef CONFIG_OF
static const struct of_device_id sbsm_dt_ids[] = …;
MODULE_DEVICE_TABLE(of, sbsm_dt_ids);
#endif
static struct i2c_driver sbsm_driver = …;
module_i2c_driver(…) …;
MODULE_LICENSE(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;