#include <linux/i2c.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/of.h>
#include <linux/regmap.h>
#include <linux/regulator/driver.h>
#include <linux/regulator/machine.h>
#include <linux/regulator/of_regulator.h>
#define DRIVER_NAME …
#define LTC3676_BUCK1 …
#define LTC3676_BUCK2 …
#define LTC3676_BUCK3 …
#define LTC3676_BUCK4 …
#define LTC3676_LDOA …
#define LTC3676_LDOB …
#define LTC3676_SQD1 …
#define LTC3676_SQD2 …
#define LTC3676_CNTRL …
#define LTC3676_DVB1A …
#define LTC3676_DVB1B …
#define LTC3676_DVB2A …
#define LTC3676_DVB2B …
#define LTC3676_DVB3A …
#define LTC3676_DVB3B …
#define LTC3676_DVB4A …
#define LTC3676_DVB4B …
#define LTC3676_MSKIRQ …
#define LTC3676_MSKPG …
#define LTC3676_USER …
#define LTC3676_IRQSTAT …
#define LTC3676_PGSTATL …
#define LTC3676_PGSTATRT …
#define LTC3676_HRST …
#define LTC3676_CLIRQ …
#define LTC3676_DVBxA_REF_SELECT …
#define LTC3676_DVBxB_PGOOD_MASK …
#define LTC3676_IRQSTAT_PGOOD_TIMEOUT …
#define LTC3676_IRQSTAT_UNDERVOLT_WARN …
#define LTC3676_IRQSTAT_UNDERVOLT_FAULT …
#define LTC3676_IRQSTAT_THERMAL_WARN …
#define LTC3676_IRQSTAT_THERMAL_FAULT …
enum ltc3676_reg { … };
struct ltc3676 { … };
static int ltc3676_set_suspend_voltage(struct regulator_dev *rdev, int uV)
{ … }
static int ltc3676_set_suspend_mode(struct regulator_dev *rdev,
unsigned int mode)
{ … }
static int ltc3676_set_voltage_sel(struct regulator_dev *rdev, unsigned selector)
{ … }
static inline unsigned int ltc3676_scale(unsigned int uV, u32 r1, u32 r2)
{ … }
static int ltc3676_of_parse_cb(struct device_node *np,
const struct regulator_desc *desc,
struct regulator_config *config)
{ … }
static const struct regulator_ops ltc3676_linear_regulator_ops = …;
static const struct regulator_ops ltc3676_fixed_standby_regulator_ops = …;
static const struct regulator_ops ltc3676_fixed_regulator_ops = …;
#define LTC3676_REG(_id, _name, _ops, en_reg, en_bit, dvba_reg, dvb_mask) …
#define LTC3676_LINEAR_REG(_id, _name, _en, _dvba) …
#define LTC3676_FIXED_REG(_id, _name, _en_reg, _en_bit) …
static const struct regulator_desc ltc3676_regulators[LTC3676_NUM_REGULATORS] = …;
static bool ltc3676_readable_writeable_reg(struct device *dev, unsigned int reg)
{ … }
static bool ltc3676_volatile_reg(struct device *dev, unsigned int reg)
{ … }
static const struct regmap_config ltc3676_regmap_config = …;
static irqreturn_t ltc3676_isr(int irq, void *dev_id)
{ … }
static int ltc3676_regulator_probe(struct i2c_client *client)
{ … }
static const struct i2c_device_id ltc3676_i2c_id[] = …;
MODULE_DEVICE_TABLE(i2c, ltc3676_i2c_id);
static const struct of_device_id __maybe_unused ltc3676_of_match[] = …;
MODULE_DEVICE_TABLE(of, ltc3676_of_match);
static struct i2c_driver ltc3676_driver = …;
module_i2c_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;