From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Cc: Linus Walleij <linusw@kernel.org>,
Bartosz Golaszewski <brgl@kernel.org>,
Geert Uytterhoeven <geert+renesas@glider.be>,
Frank Rowand <frowand.list@gmail.com>,
Mika Westerberg <westeri@kernel.org>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Aaro Koskinen <aaro.koskinen@iki.fi>,
Janusz Krzysztofik <jmkrzyszt@gmail.com>,
Tony Lindgren <tony@atomide.com>,
Russell King <linux@armlinux.org.uk>,
Jonathan Corbet <corbet@lwn.net>,
Shuah Khan <skhan@linuxfoundation.org>,
linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-acpi@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org,
linux-doc@vger.kernel.org
Subject: Re: [PATCH v2 5/6] gpio: remove machine hogs
Date: Tue, 19 May 2026 17:46:50 -0700 [thread overview]
Message-ID: <ag0Dn66ZVnbTc7J2@google.com> (raw)
In-Reply-To: <20260309-gpio-hog-fwnode-v2-5-4e61f3dbf06a@oss.qualcomm.com>
On Mon, Mar 09, 2026 at 01:42:41PM +0100, Bartosz Golaszewski wrote:
> With no more users, remove legacy machine hog API from the kernel.
>
> Reviewed-by: Linus Walleij <linusw@kernel.org>
> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Argh! What is the replacement for this? I have patches for rsk7203 to
use them to get rid of legacy gpio use, like this:
diff --git a/arch/sh/boards/mach-rsk/devices-rsk7203.c b/arch/sh/boards/mach-rsk/devices-rsk7203.c
index f8760a91e2f1..5bbd3b31cffb 100644
--- a/arch/sh/boards/mach-rsk/devices-rsk7203.c
+++ b/arch/sh/boards/mach-rsk/devices-rsk7203.c
@@ -12,7 +12,7 @@
#include <linux/smsc911x.h>
#include <linux/input.h>
#include <linux/io.h>
-#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
#include <linux/gpio/machine.h>
#include <linux/gpio/property.h>
#include <asm/machvec.h>
@@ -165,6 +165,19 @@ static const struct platform_device_info rsk7203_devices[] __initconst = {
},
};
+/* The base of the function GPIOs in the flat enum */
+#define SH7203_FN_BASE GPIO_FN_PINT7_PB
+
+static struct gpiod_hog rsk7203_gpio_hogs[] = {
+ GPIO_HOG("sh7203_pfc-fn", GPIO_FN_TXD0 - SH7203_FN_BASE,
+ "TXD0", GPIO_ACTIVE_HIGH, GPIOD_ASIS),
+ GPIO_HOG("sh7203_pfc-fn", GPIO_FN_RXD0 - SH7203_FN_BASE,
+ "RXD0", GPIO_ACTIVE_HIGH, GPIOD_ASIS),
+ GPIO_HOG("sh7203_pfc-fn", GPIO_FN_IRQ0_PB - SH7203_FN_BASE,
+ "IRQ0_PB", GPIO_ACTIVE_HIGH, GPIOD_ASIS),
+ { }
+};
+
static int __init rsk7203_devices_setup(void)
{
struct platform_device *pd;
@@ -172,12 +185,10 @@ static int __init rsk7203_devices_setup(void)
int i;
/* Select pins for SCIF0 */
- gpio_request(GPIO_FN_TXD0, NULL);
- gpio_request(GPIO_FN_RXD0, NULL);
+ gpiod_add_hogs(rsk7203_gpio_hogs);
/* Setup LAN9118: CS1 in 16-bit Big Endian Mode, IRQ0 at Port B */
__raw_writel(0x36db0400, 0xfffc0008); /* CS1BCR */
- gpio_request(GPIO_FN_IRQ0_PB, NULL);
error = software_node_register_node_group(rsk7203_swnodes);
if (error) {
If there is no replacement maybe we can resurrect this? Or shoudl we
have add swnode support for hogs?
Thanks.
--
Dmitry
next prev parent reply other threads:[~2026-05-20 0:46 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-09 12:42 [PATCH v2 0/6] gpiolib: unify gpio-hog code Bartosz Golaszewski
2026-03-09 12:42 ` [PATCH v2 1/6] gpio: of: clear OF_POPULATED on hog nodes in remove path Bartosz Golaszewski
2026-03-09 12:42 ` [PATCH v2 2/6] gpio: move hogs into GPIO core Bartosz Golaszewski
2026-03-24 16:16 ` Geert Uytterhoeven
2026-03-09 12:42 ` [PATCH v2 3/6] gpio: sim: use fwnode-based GPIO hogs Bartosz Golaszewski
2026-03-09 12:42 ` [PATCH v2 4/6] ARM: omap1: ams-delta: convert GPIO hogs to using firmware nodes Bartosz Golaszewski
2026-03-09 12:42 ` [PATCH v2 5/6] gpio: remove machine hogs Bartosz Golaszewski
2026-05-20 0:46 ` Dmitry Torokhov [this message]
2026-05-20 5:27 ` Dmitry Torokhov
2026-05-20 6:55 ` Bartosz Golaszewski
2026-03-09 12:42 ` [PATCH v2 6/6] gpio: sim: allow to define the active-low setting of a simulated hog Bartosz Golaszewski
2026-03-16 9:11 ` [PATCH v2 0/6] gpiolib: unify gpio-hog code Bartosz Golaszewski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ag0Dn66ZVnbTc7J2@google.com \
--to=dmitry.torokhov@gmail.com \
--cc=aaro.koskinen@iki.fi \
--cc=andriy.shevchenko@linux.intel.com \
--cc=bartosz.golaszewski@oss.qualcomm.com \
--cc=brgl@kernel.org \
--cc=corbet@lwn.net \
--cc=frowand.list@gmail.com \
--cc=geert+renesas@glider.be \
--cc=jmkrzyszt@gmail.com \
--cc=linusw@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=skhan@linuxfoundation.org \
--cc=tony@atomide.com \
--cc=westeri@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.