#include <linux/mfd/mt6358/registers.h>
#include <linux/mfd/mt6397/core.h>
#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/mt6358-regulator.h>
#include <linux/regulator/of_regulator.h>
#include <dt-bindings/regulator/mediatek,mt6397-regulator.h>
struct mt6358_regulator_info { … };
#define to_regulator_info(x) …
#define MT6358_BUCK(match, vreg, supply, min, max, step, \
vosel_mask, _da_vsel_reg, _da_vsel_mask, \
_modeset_reg, _modeset_shift) …
#define MT6358_LDO(match, vreg, supply, volt_ranges, enreg, enbit, vosel, vosel_mask) …
#define MT6358_LDO1(match, vreg, supply, min, max, step, \
_da_vsel_reg, _da_vsel_mask, vosel, vosel_mask) …
#define MT6358_REG_FIXED(match, vreg, supply, enreg, enbit, volt) …
#define MT6366_BUCK(match, vreg, min, max, step, \
vosel_mask, _da_vsel_reg, _da_vsel_mask, \
_modeset_reg, _modeset_shift) …
#define MT6366_LDO(match, vreg, volt_ranges, supply, enreg, enbit, vosel, vosel_mask) …
#define MT6366_LDO1(match, vreg, supply, min, max, step, \
_da_vsel_reg, _da_vsel_mask, vosel, vosel_mask) …
#define MT6366_REG_FIXED(match, vreg, supply, enreg, enbit, volt) …
static const unsigned int vdram2_selectors[] = …;
static const struct linear_range vdram2_ranges[] = …;
static const unsigned int vsim_selectors[] = …;
static const struct linear_range vsim_ranges[] = …;
static const unsigned int vibr_selectors[] = …;
static const struct linear_range vibr_ranges[] = …;
static const unsigned int vusb_selectors[] = …;
static const struct linear_range vusb_ranges[] = …;
static const unsigned int vcamd_selectors[] = …;
static const struct linear_range vcamd_ranges[] = …;
static const unsigned int vefuse_selectors[] = …;
static const struct linear_range vefuse_ranges[] = …;
static const unsigned int vmch_vemc_selectors[] = …;
static const struct linear_range vmch_vemc_ranges[] = …;
static const unsigned int vcama_selectors[] = …;
static const struct linear_range vcama_ranges[] = …;
static const unsigned int vcn33_selectors[] = …;
static const struct linear_range vcn33_ranges[] = …;
static const unsigned int vmc_selectors[] = …;
static const struct linear_range vmc_ranges[] = …;
static const unsigned int vldo28_selectors[] = …;
static const struct linear_range vldo28_ranges[] = …;
static const unsigned int mt6366_vmddr_selectors[] = …;
static const struct linear_range mt6366_vmddr_ranges[] = …;
static const unsigned int mt6366_vcn18_vm18_selectors[] = …;
static const struct linear_range mt6366_vcn18_vm18_ranges[] = …;
static unsigned int mt6358_map_mode(unsigned int mode)
{ … }
static int mt6358_get_buck_voltage_sel(struct regulator_dev *rdev)
{ … }
static int mt6358_get_status(struct regulator_dev *rdev)
{ … }
static int mt6358_regulator_set_mode(struct regulator_dev *rdev,
unsigned int mode)
{ … }
static unsigned int mt6358_regulator_get_mode(struct regulator_dev *rdev)
{ … }
static const struct regulator_ops mt6358_buck_ops = …;
static const struct regulator_ops mt6358_volt_range_ops = …;
static const struct regulator_ops mt6358_volt_table_ops = …;
static const struct regulator_ops mt6358_volt_fixed_ops = …;
static const struct mt6358_regulator_info mt6358_regulators[] = …;
static const struct mt6358_regulator_info mt6366_regulators[] = …;
static int mt6358_sync_vcn33_setting(struct device *dev)
{ … }
static int mt6358_regulator_probe(struct platform_device *pdev)
{ … }
static const struct platform_device_id mt6358_platform_ids[] = …;
MODULE_DEVICE_TABLE(platform, mt6358_platform_ids);
static struct platform_driver mt6358_regulator_driver = …;
module_platform_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;