#include <linux/device.h>
#include <linux/err.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/module.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/tps6594.h>
#define BUCK_NB …
#define LDO_NB …
#define MULTI_PHASE_NB …
#define REGS_INT_NB …
#define TPS65224_REGS_INT_NB …
enum tps6594_regulator_id { … };
enum tps6594_multi_regulator_id { … };
struct tps6594_regulator_irq_type { … };
static struct tps6594_regulator_irq_type tps6594_ext_regulator_irq_types[] = …;
static struct tps6594_regulator_irq_type tps65224_ext_regulator_irq_types[] = …;
struct tps6594_regulator_irq_data { … };
struct tps6594_ext_regulator_irq_data { … };
#define TPS6594_REGULATOR(_name, _of, _id, _type, _ops, _n, _vr, _vm, _er, \
_em, _cr, _cm, _lr, _nlr, _delay, _fuv, \
_ct, _ncl, _bpm) … \
static const struct linear_range bucks_ranges[] = …;
static const struct linear_range ldos_1_2_3_ranges[] = …;
static const struct linear_range ldos_4_ranges[] = …;
static const struct linear_range tps65224_bucks_1_ranges[] = …;
static const struct linear_range tps65224_bucks_2_3_4_ranges[] = …;
static const struct linear_range tps65224_ldos_1_ranges[] = …;
static const struct linear_range tps65224_ldos_2_3_ranges[] = …;
static const struct regulator_ops tps6594_bucks_ops = …;
static const struct regulator_ops tps6594_ldos_1_2_3_ops = …;
static const struct regulator_ops tps6594_ldos_4_ops = …;
static const struct regulator_desc buck_regs[] = …;
static const struct regulator_desc tps65224_buck_regs[] = …;
static struct tps6594_regulator_irq_type tps6594_buck1_irq_types[] = …;
static struct tps6594_regulator_irq_type tps6594_buck2_irq_types[] = …;
static struct tps6594_regulator_irq_type tps6594_buck3_irq_types[] = …;
static struct tps6594_regulator_irq_type tps6594_buck4_irq_types[] = …;
static struct tps6594_regulator_irq_type tps6594_buck5_irq_types[] = …;
static struct tps6594_regulator_irq_type tps6594_ldo1_irq_types[] = …;
static struct tps6594_regulator_irq_type tps6594_ldo2_irq_types[] = …;
static struct tps6594_regulator_irq_type tps6594_ldo3_irq_types[] = …;
static struct tps6594_regulator_irq_type tps6594_ldo4_irq_types[] = …;
static struct tps6594_regulator_irq_type tps65224_buck1_irq_types[] = …;
static struct tps6594_regulator_irq_type tps65224_buck2_irq_types[] = …;
static struct tps6594_regulator_irq_type tps65224_buck3_irq_types[] = …;
static struct tps6594_regulator_irq_type tps65224_buck4_irq_types[] = …;
static struct tps6594_regulator_irq_type tps65224_ldo1_irq_types[] = …;
static struct tps6594_regulator_irq_type tps65224_ldo2_irq_types[] = …;
static struct tps6594_regulator_irq_type tps65224_ldo3_irq_types[] = …;
static struct tps6594_regulator_irq_type *tps6594_bucks_irq_types[] = …;
static struct tps6594_regulator_irq_type *tps6594_ldos_irq_types[] = …;
static struct tps6594_regulator_irq_type *tps65224_bucks_irq_types[] = …;
static struct tps6594_regulator_irq_type *tps65224_ldos_irq_types[] = …;
static const struct regulator_desc tps6594_multi_regs[] = …;
static const struct regulator_desc tps65224_multi_regs[] = …;
static const struct regulator_desc tps6594_ldo_regs[] = …;
static const struct regulator_desc tps65224_ldo_regs[] = …;
static irqreturn_t tps6594_regulator_irq_handler(int irq, void *data)
{ … }
static int tps6594_request_reg_irqs(struct platform_device *pdev,
struct regulator_dev *rdev,
struct tps6594_regulator_irq_data *irq_data,
struct tps6594_regulator_irq_type *regs_irq_types,
size_t interrupt_cnt,
int *irq_idx)
{ … }
static int tps6594_regulator_probe(struct platform_device *pdev)
{ … }
static struct platform_driver tps6594_regulator_driver = …;
module_platform_driver(…) …;
MODULE_ALIAS(…) …;
MODULE_AUTHOR(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;