#include <linux/module.h>
#include <linux/init.h>
#include <linux/err.h>
#include <linux/gpio/consumer.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/da9055/core.h>
#include <linux/mfd/da9055/reg.h>
#include <linux/mfd/da9055/pdata.h>
#define DA9055_MIN_UA …
#define DA9055_MAX_UA …
#define DA9055_LDO_MODE_SYNC …
#define DA9055_LDO_MODE_SLEEP …
#define DA9055_BUCK_MODE_SLEEP …
#define DA9055_BUCK_MODE_SYNC …
#define DA9055_BUCK_MODE_AUTO …
#define DA9055_ID_BUCK1 …
#define DA9055_ID_BUCK2 …
#define DA9055_ID_LDO1 …
#define DA9055_ID_LDO2 …
#define DA9055_ID_LDO3 …
#define DA9055_ID_LDO4 …
#define DA9055_ID_LDO5 …
#define DA9055_ID_LDO6 …
static const unsigned int da9055_current_limits[] = …;
struct da9055_conf_reg { … };
struct da9055_volt_reg { … };
struct da9055_mode_reg { … };
struct da9055_regulator_info { … };
struct da9055_regulator { … };
static unsigned int da9055_buck_get_mode(struct regulator_dev *rdev)
{ … }
static int da9055_buck_set_mode(struct regulator_dev *rdev,
unsigned int mode)
{ … }
static unsigned int da9055_ldo_get_mode(struct regulator_dev *rdev)
{ … }
static int da9055_ldo_set_mode(struct regulator_dev *rdev, unsigned int mode)
{ … }
static int da9055_regulator_get_voltage_sel(struct regulator_dev *rdev)
{ … }
static int da9055_regulator_set_voltage_sel(struct regulator_dev *rdev,
unsigned int selector)
{ … }
static int da9055_regulator_set_suspend_voltage(struct regulator_dev *rdev,
int uV)
{ … }
static int da9055_suspend_enable(struct regulator_dev *rdev)
{ … }
static int da9055_suspend_disable(struct regulator_dev *rdev)
{ … }
static const struct regulator_ops da9055_buck_ops = …;
static const struct regulator_ops da9055_ldo_ops = …;
#define DA9055_LDO(_id, step, min, max, vbits, voffset) …
#define DA9055_BUCK(_id, step, min, max, vbits, voffset, mbits, sbits) …
static struct da9055_regulator_info da9055_regulator_info[] = …;
static int da9055_gpio_init(struct device *dev,
struct da9055_regulator *regulator,
struct regulator_config *config,
struct da9055_pdata *pdata, int id)
{ … }
static irqreturn_t da9055_ldo5_6_oc_irq(int irq, void *data)
{ … }
static inline struct da9055_regulator_info *find_regulator_info(int id)
{ … }
static int da9055_regulator_probe(struct platform_device *pdev)
{ … }
static struct platform_driver da9055_regulator_driver = …;
static int __init da9055_regulator_init(void)
{ … }
subsys_initcall(da9055_regulator_init);
static void __exit da9055_regulator_exit(void)
{ … }
module_exit(da9055_regulator_exit);
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
MODULE_ALIAS(…) …;