From: Kevin Hilman <khilman@kernel.org>
To: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>,
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>
Cc: 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,
brgl@kernel.org,
Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Subject: Re: [PATCH 4/6] ARM: omap1: ams-delta: convert GPIO hogs to using firmware nodes
Date: Thu, 05 Mar 2026 16:44:59 -0800 [thread overview]
Message-ID: <7hy0k5okfo.fsf@baylibre.com> (raw)
In-Reply-To: <20260305-gpio-hog-fwnode-v1-4-97d7df6bbd17@oss.qualcomm.com>
Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com> writes:
> Setup a software node hierarchy for the latch2 GPIO controller defining
> the required hog and stop using legacy machine hog API.
>
> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Acked-by: Kevin Hilman <khilman@baylibre.com>
> ---
> arch/arm/mach-omap1/board-ams-delta.c | 32 +++++++++++++++++++++++++++-----
> 1 file changed, 27 insertions(+), 5 deletions(-)
>
> diff --git a/arch/arm/mach-omap1/board-ams-delta.c b/arch/arm/mach-omap1/board-ams-delta.c
> index 16392720296cd224732450c85419c35bbab506f6..1bec4fa0bd5e8bfc58103d1f24b22176707fd26f 100644
> --- a/arch/arm/mach-omap1/board-ams-delta.c
> +++ b/arch/arm/mach-omap1/board-ams-delta.c
> @@ -556,10 +556,30 @@ static struct gpiod_lookup_table *ams_delta_gpio_tables[] __initdata = {
> &ams_delta_nand_gpio_table,
> };
>
> -static struct gpiod_hog ams_delta_gpio_hogs[] = {
> - GPIO_HOG(LATCH2_LABEL, LATCH2_PIN_KEYBRD_DATAOUT, "keybrd_dataout",
> - GPIO_ACTIVE_HIGH, GPIOD_OUT_LOW),
> - {},
> +static const struct software_node latch2_gpio_swnode = {
> + .name = LATCH2_LABEL,
> +};
> +
> +static const u32 latch2_hog_gpios[] = { LATCH2_PIN_KEYBRD_DATAOUT, 0 };
> +
> +static const struct property_entry latch2_gpio_hog_props[] = {
> + PROPERTY_ENTRY_BOOL("gpio-hog"),
> + PROPERTY_ENTRY_U32_ARRAY("gpios", latch2_hog_gpios),
> + PROPERTY_ENTRY_STRING("line-name", "keybrd_dataout"),
> + PROPERTY_ENTRY_BOOL("output-low"),
> + { }
> +};
> +
> +static const struct software_node latch2_gpio_hog_swnode = {
> + .parent = &latch2_gpio_swnode,
> + .name = "latch2-hog",
> + .properties = latch2_gpio_hog_props,
> +};
> +
> +static const struct software_node *const latch2_gpio_swnodes[] = {
> + &latch2_gpio_swnode,
> + &latch2_gpio_hog_swnode,
> + NULL
> };
>
> static struct plat_serial8250_port ams_delta_modem_ports[];
> @@ -684,7 +704,6 @@ static void __init ams_delta_init(void)
>
> omap_gpio_deps_init();
> ams_delta_latch2_init();
> - gpiod_add_hogs(ams_delta_gpio_hogs);
>
> omap_serial_init();
> omap_register_i2c_bus(1, 100, NULL, 0);
> @@ -693,6 +712,9 @@ static void __init ams_delta_init(void)
> platform_add_devices(ams_delta_devices, ARRAY_SIZE(ams_delta_devices));
>
> platform_device_register_full(&latch1_gpio_devinfo);
> +
> + software_node_register_node_group(latch2_gpio_swnodes);
> + latch2_gpio_devinfo.fwnode = software_node_fwnode(&latch2_gpio_swnode);
> platform_device_register_full(&latch2_gpio_devinfo);
>
> /*
>
> --
> 2.47.3
next prev parent reply other threads:[~2026-03-06 0:45 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-05 9:51 [PATCH 0/6] gpiolib: unify gpio-hog code Bartosz Golaszewski
2026-03-05 9:51 ` [PATCH 1/6] gpio: of: clear OF_POPULATED on hog nodes in remove path Bartosz Golaszewski
2026-03-05 12:58 ` Linus Walleij
2026-03-05 9:51 ` [PATCH 2/6] gpio: move hogs into GPIO core Bartosz Golaszewski
2026-03-05 12:59 ` Linus Walleij
2026-03-05 14:25 ` Mika Westerberg
2026-03-06 1:06 ` kernel test robot
2026-03-06 11:53 ` Andy Shevchenko
2026-03-05 9:51 ` [PATCH 3/6] gpio: sim: use fwnode-based GPIO hogs Bartosz Golaszewski
2026-03-05 12:59 ` Linus Walleij
2026-03-05 9:51 ` [PATCH 4/6] ARM: omap1: ams-delta: convert GPIO hogs to using firmware nodes Bartosz Golaszewski
2026-03-05 12:59 ` Linus Walleij
2026-03-06 0:44 ` Kevin Hilman [this message]
2026-03-05 9:51 ` [PATCH 5/6] gpio: remove machine hogs Bartosz Golaszewski
2026-03-05 13:00 ` Linus Walleij
2026-03-05 9:51 ` [PATCH 6/6] gpio: sim: allow to define the active-low setting of a simulated hog Bartosz Golaszewski
2026-03-05 13:01 ` Linus Walleij
2026-03-06 11:58 ` [PATCH 0/6] gpiolib: unify gpio-hog code Andy Shevchenko
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=7hy0k5okfo.fsf@baylibre.com \
--to=khilman@kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox