#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/err.h>
#include <linux/errno.h>
#include <linux/slab.h>
#include <linux/spi/spi.h>
#include <linux/regulator/driver.h>
#include <linux/regulator/machine.h>
#define REG_LDO_SET …
#define LDO_ILIM_MASK …
#define LDO_VSEL_MASK …
#define LDO2_ILIM_SHIFT …
#define LDO2_VSEL_SHIFT …
#define LDO1_ILIM_SHIFT …
#define LDO1_VSEL_SHIFT …
#define REG_BLOCK_EN …
#define BLOCK_MASK …
#define BLOCK_LDO1_SHIFT …
#define BLOCK_LDO2_SHIFT …
#define BLOCK_LCD_SHIFT …
#define BLOCK_USB_SHIFT …
#define REG_DCDC_SET …
#define DCDC_VDCDC_MASK …
#define DCDC_VDCDC1_SHIFT …
#define DCDC_VDCDC2_SHIFT …
#define DCDC_VDCDC3_SHIFT …
#define REG_DCDC_EN …
#define DCDCDCDC_EN_MASK …
#define DCDCDCDC1_EN_SHIFT …
#define DCDCDCDC1_PG_MSK …
#define DCDCDCDC2_EN_SHIFT …
#define DCDCDCDC2_PG_MSK …
#define DCDCDCDC3_EN_SHIFT …
#define DCDCDCDC3_PG_MSK …
#define REG_USB …
#define USB_ILIM_SHIFT …
#define USB_ILIM_MASK …
#define USB_TSD_SHIFT …
#define USB_TSD_MASK …
#define USB_TWARN_SHIFT …
#define USB_TWARN_MASK …
#define USB_IWARN_SD …
#define USB_FAST_LOOP …
#define REG_ALARM …
#define ALARM_LDO1 …
#define ALARM_DCDC1 …
#define ALARM_DCDC2 …
#define ALARM_DCDC3 …
#define ALARM_LDO2 …
#define ALARM_USB_WARN …
#define ALARM_USB_ALARM …
#define ALARM_LCD …
#define ALARM_TEMP_WARM …
#define ALARM_TEMP_HOT …
#define ALARM_NRST …
#define ALARM_POWERUP …
#define REG_INT_ENABLE …
#define INT_LDO1 …
#define INT_DCDC1 …
#define INT_DCDC2 …
#define INT_DCDC3 …
#define INT_LDO2 …
#define INT_USB_WARN …
#define INT_USB_ALARM …
#define INT_LCD …
#define INT_TEMP_WARM …
#define INT_TEMP_HOT …
#define INT_GLOBAL_EN …
#define REG_INT_STATUS …
#define STATUS_LDO1 …
#define STATUS_DCDC1 …
#define STATUS_DCDC2 …
#define STATUS_DCDC3 …
#define STATUS_LDO2 …
#define STATUS_USB_WARN …
#define STATUS_USB_ALARM …
#define STATUS_LCD …
#define STATUS_TEMP_WARM …
#define STATUS_TEMP_HOT …
#define REG_SOFTWARE_RESET …
#define REG_WRITE_ENABLE …
#define REG_REV_ID …
#define N_DCDC …
#define N_LDO …
#define N_SWITCH …
#define N_REGULATORS …
#define CMD_READ(reg) …
#define CMD_WRITE(reg) …
#define STAT_CLK …
#define STAT_WRITE …
#define STAT_INVALID …
#define STAT_WP …
struct field { … };
struct supply_info { … };
struct tps6524x { … };
static int __read_reg(struct tps6524x *hw, int reg)
{ … }
static int read_reg(struct tps6524x *hw, int reg)
{ … }
static int __write_reg(struct tps6524x *hw, int reg, int val)
{ … }
static int __rmw_reg(struct tps6524x *hw, int reg, int mask, int val)
{ … }
static int rmw_protect(struct tps6524x *hw, int reg, int mask, int val)
{ … }
static int read_field(struct tps6524x *hw, const struct field *field)
{ … }
static int write_field(struct tps6524x *hw, const struct field *field,
int val)
{ … }
static const unsigned int dcdc1_voltages[] = …;
static const unsigned int dcdc2_voltages[] = …;
static const unsigned int dcdc3_voltages[] = …;
static const unsigned int ldo1_voltages[] = …;
static const unsigned int ldo2_voltages[] = …;
static const unsigned int fixed_5000000_voltage[] = …;
static const unsigned int ldo_ilimsel[] = …;
static const unsigned int usb_ilimsel[] = …;
static const unsigned int fixed_2400000_ilimsel[] = …;
static const unsigned int fixed_1200000_ilimsel[] = …;
static const unsigned int fixed_400000_ilimsel[] = …;
#define __MK_FIELD(_reg, _mask, _shift) …
static const struct supply_info supply_info[N_REGULATORS] = …;
static int set_voltage_sel(struct regulator_dev *rdev, unsigned selector)
{ … }
static int get_voltage_sel(struct regulator_dev *rdev)
{ … }
static int set_current_limit(struct regulator_dev *rdev, int min_uA,
int max_uA)
{ … }
static int get_current_limit(struct regulator_dev *rdev)
{ … }
static int enable_supply(struct regulator_dev *rdev)
{ … }
static int disable_supply(struct regulator_dev *rdev)
{ … }
static int is_supply_enabled(struct regulator_dev *rdev)
{ … }
static const struct regulator_ops regulator_ops = …;
static int pmic_probe(struct spi_device *spi)
{ … }
static struct spi_driver pmic_driver = …;
module_spi_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;
MODULE_ALIAS(…) …;