#include <linux/bitops.h>
#include <linux/delay.h>
#include <linux/gpio/consumer.h>
#include <linux/i2c.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/mutex.h>
#include <linux/regmap.h>
#include <linux/regulator/driver.h>
enum { … };
#define RTQ6752_REG_PAVDD …
#define RTQ6752_REG_NAVDD …
#define RTQ6752_REG_PAVDDONDLY …
#define RTQ6752_REG_PAVDDSSTIME …
#define RTQ6752_REG_NAVDDONDLY …
#define RTQ6752_REG_NAVDDSSTIME …
#define RTQ6752_REG_OPTION1 …
#define RTQ6752_REG_CHSWITCH …
#define RTQ6752_REG_FAULT …
#define RTQ6752_VOUT_MASK …
#define RTQ6752_NAVDDEN_MASK …
#define RTQ6752_PAVDDEN_MASK …
#define RTQ6752_PAVDDAD_MASK …
#define RTQ6752_NAVDDAD_MASK …
#define RTQ6752_PAVDDF_MASK …
#define RTQ6752_NAVDDF_MASK …
#define RTQ6752_ENABLE_MASK …
#define RTQ6752_VOUT_MINUV …
#define RTQ6752_VOUT_STEPUV …
#define RTQ6752_VOUT_NUM …
#define RTQ6752_I2CRDY_TIMEUS …
#define RTQ6752_MINSS_TIMEUS …
struct rtq6752_priv { … };
static int rtq6752_set_vdd_enable(struct regulator_dev *rdev)
{ … }
static int rtq6752_set_vdd_disable(struct regulator_dev *rdev)
{ … }
static int rtq6752_get_error_flags(struct regulator_dev *rdev,
unsigned int *flags)
{ … }
static const struct regulator_ops rtq6752_regulator_ops = …;
static const struct regulator_desc rtq6752_regulator_descs[] = …;
static int rtq6752_init_device_properties(struct rtq6752_priv *priv)
{ … }
static bool rtq6752_is_volatile_reg(struct device *dev, unsigned int reg)
{ … }
static const struct reg_default rtq6752_reg_defaults[] = …;
static const struct regmap_config rtq6752_regmap_config = …;
static int rtq6752_probe(struct i2c_client *i2c)
{ … }
static const struct of_device_id __maybe_unused rtq6752_device_table[] = …;
MODULE_DEVICE_TABLE(of, rtq6752_device_table);
static struct i2c_driver rtq6752_driver = …;
module_i2c_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;