From: Álvaro Fernández Rojas Date: Wed, 8 Jan 2025 16:56:16 +0000 (+0100) Subject: generic: move gpio-regmap request/free ops patch from realtek X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=f5b1d340be9488af71e6522c3f10f1ebd1a35446;p=openwrt%2Fopenwrt.git generic: move gpio-regmap request/free ops patch from realtek This patch is also needed on bmips since it fixes issues with GPIOs not being properly configured due to gpio_request_enable not being called on bcm63xx devices. Therefore we can now drop the bcm63268 gpio function patch. Signed-off-by: Álvaro Fernández Rojas --- diff --git a/target/linux/bmips/patches-6.6/110-pinctrl-bcm63268-add-gpio-function.patch b/target/linux/bmips/patches-6.6/110-pinctrl-bcm63268-add-gpio-function.patch deleted file mode 100644 index afd4aa8716..0000000000 --- a/target/linux/bmips/patches-6.6/110-pinctrl-bcm63268-add-gpio-function.patch +++ /dev/null @@ -1,260 +0,0 @@ -From patchwork Tue Dec 24 10:36:45 2024 -Content-Type: text/plain; charset="utf-8" -MIME-Version: 1.0 -Content-Transfer-Encoding: 8bit -X-Patchwork-Submitter: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= - -X-Patchwork-Id: 2027352 -Return-Path: - -X-Original-To: incoming@patchwork.ozlabs.org -Delivered-To: patchwork-incoming@legolas.ozlabs.org -Authentication-Results: legolas.ozlabs.org; - dkim=pass (2048-bit key; - unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 - header.s=20230601 header.b=UahONGdE; - dkim-atps=neutral -Authentication-Results: legolas.ozlabs.org; - spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org - (client-ip=2604:1380:45d1:ec00::1; helo=ny.mirrors.kernel.org; - envelope-from=linux-gpio+bounces-14196-incoming=patchwork.ozlabs.org@vger.kernel.org; - receiver=patchwork.ozlabs.org) -Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org - [IPv6:2604:1380:45d1:ec00::1]) - (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 4YHWfw1qmwz1yRt - for ; Tue, 24 Dec 2024 21:42:16 +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 ny.mirrors.kernel.org (Postfix) with ESMTPS id C1409161D8A - for ; Tue, 24 Dec 2024 10:37:04 +0000 (UTC) -Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) - by smtp.subspace.kernel.org (Postfix) with ESMTP id C7E791B4132; - Tue, 24 Dec 2024 10:36:55 +0000 (UTC) -Authentication-Results: smtp.subspace.kernel.org; - dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com - header.b="UahONGdE" -X-Original-To: linux-gpio@vger.kernel.org -Received: from mail-wr1-f53.google.com (mail-wr1-f53.google.com - [209.85.221.53]) - (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) - (No client certificate requested) - by smtp.subspace.kernel.org (Postfix) with ESMTPS id D319C156F54; - Tue, 24 Dec 2024 10:36:53 +0000 (UTC) -Authentication-Results: smtp.subspace.kernel.org; - arc=none smtp.client-ip=209.85.221.53 -ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; - t=1735036615; cv=none; - b=PEr2vZNz4kb5F2BBGJpTRVGs1Sp8DsmivUP7NnKOWY8KgRPxzLf347SrUxfe6CzXLRpkbCWVoCYMXckrj9poJHbYkU+/I53Nl72IMCm3umwEzLBU+DBhEYh9gmJ1E+IPV+A8Zrs6umt4+Y7IMFxaZA+O2c13TX+AQwjWhRutDPw= -ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; - s=arc-20240116; t=1735036615; c=relaxed/simple; - bh=dXQRhQVd1Zyosn15/gUbEta/P7NJqalhPImmU9urz+Y=; - h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: - MIME-Version:Content-Type; - b=Gb5/JI8lf48IhgVAoC7Sh3vHpBSJCe3+dnVZG4qlAQp3DZVyr+TWYice/Redmrl8JkjoE273hxZ6hFSvJlzF9EclMz0e7k977iOmuQon+N5YlhtfDL94suzV5P9sfXwYvtVjZwnr7aqkRr3w3ihchOawYmk3dg3505bUebInQnk= -ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; - dmarc=pass (p=none dis=none) header.from=gmail.com; - spf=pass smtp.mailfrom=gmail.com; - dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com - header.b=UahONGdE; arc=none smtp.client-ip=209.85.221.53 -Authentication-Results: smtp.subspace.kernel.org; - dmarc=pass (p=none dis=none) header.from=gmail.com -Authentication-Results: smtp.subspace.kernel.org; - spf=pass smtp.mailfrom=gmail.com -Received: by mail-wr1-f53.google.com with SMTP id - ffacd0b85a97d-3862d161947so2420686f8f.3; - Tue, 24 Dec 2024 02:36:53 -0800 (PST) -DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; - d=gmail.com; s=20230601; t=1735036612; x=1735641412; - darn=vger.kernel.org; - h=content-transfer-encoding:mime-version:references:in-reply-to - :message-id:date:subject:cc:to:from:from:to:cc:subject:date - :message-id:reply-to; - bh=sMhk1A5we+Q0WqaTiBzTXNhUdePPFx1uKEyCWbVNvYc=; - b=UahONGdExN2DP5PBiZ87j1+mGkDzwCd+MCQpZmUblrKP7GD0KfO4OV/GKtEfTO1sYK - pH+O3hs+yDawgBghqREytfRP390tCBpz+65UNn6GkBDU2iptaRDiGcn1nKnPYpkd3P6X - 0zVyYKneAQ/sAcE/VjH0I7HWuyARq5PtnKMegYi8dZmpFXux+gaBjgnSsjPuOyR/xWxN - RP1C9BDzN3NqeptC5oSsG5eB2Rs5niHvJoSbGuKVBPipP+k6qu88w4bfhTIponae1bt1 - gpUV23UfNa49ChxKv0ivW7QfFky1P30da1oXtQsNS0FVVVrHlWJhhivVT7Fuf2g6dgDh - fgTw== -X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; - d=1e100.net; s=20230601; t=1735036612; x=1735641412; - h=content-transfer-encoding:mime-version:references:in-reply-to - :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc - :subject:date:message-id:reply-to; - bh=sMhk1A5we+Q0WqaTiBzTXNhUdePPFx1uKEyCWbVNvYc=; - b=btRSTKjTHUEx37dhjkiEkJmdS2tVqBjs7UEaMq1bUwXvN7mwvBDdqJz6RW8W2xFdh6 - m/cDdd2Ao9FpXD5R4SBkvIZQPd95+LaDjw6iz7msVP0dvjc1qTTEqlgKHl3ibs8U7Jro - +1nitU/Nl1I5VSgWSRx0in3pH/aD/dSfNPutLktI7IeegBU6dfXrVXaTsFofys1UjBk/ - bOdQRBEsG+X3rHrNTNuVwLewIwk0RwRp6KT6hlaF7bGdhl1UPuG+AMK7PAFUP4e2D5OK - QmBE6ayI4XOeRQHFCbGG2OUvddtktA8BQzwr28+DwYWADQQiKCuy0UJBtW0DmzaxKr7F - gCIw== -X-Forwarded-Encrypted: i=1; - AJvYcCVHVB9BqpG5+V+fo4vdtCQHh3nIKV69RT+IPj0tFJoUTpQdG+vPR4Iqt7ktLVoMBVXhtsD0DAuZpXFa@vger.kernel.org, - AJvYcCXtcLMfobpgZfmtjLs1KKQ2YT3EaF+0+Mdt7kFCJbskk1e1IbXmjE8SiwRlPc7Xop8LBdifPZoTR1ZCl6PN@vger.kernel.org -X-Gm-Message-State: AOJu0YwqZ5qOpBs+2cK9ou/rHf3nhKSpv1sOAgh/R/uVc6pFB2dqDkjp - okaKt94cn3iBf/E0yr+jvP84miiyWBjHOiwUifpj2I+eg2/hRbLe -X-Gm-Gg: ASbGnctb0LTvTOtGESMAhgeg3r7sjorwh3VXs5dZZezH+8LeYUD4c6SPFEXxiNeIZAv - NZLn9cN6bKQLaVX9lTUF2nNmqijrn8WPhaSpeqeSNnZdNpdoDTqTuYpEhY0y+72yNiTqhDFtbyr - OhCPhYE5VV+HKOekEluViF9bHOmkGhpUmBXyGOQmHPxEnDdZINMAMYHxUBC8E4nuG8p/hyD7dPD - iHXkaNnmD4NjYqjgTyxSACjy6eWinXEuukXXHZVbbJY9nJ4wVWI -X-Google-Smtp-Source: - AGHT+IEbrRmLj2uKOuyl6xkrJtxDUC1KVwEPA3dNsbU/+R2F0ZKZu/sQbMNvRjB6t41GnHxO0mDDAQ== -X-Received: by 2002:a05:6000:4023:b0:385:f220:f788 with SMTP id - ffacd0b85a97d-38a223fd77bmr14541441f8f.48.1735036611884; - Tue, 24 Dec 2024 02:36:51 -0800 (PST) -Received: from skynet.lan ([213.99.205.117]) - by smtp.gmail.com with ESMTPSA id - ffacd0b85a97d-38a1c89e1a1sm13645138f8f.69.2024.12.24.02.36.51 - (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); - Tue, 24 Dec 2024 02:36:51 -0800 (PST) -From: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= -To: linus.walleij@linaro.org, - kylehendrydev@gmail.com, - linux-gpio@vger.kernel.org, - linux-kernel@vger.kernel.org -Cc: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= -Subject: [PATCH v2] pinctrl: bcm63268: add gpio function -Date: Tue, 24 Dec 2024 11:36:45 +0100 -Message-Id: <20241224103645.1709996-1-noltari@gmail.com> -X-Mailer: git-send-email 2.39.5 -In-Reply-To: <20241207223335.17535-1-kylehendrydev@gmail.com> -References: <20241207223335.17535-1-kylehendrydev@gmail.com> -Precedence: bulk -X-Mailing-List: linux-gpio@vger.kernel.org -List-Id: -List-Subscribe: -List-Unsubscribe: -MIME-Version: 1.0 - -From: Kyle Hendry - -There is no guarantee that the bootloader will leave the pin configuration -in a known default state, so pinctrl needs to be explicitly set in some -cases. This patch adds a gpio function for drivers that need it, i.e. -gpio-leds. - -Signed-off-by: Kyle Hendry -Signed-off-by: Álvaro Fernández Rojas ---- - drivers/pinctrl/bcm/pinctrl-bcm63268.c | 71 +++++++++++++++++++++++++- - 1 file changed, 70 insertions(+), 1 deletion(-) - ---- a/drivers/pinctrl/bcm/pinctrl-bcm63268.c -+++ b/drivers/pinctrl/bcm/pinctrl-bcm63268.c -@@ -34,6 +34,7 @@ - #define BCM63268_BASEMODE_VDSL_PHY_3 BIT(9) /* GPIOs 26/27 */ - - enum bcm63268_pinctrl_reg { -+ BCM63268_NONE, - BCM63268_LEDCTRL, - BCM63268_MODE, - BCM63268_CTRL, -@@ -242,6 +243,61 @@ static struct pingroup bcm63268_groups[] - BCM_PIN_GROUP(vdsl_phy3_grp), - }; - -+static const char * const gpio_groups[] = { -+ "gpio0", -+ "gpio1", -+ "gpio2", -+ "gpio3", -+ "gpio4", -+ "gpio5", -+ "gpio6", -+ "gpio7", -+ "gpio8", -+ "gpio9", -+ "gpio10", -+ "gpio11", -+ "gpio12", -+ "gpio13", -+ "gpio14", -+ "gpio15", -+ "gpio16", -+ "gpio17", -+ "gpio18", -+ "gpio19", -+ "gpio20", -+ "gpio21", -+ "gpio22", -+ "gpio23", -+ "gpio24", -+ "gpio25", -+ "gpio26", -+ "gpio27", -+ "gpio28", -+ "gpio29", -+ "gpio30", -+ "gpio31", -+ "gpio32", -+ "gpio33", -+ "gpio34", -+ "gpio35", -+ "gpio36", -+ "gpio37", -+ "gpio38", -+ "gpio39", -+ "gpio40", -+ "gpio41", -+ "gpio42", -+ "gpio43", -+ "gpio44", -+ "gpio45", -+ "gpio46", -+ "gpio47", -+ "gpio48", -+ "gpio49", -+ "gpio50", -+ "gpio51", -+}; -+ - static const char * const led_groups[] = { - "gpio0", - "gpio1", -@@ -394,6 +450,14 @@ static const char * const vdsl_phy_overr - "vdsl_phy_override_3_grp", - }; - -+#define BCM63268_GPIO_FUN(n) \ -+ { \ -+ .name = #n, \ -+ .groups = n##_groups, \ -+ .num_groups = ARRAY_SIZE(n##_groups), \ -+ .reg = BCM63268_NONE, \ -+ } -+ - #define BCM63268_LED_FUN(n) \ - { \ - .name = #n, \ -@@ -428,6 +492,7 @@ static const char * const vdsl_phy_overr - } - - static const struct bcm63268_function bcm63268_funcs[] = { -+ BCM63268_GPIO_FUN(gpio), - BCM63268_LED_FUN(led), - BCM63268_MODE_FUN(serial_led_clk), - BCM63268_MODE_FUN(serial_led_data), -@@ -542,6 +607,9 @@ static int bcm63268_pinctrl_set_mux(stru - bcm63268_set_gpio(pc, pg->pins[i]); - - switch (f->reg) { -+ case BCM63268_NONE: -+ reg = 0; -+ break; - case BCM63268_LEDCTRL: - reg = BCM63268_LED_REG; - mask = BIT(pg->pins[0]); -@@ -567,7 +635,8 @@ static int bcm63268_pinctrl_set_mux(stru - return -EINVAL; - } - -- regmap_update_bits(pc->regs, reg, mask, val); -+ if (reg) -+ regmap_update_bits(pc->regs, reg, mask, val); - - return 0; - } 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 new file mode 100644 index 0000000000..344a5b1c5a --- /dev/null +++ b/target/linux/generic/pending-6.6/821-gpio-regmap-Use-generic-request-free-ops.patch @@ -0,0 +1,131 @@ +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 +X-Patchwork-Id: 2031059 +Return-Path: + +X-Original-To: incoming@patchwork.ozlabs.org +Delivered-To: patchwork-incoming@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@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 ; 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 ; 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@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 ; 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@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 +To: Michael Walle , + Linus Walleij , + Bartosz Golaszewski , + linux-gpio@vger.kernel.org, + linux-kernel@vger.kernel.org +Cc: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= , + jonas.gorski@gmail.com, kylehendrydev@gmail.com, + florian.fainelli@broadcom.com, Sander Vanheule +Subject: [PATCH] gpio: regmap: Use generic request/free ops +Date: Tue, 7 Jan 2025 21:16:20 +0100 +Message-ID: <20250107201621.12467-1-sander@svanheule.net> +X-Mailer: git-send-email 2.47.1 +Precedence: bulk +X-Mailing-List: linux-gpio@vger.kernel.org +List-Id: +List-Subscribe: +List-Unsubscribe: +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 +Acked-by: Michael Walle +--- +Á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; diff --git a/target/linux/realtek/patches-6.6/801-gpio-regmap-Use-generic-request-free-ops.patch b/target/linux/realtek/patches-6.6/801-gpio-regmap-Use-generic-request-free-ops.patch deleted file mode 100644 index a06ba7464a..0000000000 --- a/target/linux/realtek/patches-6.6/801-gpio-regmap-Use-generic-request-free-ops.patch +++ /dev/null @@ -1,26 +0,0 @@ -From f21b15dfe254b51f80c552750eb20b1dc752507a Mon Sep 17 00:00:00 2001 -From: Sander Vanheule -Date: Mon, 30 Dec 2024 17:59:24 +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, -allowing pins to automatically be muxed to their GPIO function when -requested. - -Signed-off-by: Sander Vanheule ---- - drivers/gpio/gpio-regmap.c | 2 ++ - 1 file changed, 2 insertions(+) - ---- a/drivers/gpio/gpio-regmap.c -+++ b/drivers/gpio/gpio-regmap.c -@@ -270,6 +270,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;