#include <linux/interrupt.h>
#include <linux/mfd/core.h>
#include <linux/mfd/max8907.h>
#include <linux/module.h>
#include <linux/of_device.h>
#include <linux/regmap.h>
static const struct mfd_cell max8907_cells[] = {
{ .name = "max8907-regulator", },
{ .name = "max8907-rtc", },
static bool max8907_gen_is_volatile_reg(struct device *dev, unsigned int reg)
case MAX8907_REG_ON_OFF_IRQ1:
case MAX8907_REG_ON_OFF_STAT:
case MAX8907_REG_ON_OFF_IRQ2:
case MAX8907_REG_CHG_IRQ1:
case MAX8907_REG_CHG_IRQ2:
case MAX8907_REG_CHG_STAT:
static bool max8907_gen_is_precious_reg(struct device *dev, unsigned int reg)
case MAX8907_REG_ON_OFF_IRQ1:
case MAX8907_REG_ON_OFF_IRQ2:
case MAX8907_REG_CHG_IRQ1:
case MAX8907_REG_CHG_IRQ2:
static bool max8907_gen_is_writeable_reg(struct device *dev, unsigned int reg)
return !max8907_gen_is_volatile_reg(dev, reg);
static const struct regmap_config max8907_regmap_gen_config = {