All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jarkko Nikula <jarkko.nikula@linux.intel.com>
To: Axel Lin <axel.lin@ingics.com>, Mark Brown <broonie@kernel.org>
Cc: "Fang, Yang A" <yang.a.fang@intel.com>,
	alsa-devel@alsa-project.org,
	Jerry Wong <jerry.wong@maximintegrated.com>,
	Liam Girdwood <lgirdwood@gmail.com>
Subject: Re: [PATCH] ASoC: max98090: Simplify max98090_readable_register implementation
Date: Mon, 27 Jul 2015 13:08:31 +0300	[thread overview]
Message-ID: <55B6031F.6080305@linux.intel.com> (raw)
In-Reply-To: <1437961183.10891.1.camel@ingics.com>

On 07/27/2015 04:39 AM, Axel Lin wrote:
> The readable registers are in consecutive ranges:
> 	0x01 ~ 0x03, 0x0D ~ 0xD1, 0xFF
> So simplify the implementation by specifying a range of consecutive values
> in a single case label.
>
> Signed-off-by: Axel Lin <axel.lin@ingics.com>
> ---
>   sound/soc/codecs/max98090.c | 71 ++-------------------------------------------
>   1 file changed, 2 insertions(+), 69 deletions(-)
>
Reviewed-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Tested-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>

One minor comment below.

> -	case M98090_REG_DMIC34_BIQUAD_BASE ... M98090_REG_DMIC34_BIQUAD_BASE + 0x0E:
> +	case M98090_REG_DEVICE_STATUS ... M98090_REG_INTERRUPT_S:
> +	case M98090_REG_LINE_INPUT_CONFIG ... 0xD1:
>   	case M98090_REG_REVISION_ID:
>   		return true;

I'd have preserved that magic M98090_REG_DMIC34_BIQUAD_BASE + 0x0E here. 
Last register before 0xff is 0xbd in the specification, 
M98090_REG_DMIC34_BIQUAD_BASE is 0xc3 in the max98090.h so it seems to 
me that 0xc3 ~ 0xd1 are undocumented registers.

-- 
Jarkko

  reply	other threads:[~2015-07-27 10:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-27  1:39 [PATCH] ASoC: max98090: Simplify max98090_readable_register implementation Axel Lin
2015-07-27 10:08 ` Jarkko Nikula [this message]
2015-07-27 10:39   ` Axel Lin
2015-07-29 14:13 ` Applied "ASoC: max98090: Simplify max98090_readable_register implementation" to the asoc tree Mark Brown

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=55B6031F.6080305@linux.intel.com \
    --to=jarkko.nikula@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=axel.lin@ingics.com \
    --cc=broonie@kernel.org \
    --cc=jerry.wong@maximintegrated.com \
    --cc=lgirdwood@gmail.com \
    --cc=yang.a.fang@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.