From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f180.google.com (mail-pl1-f180.google.com [209.85.214.180]) (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 DEAF12E173B for ; Fri, 6 Mar 2026 00:45:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.180 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772757903; cv=none; b=CSBdSeVmCUp0A+IrD565jvZX6XYxa4PC694SD8vS6wzLVoutquIRMtIBD6BhP+MSDpgooR7kq3Ub19Yb0EO3m1j/K/4QfLUsE51MIYSXlTIWTWx1w4Hl/XqsAOPeyu+znHmw7m+frdBHhM7DNHsz7gcmEOU0MtZigUt7XogWU3o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772757903; c=relaxed/simple; bh=G9zzbkUUMAkORAuT7yKEFCmmFIF56otd76cutMRNMYQ=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=mJCjUBlVOaDEwRDAGd61kMkj1mbFVusvhS/GxLw1vn8f3Jm1qOmEIMonQdXlgXCKbBiO+a9NE9gGt5QgNXsEdGj31+eOI5ngh9EutSFIJPkzOZ7rTrPI4S2QUlIRuRhe4gtDRucII0qqHSWu3Mt5tDZp5p3kTMJW9x5CgnlkTVE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=kernel.org; spf=pass smtp.mailfrom=baylibre.com; arc=none smtp.client-ip=209.85.214.180 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=kernel.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baylibre.com Received: by mail-pl1-f180.google.com with SMTP id d9443c01a7336-2ab39b111b9so40733425ad.1 for ; Thu, 05 Mar 2026 16:45:00 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772757900; x=1773362700; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=XBIID2C3tYCLC3ROIp9HZ27Vwpuc9s7YKBLnBBIirXY=; b=vRQjfFoVAmzpHnrlSRI+EVOsbIX+kP71s9UDz4TUfLI00tbSPlDFBiEKV99WFKsZtl Z1V+F7E2k3+XCT00Y0QADs79AUwHx23ILP0ykFnzamlxs0vb60Ui6rekyI7MegteBl3i DuDT/+UksUvTphGLh2g09XEM0+i6MYQAXfR7K1/sxUk90lyDc3t9EmVHkbR/EBAI3WpP PcyLv648DH9NfebB5FIrocyZQCfnEhgVuzIASD7pcjGqXU95uJjpsBuAAKbBe67hoD/D jDbccvkOtMWPYs6OnMhnjw3PuaTHas/2C2vlRtfRDrdpj+8aRLqAAXspT30Sd/xNW5eH xWKg== X-Forwarded-Encrypted: i=1; AJvYcCVa3rkL47GQphjp9XqhKYRODjhca6jtizZHec7u4Tfv1Xb/6pGohhV6w3o0L28RGjaMQyVGI5h0KNTVxqI=@vger.kernel.org X-Gm-Message-State: AOJu0Yxio0S98cJ9NYgp8XwAzX6n5dQlzXK8AGIm5iY6zGWLqu/1H+T4 HLkGwB2DSGeKKEQLYw3WhXmitfNOaX9MA+FY1PgN9g9E9aZisa1elGAZF7Z3SMYFRPk= X-Gm-Gg: ATEYQzzTzV26zC2/vJVfQrKaneDmKlMULwaxU0TY+O/pHhHi7F3UBNJ6V30oWyx9Q8w u8IRBmFPpqAspgo2y93a9KiRvwlE60yqjoWZj2I5Qy2DCeiJPQHWI445ordQOZlZjEcUvne8dAG YbKbcaQhmXOwCM0/84BbP3OjuUJJdW0b6XnmaeLuRX2A5uB2texriuVjD8Rta39wZqomn9B0j/G Sczn/Gs5Dl3s6XCDLp5QuABzD552jNWvEqZYjx5p5F0lgUAm1Y4wl+Lxt969h5OwnbhKVSLiKR0 UiwkIvSog5w+rdbWTIElnFBWUTr30N7J+b+XxSCvU70yzDJPE12/SSkk3U4OekbjExH9KRhu+vE Nh82rCRBjuOLHQ6FDbTE7qdmGit+gX63RfTvT6GK6mTNv61dMTJZ6GLQ3YXWbv9/QwAZJED0bBa iSbPDAV1q4LnUIZi30g/mG X-Received: by 2002:a17:903:18d:b0:2ae:5eee:7a5 with SMTP id d9443c01a7336-2ae8241df4emr3858265ad.12.1772757900350; Thu, 05 Mar 2026 16:45:00 -0800 (PST) Received: from localhost ([71.212.200.220]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2ae4651e409sm180143885ad.44.2026.03.05.16.44.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Mar 2026 16:44:59 -0800 (PST) From: Kevin Hilman To: Bartosz Golaszewski , Linus Walleij , Bartosz Golaszewski , Geert Uytterhoeven , Frank Rowand , Mika Westerberg , Andy Shevchenko , Aaro Koskinen , Janusz Krzysztofik , Tony Lindgren , Russell King , Jonathan Corbet , Shuah Khan 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 Subject: Re: [PATCH 4/6] ARM: omap1: ams-delta: convert GPIO hogs to using firmware nodes In-Reply-To: <20260305-gpio-hog-fwnode-v1-4-97d7df6bbd17@oss.qualcomm.com> References: <20260305-gpio-hog-fwnode-v1-0-97d7df6bbd17@oss.qualcomm.com> <20260305-gpio-hog-fwnode-v1-4-97d7df6bbd17@oss.qualcomm.com> Date: Thu, 05 Mar 2026 16:44:59 -0800 Message-ID: <7hy0k5okfo.fsf@baylibre.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain Bartosz Golaszewski 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 Acked-by: Kevin Hilman > --- > 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