#include <linux/err.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/mfd/as3722.h>
#include <linux/of.h>
#include <linux/of_platform.h>
#include <linux/platform_device.h>
#include <linux/regulator/driver.h>
#include <linux/regulator/machine.h>
#include <linux/regulator/of_regulator.h>
#include <linux/slab.h>
enum as3722_regulators_id { … };
struct as3722_register_mapping { … };
struct as3722_regulator_config_data { … };
struct as3722_regulators { … };
static const struct as3722_register_mapping as3722_reg_lookup[] = …;
static const unsigned int as3722_ldo_current[] = …;
static const unsigned int as3722_sd016_current[] = …;
static const struct regulator_ops as3722_ldo0_ops = …;
static const struct regulator_ops as3722_ldo0_extcntrl_ops = …;
static int as3722_ldo3_set_tracking_mode(struct as3722_regulators *as3722_reg,
int id, u8 mode)
{ … }
static int as3722_ldo3_get_current_limit(struct regulator_dev *rdev)
{ … }
static const struct regulator_ops as3722_ldo3_ops = …;
static const struct regulator_ops as3722_ldo3_extcntrl_ops = …;
static const struct regulator_ops as3722_ldo6_ops = …;
static const struct regulator_ops as3722_ldo6_extcntrl_ops = …;
static const struct linear_range as3722_ldo_ranges[] = …;
static const struct regulator_ops as3722_ldo_ops = …;
static const struct regulator_ops as3722_ldo_extcntrl_ops = …;
static unsigned int as3722_sd_get_mode(struct regulator_dev *rdev)
{ … }
static int as3722_sd_set_mode(struct regulator_dev *rdev,
unsigned int mode)
{ … }
static bool as3722_sd0_is_low_voltage(struct as3722_regulators *as3722_regs)
{ … }
static const struct linear_range as3722_sd2345_ranges[] = …;
static const struct regulator_ops as3722_sd016_ops = …;
static const struct regulator_ops as3722_sd016_extcntrl_ops = …;
static const struct regulator_ops as3722_sd2345_ops = …;
static const struct regulator_ops as3722_sd2345_extcntrl_ops = …;
static int as3722_extreg_init(struct as3722_regulators *as3722_regs, int id,
int ext_pwr_ctrl)
{ … }
static struct of_regulator_match as3722_regulator_matches[] = …;
static int as3722_get_regulator_dt_data(struct platform_device *pdev,
struct as3722_regulators *as3722_regs)
{ … }
static int as3722_regulator_probe(struct platform_device *pdev)
{ … }
static const struct of_device_id of_as3722_regulator_match[] = …;
MODULE_DEVICE_TABLE(of, of_as3722_regulator_match);
static struct platform_driver as3722_regulator_driver = …;
module_platform_driver(…) …;
MODULE_ALIAS(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;