[openwrt/openwrt] generic: backport pending gpio-regmap ops patch

LEDE Commits lede-commits at lists.infradead.org
Wed Jan 22 11:54:44 PST 2025


noltari pushed a commit to openwrt/openwrt.git, branch openwrt-24.10:
https://git.openwrt.org/58d0057481d4f0fbd2c9bc9707fca3cab50a4050

commit 58d0057481d4f0fbd2c9bc9707fca3cab50a4050
Author: Álvaro Fernández Rojas <noltari at gmail.com>
AuthorDate: Wed Jan 22 20:42:49 2025 +0100

    generic: backport pending gpio-regmap ops patch
    
    This patch has been accepted for linux v6.14 so we can move it from pending
    to backport.
    
    Signed-off-by: Álvaro Fernández Rojas <noltari at gmail.com>
    (cherry picked from commit 2f2e21a52bdfdcf83868e3169768fda134aa883b)
---
 ...-gpio-regmap-Use-generic-request-free-ops.patch |  30 +++++
 ...-gpio-regmap-Use-generic-request-free-ops.patch | 131 ---------------------
 2 files changed, 30 insertions(+), 131 deletions(-)

diff --git a/target/linux/generic/backport-6.6/880-v6.14-gpio-regmap-Use-generic-request-free-ops.patch b/target/linux/generic/backport-6.6/880-v6.14-gpio-regmap-Use-generic-request-free-ops.patch
new file mode 100644
index 0000000000..f9299f9733
--- /dev/null
+++ b/target/linux/generic/backport-6.6/880-v6.14-gpio-regmap-Use-generic-request-free-ops.patch
@@ -0,0 +1,30 @@
+From b0fa00fe38f673c986633c11087274deeb7ce7b0 Mon Sep 17 00:00:00 2001
+From: Sander Vanheule <sander at svanheule.net>
+Date: Tue, 7 Jan 2025 21:16:20 +0100
+Subject: [PATCH] gpio: regmap: Use generic request/free ops
+
+Set the gpiochip request and free ops to the generic implementations.
+This way a user can provide a gpio-ranges property defined for a pinmux,
+easing muxing of gpio functions. Provided that the pin controller
+implementents the pinmux op .gpio_request_enable(), pins will
+automatically be muxed to their GPIO function when requested.
+
+Signed-off-by: Sander Vanheule <sander at svanheule.net>
+Acked-by: Michael Walle <mwalle at kernel.org>
+Link: https://lore.kernel.org/r/20250107201621.12467-1-sander@svanheule.net
+Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski at linaro.org>
+---
+ drivers/gpio/gpio-regmap.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/drivers/gpio/gpio-regmap.c
++++ b/drivers/gpio/gpio-regmap.c
+@@ -262,6 +262,8 @@ struct gpio_regmap *gpio_regmap_register
+ 	chip->label = config->label ?: dev_name(config->parent);
+ 	chip->can_sleep = regmap_might_sleep(config->regmap);
+ 
++	chip->request = gpiochip_generic_request;
++	chip->free = gpiochip_generic_free;
+ 	chip->get = gpio_regmap_get;
+ 	if (gpio->reg_set_base && gpio->reg_clr_base)
+ 		chip->set = gpio_regmap_set_with_clear;
diff --git a/target/linux/generic/pending-6.6/821-gpio-regmap-Use-generic-request-free-ops.patch b/target/linux/generic/pending-6.6/821-gpio-regmap-Use-generic-request-free-ops.patch
deleted file mode 100644
index 344a5b1c5a..0000000000
--- a/target/linux/generic/pending-6.6/821-gpio-regmap-Use-generic-request-free-ops.patch
+++ /dev/null
@@ -1,131 +0,0 @@
-From patchwork Tue Jan  7 20:16:20 2025
-Content-Type: text/plain; charset="utf-8"
-MIME-Version: 1.0
-Content-Transfer-Encoding: 8bit
-X-Patchwork-Submitter: Sander Vanheule <sander at svanheule.net>
-X-Patchwork-Id: 2031059
-Return-Path: 
- <linux-gpio+bounces-14582-incoming=patchwork.ozlabs.org at vger.kernel.org>
-X-Original-To: incoming at patchwork.ozlabs.org
-Delivered-To: patchwork-incoming at legolas.ozlabs.org
-Authentication-Results: legolas.ozlabs.org;
-	dkim=pass (2048-bit key;
- secure) header.d=svanheule.net header.i=@svanheule.net header.a=rsa-sha256
- header.s=mail1707 header.b=YjCvLC2H;
-	dkim-atps=neutral
-Authentication-Results: legolas.ozlabs.org;
- spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org
- (client-ip=2604:1380:4601:e00::3; helo=am.mirrors.kernel.org;
- envelope-from=linux-gpio+bounces-14582-incoming=patchwork.ozlabs.org at vger.kernel.org;
- receiver=patchwork.ozlabs.org)
-Received: from am.mirrors.kernel.org (am.mirrors.kernel.org
- [IPv6:2604:1380:4601:e00::3])
-	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
-	 key-exchange X25519 server-signature ECDSA (secp384r1))
-	(No client certificate requested)
-	by legolas.ozlabs.org (Postfix) with ESMTPS id 4YSMxB3WwSz1yPG
-	for <incoming at patchwork.ozlabs.org>; Wed,  8 Jan 2025 07:25:18 +1100 (AEDT)
-Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
-	(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
-	(No client certificate requested)
-	by am.mirrors.kernel.org (Postfix) with ESMTPS id A7B811887AD1
-	for <incoming at patchwork.ozlabs.org>; Tue,  7 Jan 2025 20:25:19 +0000 (UTC)
-Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
-	by smtp.subspace.kernel.org (Postfix) with ESMTP id C09A21F63FE;
-	Tue,  7 Jan 2025 20:25:11 +0000 (UTC)
-Authentication-Results: smtp.subspace.kernel.org;
-	dkim=pass (2048-bit key) header.d=svanheule.net header.i=@svanheule.net
- header.b="YjCvLC2H"
-X-Original-To: linux-gpio at vger.kernel.org
-Received: from polaris.svanheule.net (polaris.svanheule.net [84.16.241.116])
-	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
-	(No client certificate requested)
-	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8DD631DF97A
-	for <linux-gpio at vger.kernel.org>; Tue,  7 Jan 2025 20:25:07 +0000 (UTC)
-Authentication-Results: smtp.subspace.kernel.org;
- arc=none smtp.client-ip=84.16.241.116
-ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
-	t=1736281511; cv=none;
- b=Xe/s+ul4S/+nhYxSMqUWJ/GXKP+J7uJo6tFw/w5bTXcmGxkbpCXTLOiTNXAhv8PMhTfsLYSQes6VF8dzDXaJxL4c8SlQsPNfGH/PqecmSvFMbZTz1XbjP9mBUCvX9lxCH8CSRavkuPuYdhss3a56TgaFzi9GifUSHCsHGs7+xk0=
-ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org;
-	s=arc-20240116; t=1736281511; c=relaxed/simple;
-	bh=31kjLyaoVOzIAs1m+zMi59Ia2jUwYW56Jp1YE6hLflg=;
-	h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type;
- b=q7miNkZBtMq3dcxL5HMjUpP3EFdQ7/xU/WnWIFVl6MK4rszqphqvaziMOK6avsn+UA5pAx2JJV8bDY8LfNhiVWwZtPfxbikjjZFm1HYlCDWmGudasM0b//K3/On625L4iqFWmVmLUdEdhvwIkJKSL4wTfN0OMz27EI272o5ygLg=
-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org;
- dmarc=pass (p=none dis=none) header.from=svanheule.net;
- spf=pass smtp.mailfrom=svanheule.net;
- dkim=pass (2048-bit key) header.d=svanheule.net header.i=@svanheule.net
- header.b=YjCvLC2H; arc=none smtp.client-ip=84.16.241.116
-Authentication-Results: smtp.subspace.kernel.org;
- dmarc=pass (p=none dis=none) header.from=svanheule.net
-Authentication-Results: smtp.subspace.kernel.org;
- spf=pass smtp.mailfrom=svanheule.net
-Received: from terra.vega.svanheule.net (unknown [94.110.49.146])
-	(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 at svanheule.net)
-	by polaris.svanheule.net (Postfix) with ESMTPSA id 1E18459A0D6;
-	Tue,  7 Jan 2025 21:17:02 +0100 (CET)
-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=svanheule.net;
-	s=mail1707; t=1736281022;
-	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
-	 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
-	 content-transfer-encoding:content-transfer-encoding;
-	bh=yNGIiTe7uonx3NZIc6+B7LVjvR8RnIV2zq++EO7NLhg=;
-	b=YjCvLC2HqArIGWGFkNYmh+oloGi7ZFo7WZGlTbxuHqrQVJ6mLNoLCTCkPkX1EJWEQyNysD
-	Jj+7tBnAYyCrJ0NuSTD9CPW1+KwKP4wlvWpBUlayCdUJyU4rzjqmlYAI5vJ1UX8FOnvEpn
-	KeWjgjbeMI6dvIE7ATPFkDvMrDxR9KSEe/1pfzY3E5jh1T8tcnTRMQKTll7hSUBN63dVfJ
-	U7wnHRLvwx8ESIjrHDKOlsSohmV6lyQTrgEeE2RCM6SpZPNoSpPVjTinF1kPuMHNWHV+Th
-	6eDOblXxt859JECDowM0NjF87XJqjgph22+A1WUV4iaePO4GIWo9DQ3KhP/Pyg==
-From: Sander Vanheule <sander at svanheule.net>
-To: Michael Walle <mwalle at kernel.org>,
-	Linus Walleij <linus.walleij at linaro.org>,
-	Bartosz Golaszewski <brgl at bgdev.pl>,
-	linux-gpio at vger.kernel.org,
-	linux-kernel at vger.kernel.org
-Cc: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= <noltari at gmail.com>,
- jonas.gorski at gmail.com, kylehendrydev at gmail.com,
- florian.fainelli at broadcom.com, Sander Vanheule <sander at svanheule.net>
-Subject: [PATCH] gpio: regmap: Use generic request/free ops
-Date: Tue,  7 Jan 2025 21:16:20 +0100
-Message-ID: <20250107201621.12467-1-sander at svanheule.net>
-X-Mailer: git-send-email 2.47.1
-Precedence: bulk
-X-Mailing-List: linux-gpio at vger.kernel.org
-List-Id: <linux-gpio.vger.kernel.org>
-List-Subscribe: <mailto:linux-gpio+subscribe at vger.kernel.org>
-List-Unsubscribe: <mailto:linux-gpio+unsubscribe at vger.kernel.org>
-MIME-Version: 1.0
-
-Set the gpiochip request and free ops to the generic implementations.
-This way a user can provide a gpio-ranges property defined for a pinmux,
-easing muxing of gpio functions. Provided that the pin controller
-implementents the pinmux op .gpio_request_enable(), pins will
-automatically be muxed to their GPIO function when requested.
-
-Signed-off-by: Sander Vanheule <sander at svanheule.net>
-Acked-by: Michael Walle <mwalle at kernel.org>
----
-Álvaro has submitted a similar patch today. My implementation's impact
-is more limited, but I hadn't gotten around to submitting it yet.
-
-For the original (short) discussion, see:
-https://lore.kernel.org/linux-gpio/20250107102735.317446-1-noltari@gmail.com/T/#t
-
- drivers/gpio/gpio-regmap.c | 2 ++
- 1 file changed, 2 insertions(+)
-
---- a/drivers/gpio/gpio-regmap.c
-+++ b/drivers/gpio/gpio-regmap.c
-@@ -262,6 +262,8 @@ struct gpio_regmap *gpio_regmap_register
- 	chip->label = config->label ?: dev_name(config->parent);
- 	chip->can_sleep = regmap_might_sleep(config->regmap);
- 
-+	chip->request = gpiochip_generic_request;
-+	chip->free = gpiochip_generic_free;
- 	chip->get = gpio_regmap_get;
- 	if (gpio->reg_set_base && gpio->reg_clr_base)
- 		chip->set = gpio_regmap_set_with_clear;




More information about the lede-commits mailing list