#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/regmap.h>
#include <linux/mfd/lp87565.h>
#define LP87565_REGULATOR(_name, _id, _of, _ops, _n, _vr, _vm, _er, _em, \
.supply_name = _of "-in", \
.of_match = of_match_ptr(_of), \
.regulators_node = of_match_ptr("regulators"),\
.type = REGULATOR_VOLTAGE, \
.n_linear_ranges = ARRAY_SIZE(_lr), \
struct lp87565_regulator {
struct regulator_desc desc;
static const struct lp87565_regulator regulators[];
static const struct regulator_linear_range buck0_1_2_3_ranges[] = {
REGULATOR_LINEAR_RANGE(600000, 0xA, 0x17, 10000),
REGULATOR_LINEAR_RANGE(735000, 0x18, 0x9d, 5000),
REGULATOR_LINEAR_RANGE(1420000, 0x9e, 0xff, 20000),
static const unsigned int lp87565_buck_ramp_delay[] = {
30000, 15000, 10000, 7500, 3800, 1900, 940, 470
static const unsigned int lp87565_buck_uA[] = {
1500000, 2000000, 2500000, 3000000, 3500000, 4000000, 4500000, 5000000,
static int lp87565_buck_set_ramp_delay(struct regulator_dev *rdev,