#include <linux/kernel.h>
#include <linux/bug.h>
#include <linux/err.h>
#include <linux/gpio/consumer.h>
#include <linux/slab.h>
#include <linux/platform_device.h>
#include <linux/regulator/driver.h>
#include <linux/regulator/machine.h>
#include <linux/regulator/of_regulator.h>
#include <linux/mfd/max77686.h>
#include <linux/mfd/max77686-private.h>
#define MAX77686_LDO_MINUV …
#define MAX77686_LDO_UVSTEP …
#define MAX77686_LDO_LOW_MINUV …
#define MAX77686_LDO_LOW_UVSTEP …
#define MAX77686_BUCK_MINUV …
#define MAX77686_BUCK_UVSTEP …
#define MAX77686_BUCK_ENABLE_TIME …
#define MAX77686_DVS_ENABLE_TIME …
#define MAX77686_RAMP_DELAY …
#define MAX77686_DVS_RAMP_DELAY …
#define MAX77686_DVS_MINUV …
#define MAX77686_DVS_UVSTEP …
#define MAX77686_GPIO_CONTROL …
#define MAX77686_LDO_LOWPOWER …
#define MAX77686_OFF_PWRREQ …
#define MAX77686_LDO_LOWPOWER_PWRREQ …
#define MAX77686_BUCK_LOWPOWER …
#define MAX77686_NORMAL …
#define MAX77686_OPMODE_SHIFT …
#define MAX77686_OPMODE_BUCK234_SHIFT …
#define MAX77686_OPMODE_MASK …
#define MAX77686_VSEL_MASK …
#define MAX77686_DVS_VSEL_MASK …
#define MAX77686_RAMP_RATE_MASK …
#define MAX77686_REGULATORS …
#define MAX77686_LDOS …
struct max77686_data { … };
static unsigned int max77686_get_opmode_shift(int id)
{ … }
static unsigned int max77686_map_normal_mode(struct max77686_data *max77686,
int id)
{ … }
static int max77686_set_suspend_disable(struct regulator_dev *rdev)
{ … }
static int max77686_set_suspend_mode(struct regulator_dev *rdev,
unsigned int mode)
{ … }
static int max77686_ldo_set_suspend_mode(struct regulator_dev *rdev,
unsigned int mode)
{ … }
static int max77686_enable(struct regulator_dev *rdev)
{ … }
static int max77686_of_parse_cb(struct device_node *np,
const struct regulator_desc *desc,
struct regulator_config *config)
{ … }
static const unsigned int max77686_buck_dvs_ramp_table[] = …;
static const struct regulator_ops max77686_ops = …;
static const struct regulator_ops max77686_ldo_ops = …;
static const struct regulator_ops max77686_buck1_ops = …;
static const struct regulator_ops max77686_buck_dvs_ops = …;
#define regulator_desc_ldo(num) …
#define regulator_desc_lpm_ldo(num) …
#define regulator_desc_ldo_low(num) …
#define regulator_desc_ldo1_low(num) …
#define regulator_desc_buck(num) …
#define regulator_desc_buck1(num) …
#define regulator_desc_buck_dvs(num) …
static const struct regulator_desc regulators[] = …;
static int max77686_pmic_probe(struct platform_device *pdev)
{ … }
static const struct platform_device_id max77686_pmic_id[] = …;
MODULE_DEVICE_TABLE(platform, max77686_pmic_id);
static struct platform_driver max77686_pmic_driver = …;
module_platform_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;