#include <linux/init.h>
#include <linux/mfd/max77620.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/regmap.h>
#include <linux/regulator/driver.h>
#include <linux/regulator/machine.h>
#include <linux/regulator/of_regulator.h>
#define max77620_rails(_name) …
#define MAX77620_POWER_MODE_NORMAL …
#define MAX77620_POWER_MODE_LPM …
#define MAX77620_POWER_MODE_GLPM …
#define MAX77620_POWER_MODE_DISABLE …
#define MAX77620_SD_SR_13_75 …
#define MAX77620_SD_SR_27_5 …
#define MAX77620_SD_SR_55 …
#define MAX77620_SD_SR_100 …
enum max77620_regulators { … };
enum max77620_regulator_type { … };
struct max77620_regulator_info { … };
struct max77620_regulator_pdata { … };
struct max77620_regulator { … };
#define fps_src_name(fps_src) …
static int max77620_regulator_get_fps_src(struct max77620_regulator *pmic,
int id)
{ … }
static int max77620_regulator_set_fps_src(struct max77620_regulator *pmic,
int fps_src, int id)
{ … }
static int max77620_regulator_set_fps_slots(struct max77620_regulator *pmic,
int id, bool is_suspend)
{ … }
static int max77620_regulator_set_power_mode(struct max77620_regulator *pmic,
int power_mode, int id)
{ … }
static int max77620_regulator_get_power_mode(struct max77620_regulator *pmic,
int id)
{ … }
static int max77620_read_slew_rate(struct max77620_regulator *pmic, int id)
{ … }
static int max77620_set_slew_rate(struct max77620_regulator *pmic, int id,
int slew_rate)
{ … }
static int max77620_config_power_ok(struct max77620_regulator *pmic, int id)
{ … }
static int max77620_init_pmic(struct max77620_regulator *pmic, int id)
{ … }
static int max77620_regulator_enable(struct regulator_dev *rdev)
{ … }
static int max77620_regulator_disable(struct regulator_dev *rdev)
{ … }
static int max77620_regulator_is_enabled(struct regulator_dev *rdev)
{ … }
static int max77620_regulator_set_mode(struct regulator_dev *rdev,
unsigned int mode)
{ … }
static unsigned int max77620_regulator_get_mode(struct regulator_dev *rdev)
{ … }
static int max77620_regulator_set_ramp_delay(struct regulator_dev *rdev,
int ramp_delay)
{ … }
static int max77620_of_parse_cb(struct device_node *np,
const struct regulator_desc *desc,
struct regulator_config *config)
{ … }
static const struct regulator_ops max77620_regulator_ops = …;
#define MAX77620_SD_CNF2_ROVS_EN_NONE …
#define RAIL_SD(_id, _name, _sname, _volt_mask, _min_uV, _max_uV, \
_step_uV, _rs_add, _rs_mask) …
#define RAIL_LDO(_id, _name, _sname, _type, _min_uV, _max_uV, _step_uV) …
static struct max77620_regulator_info max77620_regs_info[MAX77620_NUM_REGS] = …;
static struct max77620_regulator_info max20024_regs_info[MAX77620_NUM_REGS] = …;
static struct max77620_regulator_info max77663_regs_info[MAX77620_NUM_REGS] = …;
static int max77620_regulator_probe(struct platform_device *pdev)
{ … }
#ifdef CONFIG_PM_SLEEP
static int max77620_regulator_suspend(struct device *dev)
{ … }
static int max77620_regulator_resume(struct device *dev)
{ … }
#endif
static const struct dev_pm_ops max77620_regulator_pm_ops = …;
static const struct platform_device_id max77620_regulator_devtype[] = …;
MODULE_DEVICE_TABLE(platform, max77620_regulator_devtype);
static struct platform_driver max77620_regulator_driver = …;
module_platform_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;