Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp1484178pxu; Fri, 16 Oct 2020 13:13:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw0JpTAJRbGxZg8G4WThWDZq7nOzNEQq0u3zubW4sng4C9x1LQsXng+Yiv0jCVuMCs/hToe X-Received: by 2002:a17:906:b80c:: with SMTP id dv12mr5454180ejb.220.1602879218039; Fri, 16 Oct 2020 13:13:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602879218; cv=none; d=google.com; s=arc-20160816; b=bgZFKQ4kPZsYwfc4O2K8ftfDiw46u1Xg5yTtzocXD0KpjQyGPyFVLOyLUGb1Hu26S4 gSG2jVlgbtJw7MHWBIPQTQMIxuSIwKaT+8XiCRDYG0SWjWA7KoKEd77KLxH9BTHHKufL 7BDgbE2lcmg92aC+HTfO6bR2XMgT7UzwuUE93zXPJi8U9AwhOyn/x2bMItL9EWjttK1D 94TYkCKAdrwjd36eXsQElPa7vIAsRTdgQwqT6dWfsRE32pHed7WV7jk0KBwjtSwFZ3rA WB95Wj3wWJF8zUP8bu4rebCUJVnVqHow3t9ztEjFATL1Ua9eIHaq4nozNfWrapcpBfAx K+qQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=di+n0UWMmhYQ1EkhV3MafIP4eU1fX02bVtJVBFfW51c=; b=uI167A3A5U64uuMio9sTurRoLw8EjD4jQAt+Fu9rMr5+xuYWQBdNTegCXJKZei9at9 aj2q4VWwuO4NzC48nHRhQqTwCx97rj7RAx4C78983MdyI+lrI3TRKrbMMMkh0ELACz07 e3xB6U14m6uRNx+a2KkgqERhiN0FYnWHJGHiJ+jdTWXt7Sfx12Ky2/Azz6P3NVVsi6uu zPMgGTfqKj3T9AfQIOz7K3Jnb19Lbz6v+CcbFUV0g0jrhzdbmI3b1qPysgWxVSRn+qmm Fm2vkNlJlSUE3UfZ5hCyOQMCQ9hmgLCDg/XWDkD96VT4e7imUVTJnfZ1CApxZ2uZWEpX 2dcw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@lechnology.com header.s=default header.b=gYIVmHiA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dt1si2351034ejc.566.2020.10.16.13.13.15; Fri, 16 Oct 2020 13:13:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@lechnology.com header.s=default header.b=gYIVmHiA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390892AbgJPT6u (ORCPT + 99 others); Fri, 16 Oct 2020 15:58:50 -0400 Received: from vern.gendns.com ([98.142.107.122]:46460 "EHLO vern.gendns.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390511AbgJPT6u (ORCPT ); Fri, 16 Oct 2020 15:58:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lechnology.com; s=default; h=Content-Transfer-Encoding:MIME-Version: Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=di+n0UWMmhYQ1EkhV3MafIP4eU1fX02bVtJVBFfW51c=; b=gYIVmHiA7/9W5L+MCg8VBUwgVC 2myvnQUWk9Bm0Wa4ivSHIGne+sSSw8ei7gFO5eWn5dnH+ejh/aBm5KEgty7QQau8QMbrIosHQdmt9 9JV3IgbYJa46nBcqLyLa5HWl2Vqqt8Au1DN6p6HBZ0JWY7bJAfVJvRaTwpEHbZX71aW/qMjWIQ5AQ GlNi40khjZQjzOCnAaejwgftHIOOauaVEhodLvMC8T5Vjwurl9a8edKagPfV3HmRIjjJjp0NMdGeb x6I9cLE7KgASNY/hP0VnWtIyKo446Qxuh2P8ikxkzy7qM/HN3c0SL/aM0kZDgdVGtuCBdicswKCvC ndoOfHkg==; Received: from [2600:1700:4830:165f::19e] (port=38858 helo=freyr.lechnology.com) by vern.gendns.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1kTVsF-0003iX-Oi; Fri, 16 Oct 2020 15:58:48 -0400 From: David Lechner To: linux-iio@vger.kernel.org Cc: David Lechner , William Breathitt Gray , linux-kernel@vger.kernel.org Subject: [PATCH] counter/ti-eqep: Fix regmap max_register Date: Fri, 16 Oct 2020 14:58:37 -0500 Message-Id: <20201016195838.536791-1-david@lechnology.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - vern.gendns.com X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - lechnology.com X-Get-Message-Sender-Via: vern.gendns.com: authenticated_id: davidmain+lechnology.com/only user confirmed/virtual account not confirmed X-Authenticated-Sender: vern.gendns.com: davidmain@lechnology.com X-Source: X-Source-Args: X-Source-Dir: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The values given were the offset of the register after the last register instead of the actual last register in each range. Fix by using the correct last register of each range. Signed-off-by: David Lechner --- drivers/counter/ti-eqep.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/counter/ti-eqep.c b/drivers/counter/ti-eqep.c index fe2c6bb22133..e60aec225541 100644 --- a/drivers/counter/ti-eqep.c +++ b/drivers/counter/ti-eqep.c @@ -798,7 +798,7 @@ static const struct regmap_config ti_eqep_regmap32_config = { .reg_bits = 32, .val_bits = 32, .reg_stride = 4, - .max_register = 0x24, + .max_register = QUPRD, }; static const struct regmap_config ti_eqep_regmap16_config = { @@ -806,7 +806,7 @@ static const struct regmap_config ti_eqep_regmap16_config = { .reg_bits = 16, .val_bits = 16, .reg_stride = 2, - .max_register = 0x1e, + .max_register = QCPRDLAT, }; static int ti_eqep_probe(struct platform_device *pdev) -- 2.25.1