[alsa-devel] [PATCH 1/3 v3] mfd: arizona: Export function to control subsystem DVFS
Lee Jones
lee.jones at linaro.org
Fri Jun 27 10:31:55 CEST 2014
On Mon, 23 Jun 2014, Charles Keepax wrote:
> From: Richard Fitzgerald <rf at opensource.wolfsonmicro.com>
>
> Moving this control from being a side-effect of the LDO1
> regulator driver to a specific exported function.
>
> Signed-off-by: Richard Fitzgerald <rf at opensource.wolfsonmicro.com>
> Signed-off-by: Charles Keepax <ckeepax at opensource.wolfsonmicro.com>
> ---
> drivers/mfd/arizona-core.c | 87 ++++++++++++++++++++++++++++++++++++++
> include/linux/mfd/arizona/core.h | 12 +++++
> 2 files changed, 99 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/mfd/arizona-core.c b/drivers/mfd/arizona-core.c
> index cfc191a..80f79ec 100644
> --- a/drivers/mfd/arizona-core.c
> +++ b/drivers/mfd/arizona-core.c
> @@ -94,6 +94,92 @@ int arizona_clk32k_disable(struct arizona *arizona)
> }
> EXPORT_SYMBOL_GPL(arizona_clk32k_disable);
>
> +int arizona_dvfs_up(struct arizona *arizona, unsigned int flags)
> +{
> + unsigned int new_flags;
> + int ret = 0;
> +
> + mutex_lock(&arizona->subsys_max_lock);
> +
> + new_flags = arizona->subsys_max_rq | flags;
> +
> + if (arizona->subsys_max_rq != new_flags) {
> + switch (arizona->type) {
> + case WM5102:
> + case WM8997:
> + ret = regulator_set_voltage(arizona->dcvdd,
> + 1800000, 1800000);
> + if (ret != 0) {
> + dev_err(arizona->dev,
> + "Failed to raise dcvdd (%d)\n", ret);
Are you sure this message is accurate. What if the voltage were
already v1.8? Then you wouldn't technically be trying to raise it.
[...]
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
More information about the Alsa-devel
mailing list