[{"id":3682639,"web_url":"http://patchwork.ozlabs.org/comment/3682639/","msgid":"<ae9BR5vW_6jvNOYY@shell.armlinux.org.uk>","list_archive_url":null,"date":"2026-04-27T10:58:15","subject":"Re: [PATCH v2 3/4] ARM: pxa: pxa25x: attach software node to its\n target GPIO controller","submitter":{"id":69080,"url":"http://patchwork.ozlabs.org/api/people/69080/","name":"Russell King (Oracle)","email":"linux@armlinux.org.uk"},"content":"On Mon, Apr 27, 2026 at 12:14:34PM +0200, Bartosz Golaszewski wrote:\n> Software node describing the GPIO controller for the pxa25x platforms is\n> currently \"dangling\" - it's not actually attached to the relevant\n> controller and doesn't allow real fwnode lookup. Attach it once it's\n> registered as a firmware node before adding the platform device.\n> \n> Reviewed-by: Linus Walleij <linusw@kernel.org>\n> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>\n> ---\n>  arch/arm/mach-pxa/pxa25x.c | 5 ++++-\n>  1 file changed, 4 insertions(+), 1 deletion(-)\n> \n> diff --git a/arch/arm/mach-pxa/pxa25x.c b/arch/arm/mach-pxa/pxa25x.c\n> index 70509a5998142ec6b9c484e5f094751eda6db6cd..6875774f2cae1db4798d18c813f445bdc31b15de 100644\n> --- a/arch/arm/mach-pxa/pxa25x.c\n> +++ b/arch/arm/mach-pxa/pxa25x.c\n> @@ -179,7 +179,6 @@ void __init pxa25x_map_io(void)\n>  }\n>  \n>  static struct platform_device *pxa25x_devices[] __initdata = {\n> -\t&pxa25x_device_gpio,\n>  \t&pxa25x_device_udc,\n>  \t&pxa_device_pmu,\n>  \t&pxa_device_i2s,\n> @@ -240,6 +239,10 @@ static int __init pxa25x_init(void)\n>  \n>  \t\tif (!of_have_populated_dt()) {\n>  \t\t\tsoftware_node_register(&pxa2xx_gpiochip_node);\n> +\t\t\tpxa25x_device_gpio.dev.fwnode = software_node_fwnode(\n> +\t\t\t\t\t\t\t\t&pxa2xx_gpiochip_node);\n> +\t\t\tplatform_device_register(&pxa25x_device_gpio);\n> +\n>  \t\t\tpxa2xx_set_dmac_info(&pxa25x_dma_pdata);\n>  \t\t\tret = platform_add_devices(pxa25x_devices,\n>  \t\t\t\t\t\t   ARRAY_SIZE(pxa25x_devices));\n\nWhy do you need to explicitly register using platform_device_register()\nrather than leaving the device in the pxa25x_devices list and letting\nplatform_add_devices() do that for you? platform_add_devices() is just\na wrapper around platform_device_register() which calls that for all\ndevices in the array.","headers":{"Return-Path":"\n <linux-gpio+bounces-35554-incoming=patchwork.ozlabs.org@vger.kernel.org>","X-Original-To":["incoming@patchwork.ozlabs.org","linux-gpio@vger.kernel.org"],"Delivered-To":"patchwork-incoming@legolas.ozlabs.org","Authentication-Results":["legolas.ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n secure) header.d=armlinux.org.uk header.i=@armlinux.org.uk\n header.a=rsa-sha256 header.s=pandora-2019 header.b=mLv5x2EL;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c0a:e001:db::12fc:5321; helo=sea.lore.kernel.org;\n envelope-from=linux-gpio+bounces-35554-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)","smtp.subspace.kernel.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key)\n header.d=armlinux.org.uk header.i=@armlinux.org.uk header.b=\"mLv5x2EL\"","smtp.subspace.kernel.org;\n arc=none smtp.client-ip=78.32.30.218","smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=armlinux.org.uk","smtp.subspace.kernel.org;\n spf=none smtp.mailfrom=armlinux.org.uk"],"Received":["from sea.lore.kernel.org (sea.lore.kernel.org\n [IPv6:2600:3c0a:e001:db::12fc:5321])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g40v033CDz1yJX\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 27 Apr 2026 20:59:24 +1000 (AEST)","from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sea.lore.kernel.org (Postfix) with ESMTP id AA95F3008D23\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 27 Apr 2026 10:58:32 +0000 (UTC)","from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 1221F3B4EB4;\n\tMon, 27 Apr 2026 10:58:32 +0000 (UTC)","from pandora.armlinux.org.uk (pandora.armlinux.org.uk\n [78.32.30.218])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id F13EB3B5318;\n\tMon, 27 Apr 2026 10:58:28 +0000 (UTC)","from shell.armlinux.org.uk\n ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:48392)\n\tby pandora.armlinux.org.uk with esmtpsa  (TLS1.3) tls\n TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384\n\t(Exim 4.98.2)\n\t(envelope-from <linux@armlinux.org.uk>)\n\tid 1wHJfO-000000006tA-0MDk;\n\tMon, 27 Apr 2026 11:58:18 +0100","from linux by shell.armlinux.org.uk with local (Exim 4.98.2)\n\t(envelope-from <linux@shell.armlinux.org.uk>)\n\tid 1wHJfL-000000005JE-339f;\n\tMon, 27 Apr 2026 11:58:15 +0100"],"ARC-Seal":"i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1777287511; cv=none;\n b=lrlRnJyypypX79GmNmf7lRQbk1mqXy0czGidKC+yFS/4wS10vnQBj3hH5XilVzAGuZeiefhlKNGJbgv+al1IRIzkowSZTOY48ru8RLgBC4uDPEsKBM6lG2EEVvLJ4Dwh5RGb4d+ZCkUAUgmLb3g2oklqLWAo3/y2D11BxafTbJg=","ARC-Message-Signature":"i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1777287511; c=relaxed/simple;\n\tbh=AxO39i/Ry0AFCTDc63f1eUWIAon79ipzzE9TkiozzB8=;\n\th=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:\n\t Content-Type:Content-Disposition:In-Reply-To;\n b=eLO5SHCefdHnfC32IcITrdWPzKmBMq8+06tbpFAkLJ88j/hITdftXIt2wHScTnLhFE8q03Fq142c34z9EOedY50TlYGM7yqPaTCBrImcyQLe+H8HkdVc3XHDX4ctf0wZvHebYbWePFJpYMcWvgEvFdG27N1qB3OaJWgRclWYHxc=","ARC-Authentication-Results":"i=1; smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=armlinux.org.uk;\n spf=none smtp.mailfrom=armlinux.org.uk;\n dkim=pass (2048-bit key) header.d=armlinux.org.uk header.i=@armlinux.org.uk\n header.b=mLv5x2EL; arc=none smtp.client-ip=78.32.30.218","DKIM-Signature":"v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type:\n\tMIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To:\n\tContent-Transfer-Encoding:Content-ID:Content-Description:Resent-Date:\n\tResent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:\n\tList-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive;\n\tbh=dGBdavIaqnVL2bFEtTe5Ml/xW7w8rZK2JeFY/jWQ3kI=; b=mLv5x2ELnnYv8KJwqrsZ6PgyMF\n\txIRHSKxzYv/IWoSBMYF+aHJxWRNUmzb25/HRQlzPl0kBlk/xwvz/mCaXX8qarfsw4a3rdhzQCxDwq\n\tDNKhiPptxpL1nEakVi7Fm4053EN+BaAbPTQyC4p0L/iQdvXOwEFrJummjJNqUKDR0nHE5vOsfefAV\n\t+5mVEwhxV3pdCWhPI8eZn0ruQn2KdC3ICZbvpjXapeQ6Z2k3ZOIL49UX4QNB/wWLsfyNkcSE69+fG\n\tEZOcFlQ6x0OB3rBVLdwNo/0Z/WJ2j8D21QBnQj2xDG1U3lBeUZFghSaJE80b39SSyBCaPQHSXQ5dd\n\tIDYlSPxg==;","Date":"Mon, 27 Apr 2026 11:58:15 +0100","From":"\"Russell King (Oracle)\" <linux@armlinux.org.uk>","To":"Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>","Cc":"Daniel Mack <daniel@zonque.org>,\n\tHaojian Zhuang <haojian.zhuang@gmail.com>,\n\tRobert Jarzmik <robert.jarzmik@free.fr>,\n\tDmitry Torokhov <dmitry.torokhov@gmail.com>,\n\tArnd Bergmann <arnd@kernel.org>, Linus Walleij <linusw@kernel.org>,\n\tbrgl@kernel.org, linux-arm-kernel@lists.infradead.org,\n\tlinux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org","Subject":"Re: [PATCH v2 3/4] ARM: pxa: pxa25x: attach software node to its\n target GPIO controller","Message-ID":"<ae9BR5vW_6jvNOYY@shell.armlinux.org.uk>","References":"<20260427-pxa-gpio-swnodes-v2-0-86fc24b9e714@oss.qualcomm.com>\n <20260427-pxa-gpio-swnodes-v2-3-86fc24b9e714@oss.qualcomm.com>","Precedence":"bulk","X-Mailing-List":"linux-gpio@vger.kernel.org","List-Id":"<linux-gpio.vger.kernel.org>","List-Subscribe":"<mailto:linux-gpio+subscribe@vger.kernel.org>","List-Unsubscribe":"<mailto:linux-gpio+unsubscribe@vger.kernel.org>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<20260427-pxa-gpio-swnodes-v2-3-86fc24b9e714@oss.qualcomm.com>","Sender":"Russell King (Oracle) <linux@armlinux.org.uk>"}}]