#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/da9062/core.h>
#include <linux/mfd/da9062/registers.h>
#include <dt-bindings/regulator/dlg,da9063-regulator.h>
enum { … };
enum { … };
struct da9062_regulator_info { … };
struct da9062_regulator { … };
struct da9062_regulators { … };
static const unsigned int da9062_buck_a_limits[] = …;
static const unsigned int da9062_buck_b_limits[] = …;
static unsigned int da9062_map_buck_mode(unsigned int mode)
{ … }
static int da9062_buck_set_mode(struct regulator_dev *rdev, unsigned mode)
{ … }
static unsigned da9062_buck_get_mode(struct regulator_dev *rdev)
{ … }
static int da9062_ldo_set_mode(struct regulator_dev *rdev, unsigned mode)
{ … }
static unsigned da9062_ldo_get_mode(struct regulator_dev *rdev)
{ … }
static int da9062_buck_get_status(struct regulator_dev *rdev)
{ … }
static int da9062_ldo_get_status(struct regulator_dev *rdev)
{ … }
static int da9062_set_suspend_voltage(struct regulator_dev *rdev, int uv)
{ … }
static int da9062_suspend_enable(struct regulator_dev *rdev)
{ … }
static int da9062_suspend_disable(struct regulator_dev *rdev)
{ … }
static int da9062_buck_set_suspend_mode(struct regulator_dev *rdev,
unsigned mode)
{ … }
static int da9062_ldo_set_suspend_mode(struct regulator_dev *rdev,
unsigned mode)
{ … }
static const struct regulator_ops da9062_buck_ops = …;
static const struct regulator_ops da9062_ldo_ops = …;
static const struct da9062_regulator_info local_da9061_regulator_info[] = …;
static const struct da9062_regulator_info local_da9062_regulator_info[] = …;
static irqreturn_t da9062_ldo_lim_event(int irq, void *data)
{ … }
static int da9062_regulator_probe(struct platform_device *pdev)
{ … }
static struct platform_driver da9062_regulator_driver = …;
static int __init da9062_regulator_init(void)
{ … }
subsys_initcall(da9062_regulator_init);
static void __exit da9062_regulator_cleanup(void)
{ … }
module_exit(da9062_regulator_cleanup);
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
MODULE_ALIAS(…) …;