|
@@ -281,6 +281,13 @@ static int wm8994_suspend(struct device *dev)
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
+ /* Disable LDO pulldowns while the device is suspended if we
|
|
|
+ * don't know that something will be driving them. */
|
|
|
+ if (!wm8994->ldo_ena_always_driven)
|
|
|
+ wm8994_set_bits(wm8994, WM8994_PULL_CONTROL_2,
|
|
|
+ WM8994_LDO1ENA_PD | WM8994_LDO2ENA_PD,
|
|
|
+ WM8994_LDO1ENA_PD | WM8994_LDO2ENA_PD);
|
|
|
+
|
|
|
/* GPIO configuration state is saved here since we may be configuring
|
|
|
* the GPIO alternate functions even if we're not using the gpiolib
|
|
|
* driver for them.
|
|
@@ -350,6 +357,11 @@ static int wm8994_resume(struct device *dev)
|
|
|
if (ret < 0)
|
|
|
dev_err(dev, "Failed to restore GPIO registers: %d\n", ret);
|
|
|
|
|
|
+ /* Disable LDO pulldowns while the device is active */
|
|
|
+ wm8994_set_bits(wm8994, WM8994_PULL_CONTROL_2,
|
|
|
+ WM8994_LDO1ENA_PD | WM8994_LDO2ENA_PD,
|
|
|
+ 0);
|
|
|
+
|
|
|
wm8994->suspended = false;
|
|
|
|
|
|
return 0;
|
|
@@ -513,8 +525,15 @@ static int wm8994_device_init(struct wm8994 *wm8994, int irq)
|
|
|
pdata->gpio_defaults[i]);
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ wm8994->ldo_ena_always_driven = pdata->ldo_ena_always_driven;
|
|
|
}
|
|
|
|
|
|
+ /* Disable LDO pulldowns while the device is active */
|
|
|
+ wm8994_set_bits(wm8994, WM8994_PULL_CONTROL_2,
|
|
|
+ WM8994_LDO1ENA_PD | WM8994_LDO2ENA_PD,
|
|
|
+ 0);
|
|
|
+
|
|
|
/* In some system designs where the regulators are not in use,
|
|
|
* we can achieve a small reduction in leakage currents by
|
|
|
* floating LDO outputs. This bit makes no difference if the
|