#include <linux/module.h>
#include <linux/slab.h>
#include <linux/w1.h>
#include <linux/regmap.h>
#include <linux/power_supply.h>
#define W1_MAX1721X_FAMILY_ID …
#define DEF_DEV_NAME_MAX17211 …
#define DEF_DEV_NAME_MAX17215 …
#define DEF_DEV_NAME_UNKNOWN …
#define DEF_MFG_NAME …
#define PSY_MAX_NAME_LEN …
#define MAX1721X_MAX_REG_NR …
#define MAX1721X_REG_NRSENSE …
#define MAX1721X_REG_MFG_STR …
#define MAX1721X_REG_MFG_NUMB …
#define MAX1721X_REG_DEV_STR …
#define MAX1721X_REG_DEV_NUMB …
#define MAX1721X_REG_SER_HEX …
#define MAX172XX_REG_STATUS …
#define MAX172XX_BAT_PRESENT …
#define MAX172XX_REG_DEVNAME …
#define MAX172XX_DEV_MASK …
#define MAX172X1_DEV …
#define MAX172X5_DEV …
#define MAX172XX_REG_TEMP …
#define MAX172XX_REG_BATT …
#define MAX172XX_REG_CURRENT …
#define MAX172XX_REG_AVGCURRENT …
#define MAX172XX_REG_REPSOC …
#define MAX172XX_REG_DESIGNCAP …
#define MAX172XX_REG_REPCAP …
#define MAX172XX_REG_TTE …
#define MAX172XX_REG_TTF …
struct max17211_device_info { … };
static inline int max172xx_time_to_ps(unsigned int reg)
{ … }
static inline int max172xx_percent_to_ps(unsigned int reg)
{ … }
static inline int max172xx_voltage_to_ps(unsigned int reg)
{ … }
static inline int max172xx_capacity_to_ps(unsigned int reg)
{ … }
static inline int max172xx_temperature_to_ps(unsigned int reg)
{ … }
static inline int max172xx_current_to_voltage(unsigned int reg)
{ … }
static inline struct max17211_device_info *
to_device_info(struct power_supply *psy)
{ … }
static int max1721x_battery_get_property(struct power_supply *psy,
enum power_supply_property psp,
union power_supply_propval *val)
{ … }
static enum power_supply_property max1721x_battery_props[] = …;
static int get_string(struct max17211_device_info *info,
uint16_t reg, uint8_t nr, char *str)
{ … }
static int get_sn_string(struct max17211_device_info *info, char *str)
{ … }
static const struct regmap_range max1721x_allow_range[] = …;
static const struct regmap_range max1721x_deny_range[] = …;
static const struct regmap_access_table max1721x_regs = …;
static const struct regmap_range max1721x_volatile_allow[] = …;
static const struct regmap_access_table max1721x_volatile_regs = …;
static const struct regmap_config max1721x_regmap_w1_config = …;
static int devm_w1_max1721x_add_device(struct w1_slave *sl)
{ … }
static const struct w1_family_ops w1_max1721x_fops = …;
static struct w1_family w1_max1721x_family = …;
module_w1_family(…);
MODULE_LICENSE(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_ALIAS(…) …;