public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Ashish Chavan <ashish.chavan@kpitcummins.com>
Cc: lrg <lrg@ti.com>, alsa-devel <alsa-devel@alsa-project.org>,
	David Dajun Chen <david.chen@diasemi.com>,
	"kuninori.morimoto.gx" <kuninori.morimoto.gx@renesas.com>,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [alsa-devel] [PATCH] ASoC: da7210: Update for using I2C regmap
Date: Thu, 8 Mar 2012 18:22:13 +0000	[thread overview]
Message-ID: <20120308182212.GY3638@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <1331213696.17383.7.camel@matrix>

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

On Thu, Mar 08, 2012 at 07:04:56PM +0530, Ashish Chavan wrote:
> Current DA7210 driver has I2C support using older register cache
> methods. This patch updates it for latest regmap framework.

I've applied this but please fix the minor issues below incrementally.

> +static struct reg_default da7210_reg_defaults[] = {
> +	{ 0x00, 0x00 },

If any of these registers don't exist they should be removed from the
defaults table, looking at the register defines in the header the
registers between 0x2c and 0x83 should be removed along with register 0.

Similarly, registers that are volatile should not have defaults
specified.

> +	/* unlock */
> +	regmap_write(da7210->regmap, DA7210_A_HID_UNLOCK,	0x8B);
> +	regmap_write(da7210->regmap, DA7210_A_TEST_UNLOCK,	0xB4);
> +	regmap_write(da7210->regmap, DA7210_A_PLL1,		0x01);
> +	regmap_write(da7210->regmap, DA7210_A_CP_MODE,		0x7C);
> +	/* re-lock */
> +	regmap_write(da7210->regmap, DA7210_A_HID_UNLOCK,	0x00);
> +	regmap_write(da7210->regmap, DA7210_A_TEST_UNLOCK,	0x00);

This sequence should be changed to use a regmap patch.  This will fix an
issue you currently have with suspend and resume where the updates are
not reapplied if the device is powered off over suspend.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

           reply	other threads:[~2012-03-08 18:22 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <1331213696.17383.7.camel@matrix>]

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=20120308182212.GY3638@opensource.wolfsonmicro.com \
    --to=broonie@opensource.wolfsonmicro.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=ashish.chavan@kpitcummins.com \
    --cc=david.chen@diasemi.com \
    --cc=kuninori.morimoto.gx@renesas.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lrg@ti.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