regulator: wm831x-dcdc: Specify supply names
Allows hookup via normal consumer mechanisms. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This commit is contained in:
parent
f1aba13fbd
commit
82caa9780a
|
@ -35,7 +35,7 @@
|
||||||
#define WM831X_DCDC_MODE_IDLE 2
|
#define WM831X_DCDC_MODE_IDLE 2
|
||||||
#define WM831X_DCDC_MODE_STANDBY 3
|
#define WM831X_DCDC_MODE_STANDBY 3
|
||||||
|
|
||||||
#define WM831X_DCDC_MAX_NAME 6
|
#define WM831X_DCDC_MAX_NAME 9
|
||||||
|
|
||||||
/* Register offsets in control block */
|
/* Register offsets in control block */
|
||||||
#define WM831X_DCDC_CONTROL_1 0
|
#define WM831X_DCDC_CONTROL_1 0
|
||||||
|
@ -50,6 +50,7 @@
|
||||||
|
|
||||||
struct wm831x_dcdc {
|
struct wm831x_dcdc {
|
||||||
char name[WM831X_DCDC_MAX_NAME];
|
char name[WM831X_DCDC_MAX_NAME];
|
||||||
|
char supply_name[WM831X_DCDC_MAX_NAME];
|
||||||
struct regulator_desc desc;
|
struct regulator_desc desc;
|
||||||
int base;
|
int base;
|
||||||
struct wm831x *wm831x;
|
struct wm831x *wm831x;
|
||||||
|
@ -534,6 +535,11 @@ static __devinit int wm831x_buckv_probe(struct platform_device *pdev)
|
||||||
|
|
||||||
snprintf(dcdc->name, sizeof(dcdc->name), "DCDC%d", id + 1);
|
snprintf(dcdc->name, sizeof(dcdc->name), "DCDC%d", id + 1);
|
||||||
dcdc->desc.name = dcdc->name;
|
dcdc->desc.name = dcdc->name;
|
||||||
|
|
||||||
|
snprintf(dcdc->supply_name, sizeof(dcdc->supply_name),
|
||||||
|
"DC%dVDD", id + 1);
|
||||||
|
dcdc->desc.supply_name = dcdc->supply_name;
|
||||||
|
|
||||||
dcdc->desc.id = id;
|
dcdc->desc.id = id;
|
||||||
dcdc->desc.type = REGULATOR_VOLTAGE;
|
dcdc->desc.type = REGULATOR_VOLTAGE;
|
||||||
dcdc->desc.n_voltages = WM831X_BUCKV_MAX_SELECTOR + 1;
|
dcdc->desc.n_voltages = WM831X_BUCKV_MAX_SELECTOR + 1;
|
||||||
|
@ -748,6 +754,11 @@ static __devinit int wm831x_buckp_probe(struct platform_device *pdev)
|
||||||
|
|
||||||
snprintf(dcdc->name, sizeof(dcdc->name), "DCDC%d", id + 1);
|
snprintf(dcdc->name, sizeof(dcdc->name), "DCDC%d", id + 1);
|
||||||
dcdc->desc.name = dcdc->name;
|
dcdc->desc.name = dcdc->name;
|
||||||
|
|
||||||
|
snprintf(dcdc->supply_name, sizeof(dcdc->supply_name),
|
||||||
|
"DC%dVDD", id + 1);
|
||||||
|
dcdc->desc.supply_name = dcdc->supply_name;
|
||||||
|
|
||||||
dcdc->desc.id = id;
|
dcdc->desc.id = id;
|
||||||
dcdc->desc.type = REGULATOR_VOLTAGE;
|
dcdc->desc.type = REGULATOR_VOLTAGE;
|
||||||
dcdc->desc.n_voltages = WM831X_BUCKP_MAX_SELECTOR + 1;
|
dcdc->desc.n_voltages = WM831X_BUCKP_MAX_SELECTOR + 1;
|
||||||
|
|
Loading…
Reference in New Issue