Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* ASoC: regmap_config.max_register value wrong?
@ 2015-05-25 20:46 Sergej Sawazki
  2015-05-26  6:42 ` Lars-Peter Clausen
  0 siblings, 1 reply; 4+ messages in thread
From: Sergej Sawazki @ 2015-05-25 20:46 UTC (permalink / raw)
  To: Mark Brown, Charles Keepax, Lars-Peter Clausen, dan.carpenter; +Cc: alsa-devel

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-05-27 17:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-25 20:46 ASoC: regmap_config.max_register value wrong? Sergej Sawazki
2015-05-26  6:42 ` Lars-Peter Clausen
2015-05-26  8:14   ` Charles Keepax
2015-05-27 17:05     ` Sergej Sawazki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox