From patchwork Mon Nov 15 20:08:40 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sander Vanheule X-Patchwork-Id: 1555506 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=JRalxWvb; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=svanheule.net header.i=@svanheule.net header.a=rsa-sha256 header.s=mail1707 header.b=tLDqVjTK; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4HtL146FZ7z9sX3 for ; Tue, 16 Nov 2021 07:11:04 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=AnhPZPpDeVaG4S7+Lfd273FZvMFM9G5KdjjBbIeKoPI=; b=JRalxWvbvl6KQY zavlB+oIAV4DtthjtpDjbFg6I9RyPoyA4QFsUcg6dgyc4FYT7EgYgTOWMwxZzwqKFsofKzJcHhAOT xWxd0biMwsLHYvSLUj1cA+2JvHdtWkUVutFU5F02MbZCKflUyUtL/7foItp6K32FdTZH89PbI0s1y uHrjWfdx6J7BP9QFu/ROKi1j3tszdD4/6Npix4rp9JSCXY+OFZGk8ZycgVkzxouckag3Vy5dfWlBj 7y7gkoKrbf1ohYHPA0ZTesEC9MQ9FHlPpdxlMxAvXmieCockXDzUWBwRWXJPl8RX1WQlXRhLyglRQ RvfRcLlJWd3wlKtp+Bnw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mmiI1-00GzG2-9m; Mon, 15 Nov 2021 20:09:17 +0000 Received: from polaris.svanheule.net ([2a00:c98:2060:a004:1::200]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mmiHl-00GzBl-HA for openwrt-devel@lists.openwrt.org; Mon, 15 Nov 2021 20:09:02 +0000 Received: from terra.local.svanheule.net (unknown [IPv6:2a02:a03f:eafe:c901:84cc:cf4f:3110:bf98]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: sander@svanheule.net) by polaris.svanheule.net (Postfix) with ESMTPSA id 4A128272045; Mon, 15 Nov 2021 21:08:57 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=svanheule.net; s=mail1707; t=1637006937; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=cgLYDotX6khSQEtadLfv+vDF7KoVpGPL2Ah0F2BIyNA=; b=tLDqVjTKEx/7B6Lxwub93/CL7NOz0KNcSJt4YDFUJsjrxGZAelaVIOCfcIBQdQIvPPiOuz VJHBe4AheDmnE6pUOJEcdO3JfBI98RQNxcpJAkXAL2EsVNEFObS7/oJypGDwjurjJwnX4V RIXYUTpYUzKKWaJyydXYyBBVqa7yaDtEhyijC0NYxJgsAqs151/Zn/2mq25w1oWcEBibGu zMMyde8MkhhcqKl2inOEryVD8GlyX9fd3IdaEV3kSKTE+u0ngNyejXmAVafGvLkKgdSXAU dr9i0+mGHOz3iBZ7vhurCyP4ERs3sjt/Hjmg2nnufp7N0d+HYrllbwpyal9KHw== From: Sander Vanheule To: openwrt-devel@lists.openwrt.org Cc: Sander Vanheule , INAGAKI Hiroshi Subject: [PATCH 1/3] realtek: Fix RTL8231 gpio count Date: Mon, 15 Nov 2021 21:08:40 +0100 Message-Id: <38afbcf5390d2a4e78595d06242558751aadfd0a.1637006759.git.sander@svanheule.net> X-Mailer: git-send-email 2.33.1 In-Reply-To: References: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211115_120901_757252_187DE2D6 X-CRM114-Status: GOOD ( 10.39 ) X-Spam-Score: -2.5 (--) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: The RTL8231's gpio_chip.ngpio was set to 36, which is the largest valid GPIO index. Fix the allowed number of GPIOs by setting ngpio to 37, the actual line count. Reported-by: INAGAKI Hiroshi Signed-off-by: Sander Vanheule --- target/linux/realtek/files-5.10/drivers/gpio/gpio-rtl8231.c | 2 +- 1 file changed, 1 i [...] Content analysis details: (-2.5 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [2a00:c98:2060:a004:1:0:0:200 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org The RTL8231's gpio_chip.ngpio was set to 36, which is the largest valid GPIO index. Fix the allowed number of GPIOs by setting ngpio to 37, the actual line count. Reported-by: INAGAKI Hiroshi Signed-off-by: Sander Vanheule --- target/linux/realtek/files-5.10/drivers/gpio/gpio-rtl8231.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/realtek/files-5.10/drivers/gpio/gpio-rtl8231.c b/target/linux/realtek/files-5.10/drivers/gpio/gpio-rtl8231.c index f4f5621e0c1b..f06c2d81df79 100644 --- a/target/linux/realtek/files-5.10/drivers/gpio/gpio-rtl8231.c +++ b/target/linux/realtek/files-5.10/drivers/gpio/gpio-rtl8231.c @@ -312,7 +312,7 @@ static int rtl8231_gpio_probe(struct platform_device *pdev) gpios->dev = dev; gpios->gc.base = 160; - gpios->gc.ngpio = 36; + gpios->gc.ngpio = 37; gpios->gc.label = "rtl8231"; gpios->gc.parent = dev; gpios->gc.owner = THIS_MODULE;