#include <linux/delay.h>
#include <linux/gpio/consumer.h>
#include <linux/i2c.h>
#include <linux/interrupt.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/property.h>
#include <linux/regmap.h>
#include <linux/regulator/driver.h>
#define RTMV20_REG_DEVINFO …
#define RTMV20_REG_PULSEDELAY …
#define RTMV20_REG_PULSEWIDTH …
#define RTMV20_REG_LDCTRL1 …
#define RTMV20_REG_ESPULSEWIDTH …
#define RTMV20_REG_ESLDCTRL1 …
#define RTMV20_REG_LBP …
#define RTMV20_REG_LDCTRL2 …
#define RTMV20_REG_FSIN1CTRL1 …
#define RTMV20_REG_FSIN1CTRL3 …
#define RTMV20_REG_FSIN2CTRL1 …
#define RTMV20_REG_FSIN2CTRL3 …
#define RTMV20_REG_ENCTRL …
#define RTMV20_REG_STRBVSYNDLYL …
#define RTMV20_REG_LDIRQ …
#define RTMV20_REG_LDSTAT …
#define RTMV20_REG_LDMASK …
#define RTMV20_MAX_REGS …
#define RTMV20_VID_MASK …
#define RICHTEK_VID …
#define RTMV20_LDCURR_MASK …
#define RTMV20_DELAY_MASK …
#define RTMV20_WIDTH_MASK …
#define RTMV20_WIDTH2_MASK …
#define RTMV20_LBPLVL_MASK …
#define RTMV20_LBPEN_MASK …
#define RTMV20_STROBEPOL_MASK …
#define RTMV20_VSYNPOL_MASK …
#define RTMV20_FSINEN_MASK …
#define RTMV20_ESEN_MASK …
#define RTMV20_FSINOUT_MASK …
#define LDENABLE_MASK …
#define OTPEVT_MASK …
#define SHORTEVT_MASK …
#define OPENEVT_MASK …
#define LBPEVT_MASK …
#define OCPEVT_MASK …
#define FAILEVT_MASK …
#define RTMV20_LSW_MINUA …
#define RTMV20_LSW_MAXUA …
#define RTMV20_LSW_STEPUA …
#define RTMV20_LSW_DEFAULTUA …
#define RTMV20_I2CRDY_TIMEUS …
#define RTMV20_CSRDY_TIMEUS …
struct rtmv20_priv { … };
static int rtmv20_lsw_enable(struct regulator_dev *rdev)
{ … }
static int rtmv20_lsw_disable(struct regulator_dev *rdev)
{ … }
static int rtmv20_lsw_set_current_limit(struct regulator_dev *rdev, int min_uA,
int max_uA)
{ … }
static int rtmv20_lsw_get_current_limit(struct regulator_dev *rdev)
{ … }
static const struct regulator_ops rtmv20_regulator_ops = …;
static const struct regulator_desc rtmv20_lsw_desc = …;
static irqreturn_t rtmv20_irq_handler(int irq, void *data)
{ … }
static u32 clamp_to_selector(u32 val, u32 min, u32 max, u32 step)
{ … }
static int rtmv20_properties_init(struct rtmv20_priv *priv)
{ … }
static int rtmv20_check_chip_exist(struct rtmv20_priv *priv)
{ … }
static bool rtmv20_is_accessible_reg(struct device *dev, unsigned int reg)
{ … }
static bool rtmv20_is_volatile_reg(struct device *dev, unsigned int reg)
{ … }
static const struct regmap_config rtmv20_regmap_config = …;
static int rtmv20_probe(struct i2c_client *i2c)
{ … }
static int __maybe_unused rtmv20_suspend(struct device *dev)
{ … }
static int __maybe_unused rtmv20_resume(struct device *dev)
{ … }
static SIMPLE_DEV_PM_OPS(rtmv20_pm, rtmv20_suspend, rtmv20_resume);
static const struct of_device_id __maybe_unused rtmv20_of_id[] = …;
MODULE_DEVICE_TABLE(of, rtmv20_of_id);
static struct i2c_driver rtmv20_driver = …;
module_i2c_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;