#include <linux/bits.h>
#include <linux/delay.h>
#include <linux/gpio/consumer.h>
#include <linux/i2c.h>
#include <linux/interrupt.h>
#include <linux/kernel.h>
#include <linux/mod_devicetable.h>
#include <linux/module.h>
#include <linux/pm_runtime.h>
#include <linux/regmap.h>
#include <linux/regulator/consumer.h>
#include <linux/regulator/driver.h>
#include <linux/regulator/of_regulator.h>
#define RT6190_REG_VID …
#define RT6190_REG_OUTV …
#define RT6190_REG_OUTC …
#define RT6190_REG_SET1 …
#define RT6190_REG_SET2 …
#define RT6190_REG_SET4 …
#define RT6190_REG_RATIO …
#define RT6190_REG_OUT_VOLT_L …
#define RT6190_REG_TEMP_H …
#define RT6190_REG_STAT1 …
#define RT6190_REG_ALERT1 …
#define RT6190_REG_ALERT2 …
#define RT6190_REG_MASK2 …
#define RT6190_REG_OCPEN …
#define RT6190_REG_SET5 …
#define RT6190_REG_VBUSC_ADC …
#define RT6190_REG_BUSC_VOLT_L …
#define RT6190_REG_BUSC_VOLT_H …
#define RT6190_REG_STAT3 …
#define RT6190_REG_ALERT3 …
#define RT6190_REG_MASK3 …
#define RT6190_ENPWM_MASK …
#define RT6190_ENDCHG_MASK …
#define RT6190_ALERT_OTPEVT …
#define RT6190_ALERT_UVPEVT …
#define RT6190_ALERT_OVPEVT …
#define RT6190_ENGCP_MASK …
#define RT6190_FCCM_MASK …
#define RICHTEK_VID …
#define RT6190_OUT_MIN_UV …
#define RT6190_OUT_MAX_UV …
#define RT6190_OUT_STEP_UV …
#define RT6190_OUT_N_VOLT …
#define RT6190_OUTV_MINSEL …
#define RT6190_OUT_MIN_UA …
#define RT6190_OUT_MAX_UA …
#define RT6190_OUT_STEP_UA …
#define RT6190_OUTC_MINSEL …
#define RT6190_EN_TIME_US …
#define RT6190_PSM_MODE …
#define RT6190_FCCM_MODE …
struct rt6190_data { … };
static int rt6190_out_set_voltage_sel(struct regulator_dev *rdev,
unsigned int selector)
{ … }
static int rt6190_out_get_voltage_sel(struct regulator_dev *rdev)
{ … }
static int rt6190_out_enable(struct regulator_dev *rdev)
{ … }
static int rt6190_out_disable(struct regulator_dev *rdev)
{ … }
static int rt6190_out_set_current_limit(struct regulator_dev *rdev, int min_uA,
int max_uA)
{ … }
static int rt6190_out_get_current_limit(struct regulator_dev *rdev)
{ … }
static int rt6190_out_set_mode(struct regulator_dev *rdev, unsigned int mode)
{ … }
static unsigned int rt6190_out_get_mode(struct regulator_dev *rdev)
{ … }
static int rt6190_out_get_error_flags(struct regulator_dev *rdev,
unsigned int *flags)
{ … }
static unsigned int rt6190_out_of_map_mode(unsigned int mode)
{ … }
static const struct regulator_ops rt6190_regulator_ops = …;
static const struct regulator_desc rt6190_regulator_desc = …;
static bool rt6190_is_volatile_reg(struct device *dev, unsigned int reg)
{ … }
static const struct regmap_config rt6190_regmap_config = …;
static irqreturn_t rt6190_irq_handler(int irq, void *devid)
{ … }
static int rt6190_init_registers(struct regmap *regmap)
{ … }
static int rt6190_probe(struct i2c_client *i2c)
{ … }
static int rt6190_runtime_suspend(struct device *dev)
{ … }
static int rt6190_runtime_resume(struct device *dev)
{ … }
static const struct dev_pm_ops __maybe_unused rt6190_dev_pm = …;
static const struct of_device_id rt6190_of_dev_table[] = …;
MODULE_DEVICE_TABLE(of, rt6190_of_dev_table);
static struct i2c_driver rt6190_driver = …;
module_i2c_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;