#include <linux/err.h>
#include <linux/init.h>
#include <linux/mfd/core.h>
#include <linux/mfd/max8907.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/regulator/driver.h>
#include <linux/regulator/machine.h>
#include <linux/regulator/of_regulator.h>
#include <linux/regmap.h>
#include <linux/slab.h>
#define MAX8907_II2RR_VERSION_MASK …
#define MAX8907_II2RR_VERSION_REV_A …
#define MAX8907_II2RR_VERSION_REV_B …
#define MAX8907_II2RR_VERSION_REV_C …
struct max8907_regulator { … };
#define REG_MBATT() …
#define REG_LDO(ids, supply, base, min, max, step) …
#define REG_FIXED(ids, supply, voltage) …
#define REG_OUT5V(ids, supply, base, voltage) …
#define REG_BBAT(ids, supply, base, min, max, step) …
#define LDO_750_50(id, supply, base) …
#define LDO_650_25(id, supply, base) …
static const struct regulator_ops max8907_mbatt_ops = …;
static const struct regulator_ops max8907_ldo_ops = …;
static const struct regulator_ops max8907_ldo_hwctl_ops = …;
static const struct regulator_ops max8907_fixed_ops = …;
static const struct regulator_ops max8907_out5v_ops = …;
static const struct regulator_ops max8907_out5v_hwctl_ops = …;
static const struct regulator_ops max8907_bbat_ops = …;
static const struct regulator_desc max8907_regulators[] = …;
#ifdef CONFIG_OF
#define MATCH(_name, _id) …
static struct of_regulator_match max8907_matches[] = …;
static int max8907_regulator_parse_dt(struct platform_device *pdev)
{ … }
static inline struct regulator_init_data *match_init_data(int index)
{ … }
static inline struct device_node *match_of_node(int index)
{ … }
#else
static int max8907_regulator_parse_dt(struct platform_device *pdev)
{
return 0;
}
static inline struct regulator_init_data *match_init_data(int index)
{
return NULL;
}
static inline struct device_node *match_of_node(int index)
{
return NULL;
}
#endif
static int max8907_regulator_probe(struct platform_device *pdev)
{ … }
static struct platform_driver max8907_regulator_driver = …;
static int __init max8907_regulator_init(void)
{ … }
subsys_initcall(max8907_regulator_init);
static void __exit max8907_reg_exit(void)
{ … }
module_exit(max8907_reg_exit);
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;
MODULE_ALIAS(…) …;