#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/err.h>
#include <linux/platform_device.h>
#include <linux/regulator/driver.h>
#include <linux/regulator/machine.h>
#include <linux/regulator/tps6507x.h>
#include <linux/of.h>
#include <linux/slab.h>
#include <linux/mfd/tps6507x.h>
#include <linux/regulator/of_regulator.h>
#define TPS6507X_DCDC_1 …
#define TPS6507X_DCDC_2 …
#define TPS6507X_DCDC_3 …
#define TPS6507X_LDO_1 …
#define TPS6507X_LDO_2 …
#define TPS6507X_MAX_REG_ID …
#define TPS6507X_NUM_DCDC …
#define TPS6507X_NUM_LDO …
#define TPS6507X_NUM_REGULATOR …
static const unsigned int VDCDCx_VSEL_table[] = …;
static const unsigned int LDO1_VSEL_table[] = …;
#define LDO2_VSEL_table …
struct tps_info { … };
static struct tps_info tps6507x_pmic_regs[] = …;
struct tps6507x_pmic { … };
static inline int tps6507x_pmic_read(struct tps6507x_pmic *tps, u8 reg)
{ … }
static inline int tps6507x_pmic_write(struct tps6507x_pmic *tps, u8 reg, u8 val)
{ … }
static int tps6507x_pmic_set_bits(struct tps6507x_pmic *tps, u8 reg, u8 mask)
{ … }
static int tps6507x_pmic_clear_bits(struct tps6507x_pmic *tps, u8 reg, u8 mask)
{ … }
static int tps6507x_pmic_reg_read(struct tps6507x_pmic *tps, u8 reg)
{ … }
static int tps6507x_pmic_reg_write(struct tps6507x_pmic *tps, u8 reg, u8 val)
{ … }
static int tps6507x_pmic_is_enabled(struct regulator_dev *dev)
{ … }
static int tps6507x_pmic_enable(struct regulator_dev *dev)
{ … }
static int tps6507x_pmic_disable(struct regulator_dev *dev)
{ … }
static int tps6507x_pmic_get_voltage_sel(struct regulator_dev *dev)
{ … }
static int tps6507x_pmic_set_voltage_sel(struct regulator_dev *dev,
unsigned selector)
{ … }
static const struct regulator_ops tps6507x_pmic_ops = …;
static int tps6507x_pmic_of_parse_cb(struct device_node *np,
const struct regulator_desc *desc,
struct regulator_config *config)
{ … }
static int tps6507x_pmic_probe(struct platform_device *pdev)
{ … }
static struct platform_driver tps6507x_pmic_driver = …;
static int __init tps6507x_pmic_init(void)
{ … }
subsys_initcall(tps6507x_pmic_init);
static void __exit tps6507x_pmic_cleanup(void)
{ … }
module_exit(tps6507x_pmic_cleanup);
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
MODULE_ALIAS(…) …;