#include <linux/module.h>
#include <linux/of.h>
#include <linux/regmap.h>
#include <linux/regulator/driver.h>
#include <linux/regulator/machine.h>
#include <linux/regulator/mt6315-regulator.h>
#include <linux/regulator/of_regulator.h>
#include <linux/spmi.h>
#define MT6315_BUCK_MODE_AUTO …
#define MT6315_BUCK_MODE_FORCE_PWM …
#define MT6315_BUCK_MODE_LP …
struct mt6315_regulator_info { … };
struct mt_regulator_init_data { … };
struct mt6315_chip { … };
#define MT_BUCK(_name, _bid, _vsel) …
static const struct linear_range mt_volt_range1[] = …;
static unsigned int mt6315_map_mode(unsigned int mode)
{ … }
static unsigned int mt6315_regulator_get_mode(struct regulator_dev *rdev)
{ … }
static int mt6315_regulator_set_mode(struct regulator_dev *rdev,
u32 mode)
{ … }
static int mt6315_get_status(struct regulator_dev *rdev)
{ … }
static const struct regulator_ops mt6315_volt_range_ops = …;
static const struct mt6315_regulator_info mt6315_regulators[MT6315_VBUCK_MAX] = …;
static const struct regmap_config mt6315_regmap_config = …;
static const struct of_device_id mt6315_of_match[] = …;
MODULE_DEVICE_TABLE(of, mt6315_of_match);
static int mt6315_regulator_probe(struct spmi_device *pdev)
{ … }
static void mt6315_regulator_shutdown(struct spmi_device *pdev)
{ … }
static struct spmi_driver mt6315_regulator_driver = …;
module_spmi_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;