diff options
Diffstat (limited to 'include/linux/mfd/axp20x.h')
-rw-r--r-- | include/linux/mfd/axp20x.h | 26 |
1 files changed, 3 insertions, 23 deletions
diff --git a/include/linux/mfd/axp20x.h b/include/linux/mfd/axp20x.h index b406c019e4..93d303c459 100644 --- a/include/linux/mfd/axp20x.h +++ b/include/linux/mfd/axp20x.h @@ -8,7 +8,6 @@ #ifndef __LINUX_MFD_AXP20X_H #define __LINUX_MFD_AXP20X_H -#include <regmap.h> #include <poweroff.h> enum axp20x_variants { @@ -448,6 +447,9 @@ enum { AXP813_REG_ID_MAX, }; +struct regmap; +struct regmap_config; + struct axp20x_dev { struct device *dev; struct regmap *regmap; @@ -458,28 +460,6 @@ struct axp20x_dev { struct poweroff_handler poweroff; }; -/* generic helper function for reading 9-16 bit wide regs */ -static inline int axp20x_read_variable_width(struct regmap *regmap, - unsigned int reg, unsigned int width) -{ - unsigned int reg_val, result; - int err; - - err = regmap_read(regmap, reg, ®_val); - if (err) - return err; - - result = reg_val << (width - 8); - - err = regmap_read(regmap, reg + 1, ®_val); - if (err) - return err; - - result |= reg_val; - - return result; -} - /** * axp20x_match_device(): Setup axp20x variant related fields * |