#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/err.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/regulator/driver.h>
#include <linux/regulator/of_regulator.h>
#include <linux/i2c.h>
#include <linux/regmap.h>
#include "mpq7920.h"
#define MPQ7920_BUCK_VOLT_RANGE …
#define MPQ7920_LDO_VOLT_RANGE …
#define MPQ7920BUCK(_name, _id, _ilim) …
#define MPQ7920LDO(_name, _id, _ops, _ilim, _ilim_sz, _creg, _cmask) …
enum mpq7920_regulators { … };
struct mpq7920_regulator_info { … };
static const struct regmap_config mpq7920_regmap_config = …;
static const unsigned int mpq7920_I_limits1[] = …;
static const unsigned int mpq7920_I_limits2[] = …;
static const unsigned int mpq7920_I_limits3[] = …;
static int mpq7920_set_ramp_delay(struct regulator_dev *rdev, int ramp_delay);
static int mpq7920_parse_cb(struct device_node *np,
const struct regulator_desc *rdesc,
struct regulator_config *config);
static const struct regulator_ops mpq7920_ldortc_ops = …;
static const struct regulator_ops mpq7920_ldo_wo_current_ops = …;
static const struct regulator_ops mpq7920_ldo_ops = …;
static const struct regulator_ops mpq7920_buck_ops = …;
static struct regulator_desc mpq7920_regulators_desc[MPQ7920_MAX_REGULATORS] = …;
static int mpq7920_set_ramp_delay(struct regulator_dev *rdev, int ramp_delay)
{ … }
static int mpq7920_parse_cb(struct device_node *np,
const struct regulator_desc *desc,
struct regulator_config *config)
{ … }
static void mpq7920_parse_dt(struct device *dev,
struct mpq7920_regulator_info *info)
{ … }
static int mpq7920_i2c_probe(struct i2c_client *client)
{ … }
static const struct of_device_id mpq7920_of_match[] = …;
MODULE_DEVICE_TABLE(of, mpq7920_of_match);
static const struct i2c_device_id mpq7920_id[] = …;
MODULE_DEVICE_TABLE(i2c, mpq7920_id);
static struct i2c_driver mpq7920_regulator_driver = …;
module_i2c_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;