12 #ifndef __LINUX_REGULATOR_MC13XXX_H
13 #define __LINUX_REGULATOR_MC13XXX_H
36 int min_uV,
int max_uV,
unsigned *
selector);
44 static inline int mc13xxx_get_num_regulators_dt(
struct platform_device *pdev)
60 #define MC13xxx_DEFINE(prefix, _name, _reg, _vsel_reg, _voltages, _ops) \
61 [prefix ## _name] = { \
64 .n_voltages = ARRAY_SIZE(_voltages), \
65 .volt_table = _voltages, \
67 .type = REGULATOR_VOLTAGE, \
68 .id = prefix ## _name, \
69 .owner = THIS_MODULE, \
71 .reg = prefix ## _reg, \
72 .enable_bit = prefix ## _reg ## _ ## _name ## EN, \
73 .vsel_reg = prefix ## _vsel_reg, \
74 .vsel_shift = prefix ## _vsel_reg ## _ ## _name ## VSEL,\
75 .vsel_mask = prefix ## _vsel_reg ## _ ## _name ## VSEL_M,\
78 #define MC13xxx_FIXED_DEFINE(prefix, _name, _reg, _voltages, _ops) \
79 [prefix ## _name] = { \
82 .n_voltages = ARRAY_SIZE(_voltages), \
83 .volt_table = _voltages, \
85 .type = REGULATOR_VOLTAGE, \
86 .id = prefix ## _name, \
87 .owner = THIS_MODULE, \
89 .reg = prefix ## _reg, \
90 .enable_bit = prefix ## _reg ## _ ## _name ## EN, \
93 #define MC13xxx_GPO_DEFINE(prefix, _name, _reg, _voltages, _ops) \
94 [prefix ## _name] = { \
97 .n_voltages = ARRAY_SIZE(_voltages), \
98 .volt_table = _voltages, \
100 .type = REGULATOR_VOLTAGE, \
101 .id = prefix ## _name, \
102 .owner = THIS_MODULE, \
104 .reg = prefix ## _reg, \
105 .enable_bit = prefix ## _reg ## _ ## _name ## EN, \
108 #define MC13xxx_DEFINE_SW(_name, _reg, _vsel_reg, _voltages, ops) \
109 MC13xxx_DEFINE(SW, _name, _reg, _vsel_reg, _voltages, ops)
110 #define MC13xxx_DEFINE_REGU(_name, _reg, _vsel_reg, _voltages, ops) \
111 MC13xxx_DEFINE(REGU, _name, _reg, _vsel_reg, _voltages, ops)