From patchwork Sun Dec 2 19:35:41 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 10708155 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 251BB17F0 for ; Sun, 2 Dec 2018 19:36:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 183A82A7CE for ; Sun, 2 Dec 2018 19:36:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0C9682A7D2; Sun, 2 Dec 2018 19:36:15 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8AAC92A7CF for ; Sun, 2 Dec 2018 19:36:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725616AbeLBTgR (ORCPT ); Sun, 2 Dec 2018 14:36:17 -0500 Received: from mail-wm1-f65.google.com ([209.85.128.65]:38442 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725710AbeLBTgR (ORCPT ); Sun, 2 Dec 2018 14:36:17 -0500 Received: by mail-wm1-f65.google.com with SMTP id m22so3602007wml.3; Sun, 02 Dec 2018 11:36:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=xpLYWqmx4409zjx2ReXtjy50IutL5ZCJHV1XCVq+R0M=; b=ZPKtjWeIDymI4W5A5ApX6FnAuQ4FjpS0697GS9ZK7D2+78s/lAit6llqeg9XkvjwGj 14aIMN75595Ts+xvMFdsfgH/Nyx/zfRSasytKj5cI3r82RBboYqrudCeqDGADC++szTQ rwdmmsGOeix1iYpSlVif+BkKyppq0nVHR2kmh9aAciMf46baR/XN7hekUchQU8khLXQ9 Wg/k83J6u1U8YtPi2i3wPT4pi3TTAxJ8xbaaQPc97fg682ffdDEtzNO3gLr6PpKhFqn6 z/lUPrmFJsyHNTa9a/LCfFDtelP1z6NZSdCdqsWYv4D4GHrtNUXEELaPgPwX2e4vx2mr kfHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=xpLYWqmx4409zjx2ReXtjy50IutL5ZCJHV1XCVq+R0M=; b=oaD7+EZuMZUIh5D1zHj7iujDiKcJ8sfHxMKsPgRsmzEGtLNxuwFFtgG4K7tBCuSelJ N3cbeqOx26KPQodlH0cL2JK66FbewDkDz3KTeNBAwwlTcfkVvGsoQFM99tl+GCgq8k6K iW3yRkOy9y+N5uU7lldqmCZ7aCx6BCmk9AgsHSUNvZQfcoJ1ZE5hVFpBbmvjtyANnXew 1qmACDVi7TIax2/1lIxwQV4yyYQaHG1liNxAjXhNWt9Yd+QMJ4ogG/m2VjOSeJNixPpn K2BVnps8x8MyRxOJAGJJBalHqa/spk4eMis5oyivH8zQV4ijkt/FIewBNIRQIMbolS32 O4fw== X-Gm-Message-State: AA+aEWbPePDNDg5btSyNr2PX9dlEs/slOVlLhJdNQ9gO/siqACVEMVDx dC1SWYFL5AM+YHcb5z5dvB66pLvP X-Google-Smtp-Source: AFSGD/VJNMEC2W0wglF1qW02LGmJJhhOZj5OEquVliV2yxljX5Y76Wbtd4nUdgy96Fxux1oA1H5ILA== X-Received: by 2002:a1c:35ca:: with SMTP id c193mr5646712wma.146.1543779371991; Sun, 02 Dec 2018 11:36:11 -0800 (PST) Received: from kurokawa.lan (ip-86-49-110-70.net.upcbroadband.cz. [86.49.110.70]) by smtp.gmail.com with ESMTPSA id y185sm4016628wmg.34.2018.12.02.11.36.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 02 Dec 2018 11:36:11 -0800 (PST) From: Marek Vasut X-Google-Original-From: Marek Vasut To: linux-gpio@vger.kernel.org Cc: linux-renesas-soc@vger.kernel.org, Marek Vasut , Linus Walleij , Bartosz Golaszewski Subject: [PATCH 02/14] gpio: pca953x: Fix AI overflow on PCAL6524 Date: Sun, 2 Dec 2018 20:35:41 +0100 Message-Id: <20181202193553.29704-2-marek.vasut+renesas@gmail.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20181202193553.29704-1-marek.vasut+renesas@gmail.com> References: <20181202193553.29704-1-marek.vasut+renesas@gmail.com> Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The PCAL_PINCTRL_MASK is too large. The extended register block on PCAL6524, which is the largest chip with this block, has the block limited to address range 0x40..0x7f. This is because the bit 7 in the command register is used for the Address Increment functionality. Trim the mask to 0x60 to match the datasheet and to prevent accidental overwrite of the AI bit. Signed-off-by: Marek Vasut Cc: Linus Walleij Cc: Bartosz Golaszewski Reviewed-by: Bartosz Golaszewski --- drivers/gpio/gpio-pca953x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpio/gpio-pca953x.c b/drivers/gpio/gpio-pca953x.c index 31e3b1b52330..4e9c79ca69c5 100644 --- a/drivers/gpio/gpio-pca953x.c +++ b/drivers/gpio/gpio-pca953x.c @@ -58,7 +58,7 @@ #define PCA_GPIO_MASK 0x00FF #define PCAL_GPIO_MASK 0x1f -#define PCAL_PINCTRL_MASK 0xe0 +#define PCAL_PINCTRL_MASK 0x60 #define PCA_INT 0x0100 #define PCA_PCAL 0x0200