#include <linux/bits.h>
#include <linux/i2c.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/regmap.h>
#include <linux/regulator/driver.h>
#include <linux/regulator/of_regulator.h>
#define RT5759_REG_VENDORINFO …
#define RT5759_REG_FREQ …
#define RT5759_REG_VSEL …
#define RT5759_REG_DCDCCTRL …
#define RT5759_REG_STATUS …
#define RT5759_REG_DCDCSET …
#define RT5759A_REG_WDTEN …
#define RT5759_TSTEP_MASK …
#define RT5759_VSEL_MASK …
#define RT5759_DISCHARGE_MASK …
#define RT5759_FPWM_MASK …
#define RT5759_ENABLE_MASK …
#define RT5759_OT_MASK …
#define RT5759_UV_MASK …
#define RT5957_OCLVL_MASK …
#define RT5759_OCLVL_SHIFT …
#define RT5957_OTLVL_MASK …
#define RT5759_OTLVL_SHIFT …
#define RT5759A_WDTEN_MASK …
#define RT5759_MANUFACTURER_ID …
#define RT5759_NUM_VOLTS …
#define RT5759_MIN_UV …
#define RT5759_STEP_UV …
#define RT5759A_STEP_UV …
#define RT5759_MINSS_TIMEUS …
#define RT5759_PSKIP_MODE …
#define RT5759_FPWM_MODE …
enum { … };
struct rt5759_priv { … };
static int rt5759_set_mode(struct regulator_dev *rdev, unsigned int mode)
{ … }
static unsigned int rt5759_get_mode(struct regulator_dev *rdev)
{ … }
static int rt5759_get_error_flags(struct regulator_dev *rdev,
unsigned int *flags)
{ … }
static int rt5759_set_ocp(struct regulator_dev *rdev, int lim_uA, int severity,
bool enable)
{ … }
static int rt5759_set_otp(struct regulator_dev *rdev, int lim, int severity,
bool enable)
{ … }
static const struct regulator_ops rt5759_regulator_ops = …;
static unsigned int rt5759_of_map_mode(unsigned int mode)
{ … }
static const unsigned int rt5759_ramp_table[] = …;
static int rt5759_regulator_register(struct rt5759_priv *priv)
{ … }
static int rt5759_init_device_property(struct rt5759_priv *priv)
{ … }
static int rt5759_manufacturer_check(struct rt5759_priv *priv)
{ … }
static bool rt5759_is_accessible_reg(struct device *dev, unsigned int reg)
{ … }
static const struct regmap_config rt5759_regmap_config = …;
static int rt5759_probe(struct i2c_client *i2c)
{ … }
static const struct of_device_id __maybe_unused rt5759_device_table[] = …;
MODULE_DEVICE_TABLE(of, rt5759_device_table);
static struct i2c_driver rt5759_driver = …;
module_i2c_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;