Received: by 2002:a17:90a:88:0:0:0:0 with SMTP id a8csp4614673pja; Thu, 21 Nov 2019 22:53:13 -0800 (PST) X-Google-Smtp-Source: APXvYqwkRYvWne0eNsSHPMLla3gbTu+USYB6r/fhWr4YXxQcR0AVVv1ZvRQSEVbGuBXOfsq9DrmM X-Received: by 2002:a05:6000:1286:: with SMTP id f6mr12681629wrx.44.1574405593148; Thu, 21 Nov 2019 22:53:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574405593; cv=none; d=google.com; s=arc-20160816; b=wO6OCzTZO7DdmUur6yf9JVK8qFILB3Vf61Cx9r6prw/5rIkNUiC6uI1Yq6jPAQoU+I cf8DllTtyq40IVbhuZz6Eh/zOOcyTHvYmthX1O4zmLH5cUC2TxhEuTXdoeYwk6nGq0tz 1Xrnypu7l/qoRMqADNWBjqebgvCAn+LVM1K1GtEqxDju/Jw2CRD2zBPWIzAybYfkg/g5 Cu4pIZihUjQA3eOZxo54YKBWP5b7WKvO/gny82JuZlTeMlEPbSWEjfyhTiwQVRM4BYIX NXTXk1aJGftjhX/B9X8Fvw9HVLd7d3JMwXLVr8FV5iyx/RGKSW8vZM6JwnAGsIvjH2FJ dGzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=j8SfDY/Q2dNJpQeFi7+YAAGIyn3z/xxVtzUAwgv5jxU=; b=z8W0YvGwAeueTpDC7f2OJHytltUb2LAI303yV+Ou6R3gaSTVqnawuL/2b4gh8wchyz QMWMk1+d4Avnqb4IWowE9D1NhIB6T5a7eYhvvBYcwC9dC6ymAzU54ppHY115ijMyxBhh W/5IOBYwZ2YulZHR10G0pySVEXuxG/S9qU88qEabFfUCaJFRken1b0FkS3bzWcRQCf7W Jm9yE/IgzLLhECChp/d8JhY+6wB9768Dakx3UazT0icDF4z2aH84TlBKBBsc7FaFtWgC kk1EN2qZty3RvVCRJpCGE9OUtLy5bEJq9csDQ8WyXfUL2HQWT5FlgBS7sk9g5cebJFLt qeKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=iZQm0y34; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o24si4153253edc.342.2019.11.21.22.52.49; Thu, 21 Nov 2019 22:53:13 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=iZQm0y34; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727031AbfKVG15 (ORCPT + 99 others); Fri, 22 Nov 2019 01:27:57 -0500 Received: from mail.kernel.org ([198.145.29.99]:54862 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727535AbfKVFuU (ORCPT ); Fri, 22 Nov 2019 00:50:20 -0500 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id EA90520717; Fri, 22 Nov 2019 05:50:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574401819; bh=niKuEWpHYMiGBDyVgEHosl+UrqPkEyiUFP+M5ijO2mg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iZQm0y34LmLtXoAsjl8BJ7RnQjmM0IzdqqJBqz3f/OHtT1pqzdK3886GgPtUiLNhS tTOBOePtR+Lr0pZSpcqQJz8+Jw129rTS+pJmFyw4reYvLKE2GwCeZRZDP5+IEnA5Vy +wbPOFheGhtoX63L0rgugRCgDfGw6yQ2gNtp9nPc= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Marek Vasut , Marek Vasut , Bartosz Golaszewski , Linus Walleij , Sasha Levin , linux-gpio@vger.kernel.org Subject: [PATCH AUTOSEL 4.19 063/219] gpio: pca953x: Fix AI overflow on PCAL6524 Date: Fri, 22 Nov 2019 00:46:35 -0500 Message-Id: <20191122054911.1750-56-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191122054911.1750-1-sashal@kernel.org> References: <20191122054911.1750-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Marek Vasut [ Upstream commit 92f45ebe68181c2d7f76633ffae55bc9447d62cd ] 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 Reviewed-by: Bartosz Golaszewski Signed-off-by: Linus Walleij Signed-off-by: Sasha Levin --- 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 e0657fc72d31f..0232c25a15864 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 -- 2.20.1