#include <linux/err.h>
#include <linux/i2c.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/regulator/driver.h>
#include <linux/regulator/machine.h>
#include <linux/regmap.h>
#include <linux/irq.h>
#include <linux/interrupt.h>
#include <linux/regulator/of_regulator.h>
#include "pv88090-regulator.h"
#define PV88090_MAX_REGULATORS …
enum { … };
struct pv88090_regulator { … };
struct pv88090 { … };
struct pv88090_buck_voltage { … };
static const struct regmap_config pv88090_regmap_config = …;
static const unsigned int pv88090_buck1_limits[] = …;
static const unsigned int pv88090_buck23_limits[] = …;
static const struct pv88090_buck_voltage pv88090_buck_vol[3] = …;
static unsigned int pv88090_buck_get_mode(struct regulator_dev *rdev)
{ … }
static int pv88090_buck_set_mode(struct regulator_dev *rdev,
unsigned int mode)
{ … }
static const struct regulator_ops pv88090_buck_ops = …;
static const struct regulator_ops pv88090_ldo_ops = …;
#define PV88090_BUCK(chip, regl_name, min, step, max, limits_array) …
#define PV88090_LDO(chip, regl_name, min, step, max) …
static struct pv88090_regulator pv88090_regulator_info[] = …;
static irqreturn_t pv88090_irq_handler(int irq, void *data)
{ … }
static int pv88090_i2c_probe(struct i2c_client *i2c)
{ … }
static const struct i2c_device_id pv88090_i2c_id[] = …;
MODULE_DEVICE_TABLE(i2c, pv88090_i2c_id);
#ifdef CONFIG_OF
static const struct of_device_id pv88090_dt_ids[] = …;
MODULE_DEVICE_TABLE(of, pv88090_dt_ids);
#endif
static struct i2c_driver pv88090_regulator_driver = …;
module_i2c_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;