#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/regmap.h>
#include <linux/mfd/mt6397/core.h>
#include <linux/mfd/mt6323/registers.h>
#include <linux/regulator/driver.h>
#include <linux/regulator/machine.h>
#include <linux/regulator/mt6323-regulator.h>
#include <linux/regulator/of_regulator.h>
#define MT6323_LDO_MODE_NORMAL …
#define MT6323_LDO_MODE_LP …
struct mt6323_regulator_info { … };
#define MT6323_BUCK(match, vreg, min, max, step, volt_ranges, enreg, \
vosel, vosel_mask, voselon, vosel_ctrl) …
#define MT6323_LDO(match, vreg, ldo_volt_table, enreg, enbit, vosel, \
vosel_mask, _modeset_reg, _modeset_mask) …
#define MT6323_REG_FIXED(match, vreg, enreg, enbit, volt, \
_modeset_reg, _modeset_mask) …
static const struct linear_range buck_volt_range1[] = …;
static const struct linear_range buck_volt_range2[] = …;
static const struct linear_range buck_volt_range3[] = …;
static const unsigned int ldo_volt_table1[] = …;
static const unsigned int ldo_volt_table2[] = …;
static const unsigned int ldo_volt_table3[] = …;
static const unsigned int ldo_volt_table4[] = …;
static const unsigned int ldo_volt_table5[] = …;
static const unsigned int ldo_volt_table6[] = …;
static const unsigned int ldo_volt_table7[] = …;
static const unsigned int ldo_volt_table8[] = …;
static const unsigned int ldo_volt_table9[] = …;
static const unsigned int ldo_volt_table10[] = …;
static int mt6323_get_status(struct regulator_dev *rdev)
{ … }
static int mt6323_ldo_set_mode(struct regulator_dev *rdev, unsigned int mode)
{ … }
static unsigned int mt6323_ldo_get_mode(struct regulator_dev *rdev)
{ … }
static const struct regulator_ops mt6323_volt_range_ops = …;
static const struct regulator_ops mt6323_volt_table_ops = …;
static const struct regulator_ops mt6323_volt_fixed_ops = …;
static struct mt6323_regulator_info mt6323_regulators[] = …;
static int mt6323_set_buck_vosel_reg(struct platform_device *pdev)
{ … }
static int mt6323_regulator_probe(struct platform_device *pdev)
{ … }
static const struct platform_device_id mt6323_platform_ids[] = …;
MODULE_DEVICE_TABLE(platform, mt6323_platform_ids);
static struct platform_driver mt6323_regulator_driver = …;
module_platform_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;