From: Lars-Peter Clausen <lars@metafoo.de>
To: Mark Brown <broonie@kernel.org>
Cc: alsa-devel@alsa-project.org, linaro-kernel@lists.linaro.org,
Liam Girdwood <lgirdwood@gmail.com>,
device-drivers-devel@blackfin.uclinux.org,
Mark Brown <broonie@linaro.org>
Subject: Re: [PATCH] ASoC: adau1701: Use gpio_set_value_cansleep()
Date: Mon, 12 Aug 2013 10:33:08 +0200 [thread overview]
Message-ID: <52089DC4.5070605@metafoo.de> (raw)
In-Reply-To: <1376230558-16248-1-git-send-email-broonie@kernel.org>
On 08/11/2013 04:15 PM, Mark Brown wrote:
> From: Mark Brown <broonie@linaro.org>
>
> The GPIO manipulation done by this driver is never in atomic context so
> we can use gpio_set_value_cansleep() and support GPIOs that can't be set
> from atomic context.
>
> Signed-off-by: Mark Brown <broonie@linaro.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Thanks.
> ---
> sound/soc/codecs/adau1701.c | 20 ++++++++++----------
> 1 file changed, 10 insertions(+), 10 deletions(-)
>
> diff --git a/sound/soc/codecs/adau1701.c b/sound/soc/codecs/adau1701.c
> index 2c10252..ebff112 100644
> --- a/sound/soc/codecs/adau1701.c
> +++ b/sound/soc/codecs/adau1701.c
> @@ -247,21 +247,21 @@ static int adau1701_reset(struct snd_soc_codec *codec, unsigned int clkdiv)
> gpio_is_valid(adau1701->gpio_pll_mode[1])) {
> switch (clkdiv) {
> case 64:
> - gpio_set_value(adau1701->gpio_pll_mode[0], 0);
> - gpio_set_value(adau1701->gpio_pll_mode[1], 0);
> + gpio_set_value_cansleep(adau1701->gpio_pll_mode[0], 0);
> + gpio_set_value_cansleep(adau1701->gpio_pll_mode[1], 0);
> break;
> case 256:
> - gpio_set_value(adau1701->gpio_pll_mode[0], 0);
> - gpio_set_value(adau1701->gpio_pll_mode[1], 1);
> + gpio_set_value_cansleep(adau1701->gpio_pll_mode[0], 0);
> + gpio_set_value_cansleep(adau1701->gpio_pll_mode[1], 1);
> break;
> case 384:
> - gpio_set_value(adau1701->gpio_pll_mode[0], 1);
> - gpio_set_value(adau1701->gpio_pll_mode[1], 0);
> + gpio_set_value_cansleep(adau1701->gpio_pll_mode[0], 1);
> + gpio_set_value_cansleep(adau1701->gpio_pll_mode[1], 0);
> break;
> case 0: /* fallback */
> case 512:
> - gpio_set_value(adau1701->gpio_pll_mode[0], 1);
> - gpio_set_value(adau1701->gpio_pll_mode[1], 1);
> + gpio_set_value_cansleep(adau1701->gpio_pll_mode[0], 1);
> + gpio_set_value_cansleep(adau1701->gpio_pll_mode[1], 1);
> break;
> }
> }
> @@ -269,10 +269,10 @@ static int adau1701_reset(struct snd_soc_codec *codec, unsigned int clkdiv)
> adau1701->pll_clkdiv = clkdiv;
>
> if (gpio_is_valid(adau1701->gpio_nreset)) {
> - gpio_set_value(adau1701->gpio_nreset, 0);
> + gpio_set_value_cansleep(adau1701->gpio_nreset, 0);
> /* minimum reset time is 20ns */
> udelay(1);
> - gpio_set_value(adau1701->gpio_nreset, 1);
> + gpio_set_value_cansleep(adau1701->gpio_nreset, 1);
> /* power-up time may be as long as 85ms */
> mdelay(85);
> }
>
prev parent reply other threads:[~2013-08-12 8:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-11 14:15 [PATCH] ASoC: adau1701: Use gpio_set_value_cansleep() Mark Brown
2013-08-12 8:33 ` Lars-Peter Clausen [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=52089DC4.5070605@metafoo.de \
--to=lars@metafoo.de \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=broonie@linaro.org \
--cc=device-drivers-devel@blackfin.uclinux.org \
--cc=lgirdwood@gmail.com \
--cc=linaro-kernel@lists.linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox