#include <linux/delay.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/spmi.h>
struct hi6421_spmi_reg_priv { … };
struct hi6421_spmi_reg_info { … };
static const unsigned int range_1v5_to_2v0[] = …;
static const unsigned int range_1v725_to_1v9[] = …;
static const unsigned int range_1v75_to_3v3[] = …;
static const unsigned int range_1v8_to_3v0[] = …;
static const unsigned int range_2v5_to_3v3[] = …;
static const unsigned int range_2v6_to_3v3[] = …;
#define HI6421V600_LDO(_id, vtable, ereg, emask, vreg, \
odelay, etime, ecomask, ecoamp) …
static int hi6421_spmi_regulator_enable(struct regulator_dev *rdev)
{ … }
static unsigned int hi6421_spmi_regulator_get_mode(struct regulator_dev *rdev)
{ … }
static int hi6421_spmi_regulator_set_mode(struct regulator_dev *rdev,
unsigned int mode)
{ … }
static unsigned int
hi6421_spmi_regulator_get_optimum_mode(struct regulator_dev *rdev,
int input_uV, int output_uV,
int load_uA)
{ … }
static const struct regulator_ops hi6421_spmi_ldo_rops = …;
enum hi6421_spmi_regulator_id { … };
static struct hi6421_spmi_reg_info regulator_info[] = …;
static int hi6421_spmi_regulator_probe(struct platform_device *pdev)
{ … }
static const struct platform_device_id hi6421_spmi_regulator_table[] = …;
MODULE_DEVICE_TABLE(platform, hi6421_spmi_regulator_table);
static struct platform_driver hi6421_spmi_regulator_driver = …;
module_platform_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;