#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/init.h>
#include <linux/err.h>
#include <linux/platform_device.h>
#include <linux/regulator/driver.h>
#include <linux/regulator/machine.h>
#include <linux/of.h>
#include <linux/regulator/of_regulator.h>
#include <linux/mfd/da9052/da9052.h>
#include <linux/mfd/da9052/reg.h>
#include <linux/mfd/da9052/pdata.h>
#define DA9052_BUCK_PERI_3uV_STEP …
#define DA9052_BUCK_PERI_REG_MAP_UPTO_3uV …
#define DA9052_CONST_3uV …
#define DA9052_MIN_UA …
#define DA9052_MAX_UA …
#define DA9052_CURRENT_RANGE …
#define DA9052_BUCK_ILIM_MASK_EVEN …
#define DA9052_BUCK_ILIM_MASK_ODD …
#define DA9052_ID_BUCK1 …
#define DA9052_ID_BUCK2 …
#define DA9052_ID_BUCK3 …
#define DA9052_ID_BUCK4 …
#define DA9052_ID_LDO1 …
#define DA9052_ID_LDO2 …
#define DA9052_ID_LDO3 …
#define DA9052_ID_LDO4 …
#define DA9052_ID_LDO5 …
#define DA9052_ID_LDO6 …
#define DA9052_ID_LDO7 …
#define DA9052_ID_LDO8 …
#define DA9052_ID_LDO9 …
#define DA9052_ID_LDO10 …
static const u32 da9052_current_limits[3][4] = …;
struct da9052_regulator_info { … };
struct da9052_regulator { … };
static int verify_range(struct da9052_regulator_info *info,
int min_uV, int max_uV)
{ … }
static int da9052_dcdc_get_current_limit(struct regulator_dev *rdev)
{ … }
static int da9052_dcdc_set_current_limit(struct regulator_dev *rdev, int min_uA,
int max_uA)
{ … }
static int da9052_list_voltage(struct regulator_dev *rdev,
unsigned int selector)
{ … }
static int da9052_map_voltage(struct regulator_dev *rdev,
int min_uV, int max_uV)
{ … }
static int da9052_regulator_set_voltage_sel(struct regulator_dev *rdev,
unsigned int selector)
{ … }
static int da9052_regulator_set_voltage_time_sel(struct regulator_dev *rdev,
unsigned int old_sel,
unsigned int new_sel)
{ … }
static const struct regulator_ops da9052_dcdc_ops = …;
static const struct regulator_ops da9052_ldo_ops = …;
#define DA9052_LDO(_id, _name, step, min, max, sbits, ebits, abits) …
#define DA9052_DCDC(_id, _name, step, min, max, sbits, ebits, abits) …
static struct da9052_regulator_info da9052_regulator_info[] = …;
static struct da9052_regulator_info da9053_regulator_info[] = …;
static inline struct da9052_regulator_info *find_regulator_info(u8 chip_id,
int id)
{ … }
static int da9052_regulator_probe(struct platform_device *pdev)
{ … }
static struct platform_driver da9052_regulator_driver = …;
static int __init da9052_regulator_init(void)
{ … }
subsys_initcall(da9052_regulator_init);
static void __exit da9052_regulator_exit(void)
{ … }
module_exit(da9052_regulator_exit);
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
MODULE_ALIAS(…) …;