diff options
-rw-r--r-- | drivers/mfd/wm8994-core.c | 11 | ||||
-rw-r--r-- | include/linux/mfd/wm8994/pdata.h | 6 |
2 files changed, 14 insertions, 3 deletions
diff --git a/drivers/mfd/wm8994-core.c b/drivers/mfd/wm8994-core.c index ff373dcda2c7..776298b313ab 100644 --- a/drivers/mfd/wm8994-core.c +++ b/drivers/mfd/wm8994-core.c | |||
@@ -374,6 +374,7 @@ static int wm8994_device_init(struct wm8994 *wm8994, int irq) | |||
374 | struct wm8994_pdata *pdata = wm8994->dev->platform_data; | 374 | struct wm8994_pdata *pdata = wm8994->dev->platform_data; |
375 | const char *devname; | 375 | const char *devname; |
376 | int ret, i; | 376 | int ret, i; |
377 | int pulls = 0; | ||
377 | 378 | ||
378 | dev_set_drvdata(wm8994->dev, wm8994); | 379 | dev_set_drvdata(wm8994->dev, wm8994); |
379 | 380 | ||
@@ -516,12 +517,16 @@ static int wm8994_device_init(struct wm8994 *wm8994, int irq) | |||
516 | } | 517 | } |
517 | 518 | ||
518 | wm8994->ldo_ena_always_driven = pdata->ldo_ena_always_driven; | 519 | wm8994->ldo_ena_always_driven = pdata->ldo_ena_always_driven; |
520 | |||
521 | if (pdata->spkmode_pu) | ||
522 | pulls |= WM8994_SPKMODE_PU; | ||
519 | } | 523 | } |
520 | 524 | ||
521 | /* Disable LDO pulldowns while the device is active */ | 525 | /* Disable unneeded pulls */ |
522 | wm8994_set_bits(wm8994, WM8994_PULL_CONTROL_2, | 526 | wm8994_set_bits(wm8994, WM8994_PULL_CONTROL_2, |
523 | WM8994_LDO1ENA_PD | WM8994_LDO2ENA_PD, | 527 | WM8994_LDO1ENA_PD | WM8994_LDO2ENA_PD | |
524 | 0); | 528 | WM8994_SPKMODE_PU | WM8994_CSNADDR_PD, |
529 | pulls); | ||
525 | 530 | ||
526 | /* In some system designs where the regulators are not in use, | 531 | /* In some system designs where the regulators are not in use, |
527 | * we can achieve a small reduction in leakage currents by | 532 | * we can achieve a small reduction in leakage currents by |
diff --git a/include/linux/mfd/wm8994/pdata.h b/include/linux/mfd/wm8994/pdata.h index ea32f306dca6..54e2fef587d5 100644 --- a/include/linux/mfd/wm8994/pdata.h +++ b/include/linux/mfd/wm8994/pdata.h | |||
@@ -174,6 +174,12 @@ struct wm8994_pdata { | |||
174 | * consumption will rise. | 174 | * consumption will rise. |
175 | */ | 175 | */ |
176 | bool ldo_ena_always_driven; | 176 | bool ldo_ena_always_driven; |
177 | |||
178 | /* | ||
179 | * SPKMODE must be pulled internally by the device on this | ||
180 | * system. | ||
181 | */ | ||
182 | bool spkmode_pu; | ||
177 | }; | 183 | }; |
178 | 184 | ||
179 | #endif | 185 | #endif |