#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/regmap.h>
#include <linux/regulator/driver.h>
#include <linux/regulator/machine.h>
#include <linux/regulator/mt6380-regulator.h>
#include <linux/regulator/of_regulator.h>
#define MT6380_ALDO_CON_0 …
#define MT6380_BTLDO_CON_0 …
#define MT6380_COMP_CON_0 …
#define MT6380_CPUBUCK_CON_0 …
#define MT6380_CPUBUCK_CON_1 …
#define MT6380_CPUBUCK_CON_2 …
#define MT6380_DDRLDO_CON_0 …
#define MT6380_MLDO_CON_0 …
#define MT6380_PALDO_CON_0 …
#define MT6380_PHYLDO_CON_0 …
#define MT6380_SIDO_CON_0 …
#define MT6380_SIDO_CON_1 …
#define MT6380_SIDO_CON_2 …
#define MT6380_SLDO_CON_0 …
#define MT6380_TLDO_CON_0 …
#define MT6380_STARTUP_CON_0 …
#define MT6380_STARTUP_CON_1 …
#define MT6380_SMPS_TOP_CON_0 …
#define MT6380_SMPS_TOP_CON_1 …
#define MT6380_ANA_CTRL_0 …
#define MT6380_ANA_CTRL_1 …
#define MT6380_ANA_CTRL_2 …
#define MT6380_ANA_CTRL_3 …
#define MT6380_ANA_CTRL_4 …
#define MT6380_SPK_CON9 …
#define MT6380_SPK_CON11 …
#define MT6380_SPK_CON12 …
#define MT6380_CLK_CTRL …
#define MT6380_PINMUX_CTRL …
#define MT6380_IO_CTRL …
#define MT6380_SLP_MODE_CTRL_0 …
#define MT6380_SLP_MODE_CTRL_1 …
#define MT6380_SLP_MODE_CTRL_2 …
#define MT6380_SLP_MODE_CTRL_3 …
#define MT6380_SLP_MODE_CTRL_4 …
#define MT6380_SLP_MODE_CTRL_5 …
#define MT6380_SLP_MODE_CTRL_6 …
#define MT6380_SLP_MODE_CTRL_7 …
#define MT6380_SLP_MODE_CTRL_8 …
#define MT6380_FCAL_CTRL_0 …
#define MT6380_FCAL_CTRL_1 …
#define MT6380_LDO_CTRL_0 …
#define MT6380_LDO_CTRL_1 …
#define MT6380_LDO_CTRL_2 …
#define MT6380_LDO_CTRL_3 …
#define MT6380_LDO_CTRL_4 …
#define MT6380_DEBUG_CTRL_0 …
#define MT6380_EFU_CTRL_0 …
#define MT6380_EFU_CTRL_1 …
#define MT6380_EFU_CTRL_2 …
#define MT6380_EFU_CTRL_3 …
#define MT6380_EFU_CTRL_4 …
#define MT6380_EFU_CTRL_5 …
#define MT6380_EFU_CTRL_6 …
#define MT6380_EFU_CTRL_7 …
#define MT6380_EFU_CTRL_8 …
#define MT6380_REGULATOR_MODE_AUTO …
#define MT6380_REGULATOR_MODE_FORCE_PWM …
struct mt6380_regulator_info { … };
#define MT6380_BUCK(match, vreg, min, max, step, volt_ranges, enreg, \
vosel, vosel_mask, enbit, voselon, _modeset_reg, \
_modeset_mask) …
#define MT6380_LDO(match, vreg, ldo_volt_table, enreg, enbit, vosel, \
vosel_mask, _modeset_reg, _modeset_mask) …
#define MT6380_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 int mt6380_regulator_set_mode(struct regulator_dev *rdev,
unsigned int mode)
{ … }
static unsigned int mt6380_regulator_get_mode(struct regulator_dev *rdev)
{ … }
static const struct regulator_ops mt6380_volt_range_ops = …;
static const struct regulator_ops mt6380_volt_table_ops = …;
static const struct regulator_ops mt6380_volt_fixed_ops = …;
static struct mt6380_regulator_info mt6380_regulators[] = …;
static int mt6380_regulator_probe(struct platform_device *pdev)
{ … }
static const struct platform_device_id mt6380_platform_ids[] = …;
MODULE_DEVICE_TABLE(platform, mt6380_platform_ids);
static const struct of_device_id __maybe_unused mt6380_of_match[] = …;
MODULE_DEVICE_TABLE(of, mt6380_of_match);
static struct platform_driver mt6380_regulator_driver = …;
module_platform_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;