#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/err.h>
#include <linux/slab.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/of_regulator.h>
#include <linux/mfd/da9063/core.h>
#include <linux/mfd/da9063/registers.h>
#define BFIELD(_reg, _mask) …
enum { … };
struct da9063_regulator_data { … };
struct da9063_regulators_pdata { … };
struct da9063_regulator_info { … };
#define DA9063_LDO(chip, regl_name, min_mV, step_mV, max_mV) …
#define DA9063_BUCK(chip, regl_name, min_mV, step_mV, max_mV, limits_array, \
creg, cmask) …
#define DA9063_BUCK_COMMON_FIELDS(regl_name) …
struct da9063_dev_model { … };
struct da9063_regulator { … };
struct da9063_regulators { … };
enum { … };
static const unsigned int da9063_buck_a_limits[] = …;
static const unsigned int da9063_buck_b_limits[] = …;
static const unsigned int da9063_bcores_merged_limits[] = …;
static const unsigned int da9063_bmem_bio_merged_limits[] = …;
static int da9063_set_xvp(struct regulator_dev *rdev, int lim_uV, int severity, bool enable)
{ … }
static int da9063_buck_set_mode(struct regulator_dev *rdev, unsigned int mode)
{ … }
static unsigned int da9063_buck_get_mode(struct regulator_dev *rdev)
{ … }
static int da9063_ldo_set_mode(struct regulator_dev *rdev, unsigned int mode)
{ … }
static unsigned int da9063_ldo_get_mode(struct regulator_dev *rdev)
{ … }
static int da9063_buck_get_status(struct regulator_dev *rdev)
{ … }
static int da9063_ldo_get_status(struct regulator_dev *rdev)
{ … }
static int da9063_set_suspend_voltage(struct regulator_dev *rdev, int uV)
{ … }
static int da9063_suspend_enable(struct regulator_dev *rdev)
{ … }
static int da9063_suspend_disable(struct regulator_dev *rdev)
{ … }
static int da9063_buck_set_suspend_mode(struct regulator_dev *rdev,
unsigned int mode)
{ … }
static int da9063_ldo_set_suspend_mode(struct regulator_dev *rdev,
unsigned int mode)
{ … }
static unsigned int da9063_get_overdrive_mask(const struct regulator_desc *desc)
{ … }
static int da9063_buck_set_limit_set_overdrive(struct regulator_dev *rdev,
int min_uA, int max_uA,
unsigned int overdrive_mask)
{ … }
static int da9063_buck_set_limit_clear_overdrive(struct regulator_dev *rdev,
int min_uA, int max_uA,
unsigned int overdrive_mask)
{ … }
static int da9063_buck_set_current_limit(struct regulator_dev *rdev,
int min_uA, int max_uA)
{ … }
static int da9063_buck_get_current_limit(struct regulator_dev *rdev)
{ … }
static const struct regulator_ops da9063_buck_ops = …;
static const struct regulator_ops da9063_ldo_ops = …;
static const struct da9063_regulator_info da9063_regulator_info[] = …;
static struct da9063_dev_model regulators_models[] = …;
static irqreturn_t da9063_ldo_lim_event(int irq, void *data)
{ … }
static const struct regulator_init_data *da9063_get_regulator_initdata(
const struct da9063_regulators_pdata *regl_pdata, int id)
{ … }
static int da9063_check_xvp_constraints(struct regulator_config *config)
{ … }
static struct of_regulator_match da9063_matches[] = …;
static struct da9063_regulators_pdata *da9063_parse_regulators_dt(
struct platform_device *pdev,
struct of_regulator_match **da9063_reg_matches)
{ … }
static int da9063_regulator_probe(struct platform_device *pdev)
{ … }
static struct platform_driver da9063_regulator_driver = …;
static int __init da9063_regulator_init(void)
{ … }
subsys_initcall(da9063_regulator_init);
static void __exit da9063_regulator_cleanup(void)
{ … }
module_exit(da9063_regulator_cleanup);
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
MODULE_ALIAS(…) …;