mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Damien Horsley <Damien.Horsley@imgtec.com>
Cc: alsa-devel@alsa-project.org, Rob Herring <robh+dt@kernel.org>,
	Pawel Moll <pawel.moll@arm.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Ian Campbell <ijc+devicetree@hellion.org.uk>,
	Kumar Gala <galak@codeaurora.org>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	James Hartley <james.hartley@imgtec.com>
Subject: Re: [PATCH V2 2/2] ASoC: img: Add driver for Pistachio internal DAC
Date: Tue, 8 Dec 2015 19:00:05 +0000	[thread overview]
Message-ID: <20151208190005.GY5727@sirena.org.uk> (raw)
In-Reply-To: <1449594324-2597-3-git-send-email-Damien.Horsley@imgtec.com>

[-- Attachment #1: Type: text/plain, Size: 743 bytes --]

On Tue, Dec 08, 2015 at 05:05:24PM +0000, Damien Horsley wrote:

> +static int pistachio_internal_dac_set_mute(struct snd_kcontrol *kcontrol,
> +				  struct snd_ctl_elem_value *ucontrol)
> +{
> +	struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
> +	struct pistachio_internal_dac *dac = snd_soc_codec_get_drvdata(codec);
> +	u32 reg;
> +
> +	dac->mute = ucontrol->value.integer.value[0];
> +
> +	if (dac->mute)
> +		reg = PISTACHIO_INTERNAL_DAC_CTRL_MUTE_MASK;
> +	else
> +		reg = 0;
> +
> +	regmap_update_bits(dac->regmap, PISTACHIO_INTERNAL_DAC_CTRL,
> +			PISTACHIO_INTERNAL_DAC_CTRL_MUTE_MASK, reg);
> +
> +	return 0;
> +}

Shouldn't this just be a standard SOC_SINGLE() now?  We've got a regmap.
Otherwise this looks good.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

           reply	other threads:[~2015-12-08 19:00 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <1449594324-2597-3-git-send-email-Damien.Horsley@imgtec.com>]

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=20151208190005.GY5727@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=Damien.Horsley@imgtec.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=devicetree@vger.kernel.org \
    --cc=galak@codeaurora.org \
    --cc=ijc+devicetree@hellion.org.uk \
    --cc=james.hartley@imgtec.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=pawel.moll@arm.com \
    --cc=perex@perex.cz \
    --cc=robh+dt@kernel.org \
    --cc=tiwai@suse.com \
    /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

all inboxes | Powered by JetHome®