#include <dt-bindings/regulator/richtek,rt5190a-regulator.h>
#include <linux/bits.h>
#include <linux/i2c.h>
#include <linux/interrupt.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/property.h>
#include <linux/regmap.h>
#include <linux/regulator/driver.h>
#include <linux/regulator/machine.h>
#include <linux/regulator/of_regulator.h>
#define RT5190A_REG_MANUFACTURE …
#define RT5190A_REG_BUCK2VSEL …
#define RT5190A_REG_BUCK3VSEL …
#define RT5190A_REG_DCDCCNTL …
#define RT5190A_REG_ENABLE …
#define RT5190A_REG_DISCHARGE …
#define RT5190A_REG_PROTMODE …
#define RT5190A_REG_MUTECNTL …
#define RT5190A_REG_PGSTAT …
#define RT5190A_REG_OVINT …
#define RT5190A_REG_HOTDIEMASK …
#define RT5190A_VSEL_MASK …
#define RT5190A_RID_BITMASK(rid) …
#define RT5190A_BUCK1_DISCHG_MASK …
#define RT5190A_BUCK1_DISCHG_ONVAL …
#define RT5190A_OVERVOLT_MASK …
#define RT5190A_UNDERVOLT_MASK …
#define RT5190A_CH234OT_MASK …
#define RT5190A_CHIPOT_MASK …
#define RT5190A_BUCK23_MINUV …
#define RT5190A_BUCK23_MAXUV …
#define RT5190A_BUCK23_STEPUV …
#define RT5190A_BUCK23_STEPNUM …
enum { … };
struct rt5190a_priv { … };
static int rt5190a_get_error_flags(struct regulator_dev *rdev,
unsigned int *flags)
{ … }
static int rt5190a_fixed_buck_set_mode(struct regulator_dev *rdev,
unsigned int mode)
{ … }
static unsigned int rt5190a_fixed_buck_get_mode(struct regulator_dev *rdev)
{ … }
static const struct regulator_ops rt5190a_ranged_buck_ops = …;
static const struct regulator_ops rt5190a_fixed_buck_ops = …;
static const struct regulator_ops rt5190a_fixed_ldo_ops = …;
static irqreturn_t rt5190a_irq_handler(int irq, void *data)
{ … }
static unsigned int rt5190a_of_map_mode(unsigned int mode)
{ … }
static int rt5190a_of_parse_cb(struct rt5190a_priv *priv, int rid,
struct of_regulator_match *match)
{ … }
static void rt5190a_fillin_regulator_desc(struct regulator_desc *desc, int rid)
{ … }
static struct of_regulator_match rt5190a_regulator_match[] = …;
static int rt5190a_parse_regulator_dt_data(struct rt5190a_priv *priv)
{ … }
static const struct reg_sequence rt5190a_init_patch[] = …;
static int rt5190a_device_initialize(struct rt5190a_priv *priv)
{ … }
static int rt5190a_device_check(struct rt5190a_priv *priv)
{ … }
static const struct regmap_config rt5190a_regmap_config = …;
static int rt5190a_probe(struct i2c_client *i2c)
{ … }
static const struct of_device_id __maybe_unused rt5190a_device_table[] = …;
MODULE_DEVICE_TABLE(of, rt5190a_device_table);
static struct i2c_driver rt5190a_driver = …;
module_i2c_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;