#include <linux/delay.h>
#include <linux/gpio/consumer.h>
#include <linux/i2c.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/property.h>
#include <linux/regmap.h>
#include <linux/regulator/driver.h>
#include <linux/regulator/of_regulator.h>
#define RT6160_MODE_AUTO …
#define RT6160_MODE_FPWM …
#define RT6160_REG_CNTL …
#define RT6160_REG_STATUS …
#define RT6160_REG_DEVID …
#define RT6160_REG_VSELL …
#define RT6160_REG_VSELH …
#define RT6160_NUM_REGS …
#define RT6160_FPWM_MASK …
#define RT6160_RAMPRATE_MASK …
#define RT6160_VID_MASK …
#define RT6160_VSEL_MASK …
#define RT6160_HDSTAT_MASK …
#define RT6160_UVSTAT_MASK …
#define RT6160_OCSTAT_MASK …
#define RT6160_TSDSTAT_MASK …
#define RT6160_PGSTAT_MASK …
#define RT6160_VENDOR_ID …
#define RT6160_VOUT_MINUV …
#define RT6160_VOUT_MAXUV …
#define RT6160_VOUT_STPUV …
#define RT6160_N_VOUTS …
#define RT6160_I2CRDY_TIMEUS …
struct rt6160_priv { … };
static const unsigned int rt6160_ramp_tables[] = …;
static int rt6160_enable(struct regulator_dev *rdev)
{ … }
static int rt6160_disable(struct regulator_dev *rdev)
{ … }
static int rt6160_is_enabled(struct regulator_dev *rdev)
{ … }
static int rt6160_set_mode(struct regulator_dev *rdev, unsigned int mode)
{ … }
static unsigned int rt6160_get_mode(struct regulator_dev *rdev)
{ … }
static int rt6160_set_suspend_voltage(struct regulator_dev *rdev, int uV)
{ … }
static int rt6160_get_error_flags(struct regulator_dev *rdev, unsigned int *flags)
{ … }
static const struct regulator_ops rt6160_regulator_ops = …;
static unsigned int rt6160_of_map_mode(unsigned int mode)
{ … }
static bool rt6160_is_accessible_reg(struct device *dev, unsigned int reg)
{ … }
static bool rt6160_is_volatile_reg(struct device *dev, unsigned int reg)
{ … }
static const struct regmap_config rt6160_regmap_config = …;
static int rt6160_probe(struct i2c_client *i2c)
{ … }
static const struct of_device_id __maybe_unused rt6160_of_match_table[] = …;
MODULE_DEVICE_TABLE(of, rt6160_of_match_table);
static struct i2c_driver rt6160_driver = …;
module_i2c_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;