#include <linux/gpio/consumer.h>
#include <linux/i2c.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/regmap.h>
#include <linux/regulator/driver.h>
#include <linux/regulator/of_regulator.h>
#define MP886X_VSEL …
#define MP886X_V_BOOT …
#define MP886X_SYSCNTLREG1 …
#define MP886X_MODE …
#define MP886X_SLEW_SHIFT …
#define MP886X_SLEW_MASK …
#define MP886X_GO …
#define MP886X_EN …
#define MP8869_SYSCNTLREG2 …
struct mp886x_cfg_info { … };
struct mp886x_device_info { … };
static void mp886x_set_switch_freq(struct mp886x_device_info *di,
struct regmap *regmap,
u32 freq)
{ … }
static int mp886x_set_mode(struct regulator_dev *rdev, unsigned int mode)
{ … }
static unsigned int mp886x_get_mode(struct regulator_dev *rdev)
{ … }
static int mp8869_set_voltage_sel(struct regulator_dev *rdev, unsigned int sel)
{ … }
static inline unsigned int mp8869_scale(unsigned int uv, u32 r1, u32 r2)
{ … }
static int mp8869_get_voltage_sel(struct regulator_dev *rdev)
{ … }
static const struct regulator_ops mp8869_regulator_ops = …;
static const struct mp886x_cfg_info mp8869_ci = …;
static int mp8867_set_voltage_sel(struct regulator_dev *rdev, unsigned int sel)
{ … }
static int mp8867_get_voltage_sel(struct regulator_dev *rdev)
{ … }
static const struct regulator_ops mp8867_regulator_ops = …;
static const struct mp886x_cfg_info mp8867_ci = …;
static int mp886x_regulator_register(struct mp886x_device_info *di,
struct regulator_config *config)
{ … }
static const struct regmap_config mp886x_regmap_config = …;
static int mp886x_i2c_probe(struct i2c_client *client)
{ … }
static const struct of_device_id mp886x_dt_ids[] = …;
MODULE_DEVICE_TABLE(of, mp886x_dt_ids);
static const struct i2c_device_id mp886x_id[] = …;
MODULE_DEVICE_TABLE(i2c, mp886x_id);
static struct i2c_driver mp886x_regulator_driver = …;
module_i2c_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;