#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>
enum max77826_registers { … };
enum max77826_regulators { … };
#define MAX77826_MASK_LDO …
#define MAX77826_MASK_BUCK …
#define MAX77826_MASK_BUCKBOOST …
#define MAX77826_BUCK_RAMP_DELAY …
#define MAX77826_NMOS_LDO_VOLT_MIN …
#define MAX77826_NMOS_LDO_VOLT_MAX …
#define MAX77826_NMOS_LDO_VOLT_STEP …
#define MAX77826_PMOS_LDO_VOLT_MIN …
#define MAX77826_PMOS_LDO_VOLT_MAX …
#define MAX77826_PMOS_LDO_VOLT_STEP …
#define MAX77826_BUCK_VOLT_MIN …
#define MAX77826_BUCK_VOLT_MAX …
#define MAX77826_BUCK_VOLT_STEP …
#define MAX77826_BUCKBOOST_VOLT_MIN …
#define MAX77826_BUCKBOOST_VOLT_MAX …
#define MAX77826_BUCKBOOST_VOLT_STEP …
#define MAX77826_VOLT_RANGE(_type) …
#define MAX77826_LDO(_id, _type) …
#define MAX77826_BUCK(_idx, _id, _ops) …
struct max77826_regulator_info { … };
static const struct regmap_config max77826_regmap_config = …;
static int max77826_set_voltage_time_sel(struct regulator_dev *,
unsigned int old_selector,
unsigned int new_selector);
static const struct regulator_ops max77826_most_ops = …;
static const struct regulator_ops max77826_buck_ops = …;
static struct regulator_desc max77826_regulators_desc[] = …;
static int max77826_set_voltage_time_sel(struct regulator_dev *rdev,
unsigned int old_selector,
unsigned int new_selector)
{ … }
static int max77826_read_device_id(struct regmap *regmap, struct device *dev)
{ … }
static int max77826_i2c_probe(struct i2c_client *client)
{ … }
static const struct of_device_id __maybe_unused max77826_of_match[] = …;
MODULE_DEVICE_TABLE(of, max77826_of_match);
static const struct i2c_device_id max77826_id[] = …;
MODULE_DEVICE_TABLE(i2c, max77826_id);
static struct i2c_driver max77826_regulator_driver = …;
module_i2c_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;