#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/device.h>
#include <linux/platform_device.h>
#include <linux/mfd/pcf50633/core.h>
#include <linux/mfd/pcf50633/pmic.h>
#define PCF50633_REGULATOR(_name, _id, _min_uV, _uV_step, _min_sel, _n) \
.id = PCF50633_REGULATOR_##_id, \
.ops = &pcf50633_regulator_ops, \
.linear_min_sel = _min_sel, \
.type = REGULATOR_VOLTAGE, \
.vsel_reg = PCF50633_REG_##_id##OUT, \
.enable_reg = PCF50633_REG_##_id##OUT + 1, \
.enable_mask = PCF50633_REGULATOR_ON, \
static const struct regulator_ops pcf50633_regulator_ops = {
.set_voltage_sel = regulator_set_voltage_sel_regmap,
.get_voltage_sel = regulator_get_voltage_sel_regmap,
.list_voltage = regulator_list_voltage_linear,
.map_voltage = regulator_map_voltage_linear,
.enable = regulator_enable_regmap,
.disable = regulator_disable_regmap,
.is_enabled = regulator_is_enabled_regmap,
static const struct regulator_desc regulators[] = {
[PCF50633_REGULATOR_AUTO] =
PCF50633_REGULATOR("auto", AUTO, 1800000, 25000, 0x2f, 128),
[PCF50633_REGULATOR_DOWN1] =
PCF50633_REGULATOR("down1", DOWN1, 625000, 25000, 0, 96),
[PCF50633_REGULATOR_DOWN2] =
PCF50633_REGULATOR("down2", DOWN2, 625000, 25000, 0, 96),
[PCF50633_REGULATOR_LDO1] =
PCF50633_REGULATOR("ldo1", LDO1, 900000, 100000, 0, 28),
[PCF50633_REGULATOR_LDO2] =