From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sergej Sawazki Subject: ASoC: regmap_config.max_register value wrong? Date: Mon, 25 May 2015 22:46:25 +0200 Message-ID: <55638A21.50208@gmx.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: Received: from mout.gmx.net (mout.gmx.net [212.227.17.21]) by alsa0.perex.cz (Postfix) with ESMTP id 3B2462625EE for ; Mon, 25 May 2015 22:46:30 +0200 (CEST) List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org To: Mark Brown , Charles Keepax , Lars-Peter Clausen , dan.carpenter@oracle.com Cc: alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org 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