Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Sergej Sawazki <ce3a@gmx.de>
To: Mark Brown <broonie@kernel.org>,
	Charles Keepax <ckeepax@opensource.wolfsonmicro.com>,
	Lars-Peter Clausen <lars@metafoo.de>,
	dan.carpenter@oracle.com
Cc: alsa-devel@alsa-project.org
Subject: ASoC: regmap_config.max_register value wrong?
Date: Mon, 25 May 2015 22:46:25 +0200	[thread overview]
Message-ID: <55638A21.50208@gmx.de> (raw)

Dear all,

The following snippet is from the wm8741 codec driver. Shouldn't the
.max_register field be set to WM8741_REGISTER_COUNT-1 (10) instead of
WM8741_MAX_REGISTER (0x20)?

[...]
static const struct regmap_config wm8741_regmap = {
	.reg_bits = 7,
	.val_bits = 9,
	.max_register = WM8741_MAX_REGISTER,
[...]

WM8741_MAX_REGISTER is the address of the last register.
WM8741_REGISTER_COUNT is the number of registers.

The regmap_config documentation says: "@max_register: Optional,
specifies the maximum valid register index."

So it should be the *register index* and not the register address.
Do I understand it correctly?

Many thanks in advance.
Best regards,
Sergej

             reply	other threads:[~2015-05-25 20:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-25 20:46 Sergej Sawazki [this message]
2015-05-26  6:42 ` ASoC: regmap_config.max_register value wrong? Lars-Peter Clausen
2015-05-26  8:14   ` Charles Keepax
2015-05-27 17:05     ` Sergej Sawazki

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=55638A21.50208@gmx.de \
    --to=ce3a@gmx.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=ckeepax@opensource.wolfsonmicro.com \
    --cc=dan.carpenter@oracle.com \
    --cc=lars@metafoo.de \
    /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