From patchwork Sun Nov 5 15:49:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 13445734 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1F119C4167D for ; Sun, 5 Nov 2023 15:50:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=2G1pL7iEvkwHHATAWEkAGC56khtAdjsMa1YxdFDklzY=; b=dBPu5e/ssh/mWb nLKbsRT2rDbxf05K6317h7jGn6jETB9s4awVt+zsGt60qDflYfdjZATxaVXjDMVRhAZLlgtlmc51s tDvlamD+XouXC9R4un+06wk+oOGDG30QxPJyQD1mGveB/nayYm2Gv97Lu9Q7552Uh01K2Hd2y88cL BpmQKDMHGx3RbD0WHIdjyfkfB7qRlC2lib+9XrIsBDw7gCt91dH0ENoBubShtcsCXMnHUJ69d89a9 9pVdoM8eQY8T1wrDysarQyyjCFt65kyWxVo8rcpRMQtGmUZHByCT/r3O5vzifMevNZb7L8tPEFPm6 MaXOgvT9Q69KMpyQ4eAw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qzfOH-00F7fK-0R; Sun, 05 Nov 2023 15:50:21 +0000 Received: from mout.gmx.net ([212.227.17.20]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qzfOC-00F7eB-1A for linux-arm-kernel@lists.infradead.org; Sun, 05 Nov 2023 15:50:20 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=s31663417; t=1699199407; x=1699804207; i=wahrenst@gmx.net; bh=E+uuZK0fZ3sQgZHVpDH9aNXrkwpKbdWZFY3Elss2xDQ=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To: References; b=ZwJDjVwYRbGPevbhaFM0qsTduCZM2KzCnMDYYpF0t9IeiOFqJ+X7lyZT4STn6lWd QazMipWl4onwbZoXG1kTz2MIR9yW0SAyBrXg+LOF8+rSGY476cpZbmhLwdVzBIqtm eyAB4CuYteN6W9WhFtepprcbcAGEFbLQmfzNeGa09lRS4yXgR610ZIy83McJdOy5v 3FhcJZ9Fyd0D3EEIilxEiA9b4kneWugklUQsLJ4y1y6Lysea3By6zBWIY/wymUypn h/jZ0c6U7Ipzf9s8QmpuUo2MNn5Dzm6rw2K67id7Ec5F3NxV6qfR+kHg8jbdLJv26 a5GaPDru1eGufMAGxA== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from stefanw-SCHENKER ([37.4.248.43]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MxUrx-1rNUhT3KyP-00xwLd; Sun, 05 Nov 2023 16:50:06 +0100 From: Stefan Wahren To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Florian Fainelli , Pavel Machek , Lee Jones Cc: bcm-kernel-feedback-list@broadcom.com, Andy Shevchenko , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-leds@vger.kernel.org, Stefan Wahren Subject: [PATCH 1/2] leds: gpio: Add kernel log if devm_fwnode_gpiod_get fails Date: Sun, 5 Nov 2023 16:49:39 +0100 Message-Id: <20231105154940.97688-2-wahrenst@gmx.net> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231105154940.97688-1-wahrenst@gmx.net> References: <20231105154940.97688-1-wahrenst@gmx.net> MIME-Version: 1.0 X-Provags-ID: V03:K1:g/ABuhNfhXEgaEmxztr++3ouhCxeHfxNMdLitbdYTdQ59lcT/U+ loEAX3JHHDZHeY9sEhOMMVqilQ/3jszY3gcwmD8epmHJGDVXZpzTePmpM3J4ezMUwqJQGN9 3tPjlakiHQyIRY0jyu/2e7Xpbp5Wo0v93tTdW1uLkdM44FENOLItTalR24CF0g8zY1I4FNd c2T/JJQ4DutGgyhWHGTSA== UI-OutboundReport: notjunk:1;M01:P0:WebLp+kRBqU=;4NJHIe8pJZo2cbOAe8i7xbf8s6o 0jxPVeP0txTadlj25G7EaIT7WgI+1jHygu2Lmc+DepnPISI4Q4Mk7mQ+cYatVQkiVOnBMpQJq UeXVxIAVOdAFKNjJbB1KpsiCJw2FtpHR1hbqq41pKww5SsZL6RBtR1nL8qrxata2ITgqL/kza 4Yf7LqXTG2Ajt0N+k+UNPeiFfWdWub2gaSIsFZ44eQGPO8y7coY9+kllUEXiasY/ARFi8OU5Q yNUQOyQUJgaryivY0NGQuhXpIf3HKPhZ424kvnLThGUrRBT78XtSFRqKoSxFB4HIaIprkGktR N3junhRKJAJyzLfFsoduiBIt55B81POznYhSVgHsuTt/WyjN+gQv1Chh5enkQcQe9IcxPdG92 MAA64ZIEiKOJNog8nlM6oQb+ZU01kcqPHsnPjnzhXIPwnZ3/OzA01SHClSslnneDV8LGvJXte 51N8iksdYpkwdZPwkCMo/teqtBALTuIEt4Q+/px8ZP6P3WNawr+jhFgUQrE/uKznAQ7MmbP6a IdvXdSueqqZJCqY+tWpHD9BgGBDFG1hcnum8vCTGr9X8iTX36VXhA3hdwfPFfw07Na7PcJNNa 9jOfWE2qHoWwHXFZLZOd35upSF/E57b8FC2Gbv75TBTGFIxR1FduQ1YvoPYo1XB1MMCKnbVqU BaCxMgm89gJGo56/TAFL6ALE863ZPg0VBNlahk0y+gedr7KqaluXh+ktUJB7BD67NUm/vrNHt E3+nD+YOk0zW3HmuI0GJ5A4eyZ7B1N3y9my/rVINubvNRySFGq52BOwVcZpT9psTdlS3yAh17 mjUGfUfCcE1svLSDBqncCv4JK8/F5xi2EwopJF+QjUJrxjpndwiubyeSiRQyHx97lO7Gp4Msb ptYZtSEdfRt7MGIMlFNgmgDCRoOUb1Kt+s3d4XLMRmISSsOMO+2RDbP/xaXSBzo9CG/4bdMgV /HWS1Q== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231105_075016_799449_51CFC46D X-CRM114-Status: GOOD ( 10.98 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org In case leds-gpio fails to get the GPIO from the DT (e.g. the GPIO is already requested) the driver doesn't provide any helpful error log: leds-gpio: probe of leds failed with error -16 So add a new error log in case devm_fwnode_gpiod_get() fails. Signed-off-by: Stefan Wahren --- drivers/leds/leds-gpio.c | 2 ++ 1 file changed, 2 insertions(+) -- 2.34.1 diff --git a/drivers/leds/leds-gpio.c b/drivers/leds/leds-gpio.c index 710c319ad312..284a9e66fd9e 100644 --- a/drivers/leds/leds-gpio.c +++ b/drivers/leds/leds-gpio.c @@ -172,6 +172,8 @@ static struct gpio_leds_priv *gpio_leds_create(struct device *dev) led.gpiod = devm_fwnode_gpiod_get(dev, child, NULL, GPIOD_ASIS, NULL); if (IS_ERR(led.gpiod)) { + dev_err(dev, "Failed to get gpio '%pfw': %ld\n", + child, PTR_ERR(led.gpiod)); fwnode_handle_put(child); return ERR_CAST(led.gpiod); } From patchwork Sun Nov 5 15:49:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 13445732 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id F41CDC4167D for ; Sun, 5 Nov 2023 15:50:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=IxoH0YdG7f65ZpLcIUcklG6syhdaDyVI2Llj9c+NLY0=; b=Wx7gqY4BK2Fw9a jAk8R/mTWgnhr5Mv6V8Kx4DjGz6IwA61DaT5N6I45O3b5VB6kRV4/t5KH9fgbiDvbAo8rhjlkrrpy wYkgVy0i6J7iEgxIYJcC6nDO43I79y9Ux0stq/Ot/MGUtfJE5bgIYLzZ4irkXaku90RugLMXXM8ey QZqdvS5MoGIAF2S5xwyb89avjEnskFC7KOQ7UEttUYZP4QN24S4SfT8iXS6FsrgQ4ReF+PQzR5pRO gGcAbovXfa6OBjLJg2inFMy5kaV8MEJ4Xwa2xNVVQhpVRuJaZc66XjjYaiSkOpEbmcu/FCeN0JkHA OnHin95H/eC7+r0+v4Fg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qzfOL-00F7gD-0r; Sun, 05 Nov 2023 15:50:25 +0000 Received: from mout.gmx.net ([212.227.17.22]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qzfOG-00F7eJ-1u for linux-arm-kernel@lists.infradead.org; Sun, 05 Nov 2023 15:50:22 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=s31663417; t=1699199407; x=1699804207; i=wahrenst@gmx.net; bh=uE3UgaMWX691oAfqe3827yIFDo67qS1ai4DImMS0WyQ=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To: References; b=qyxjDqzTe6CkwKH4t4pExQHehM3dRSOJGYz1DuFAg1szidA/2FdA/jPzL0RgVkbV pJ1AitIcwVQiEG7yvEvLwmJLZgayT/M4F1O8HqD4ukVTnQ295gmFfUQ8EesIvv449 aMitE43e4IsMRox4Ek8Y4kh3PscUDZNdGuXyLebe6xmzN7aWETGQYtMwpr6/mTvNP zQzWiakoYY9lMrasfEcICgbg0YJUU41voA7uP+IvS9bhJsT2yzCCZv2GVqv1r8L9y awxTnFQ9TzuDgQ8rmNhq1uKe0PTEX1r6fsK6LjvtUuwVL/bio4MtdWv8Iz+pQhuhI xmSZLkcqMkvggyIEeg== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from stefanw-SCHENKER ([37.4.248.43]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1McH5Q-1rZp110qa4-00cgRM; Sun, 05 Nov 2023 16:50:07 +0100 From: Stefan Wahren To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Florian Fainelli , Pavel Machek , Lee Jones Cc: bcm-kernel-feedback-list@broadcom.com, Andy Shevchenko , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-leds@vger.kernel.org, Stefan Wahren Subject: [PATCH 2/2] ARM: dts: bcm2711-rpi-400: Fix delete-node of led_act Date: Sun, 5 Nov 2023 16:49:40 +0100 Message-Id: <20231105154940.97688-3-wahrenst@gmx.net> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231105154940.97688-1-wahrenst@gmx.net> References: <20231105154940.97688-1-wahrenst@gmx.net> MIME-Version: 1.0 X-Provags-ID: V03:K1:yE+EMzZ0PR2YLKgEndDFQodmVFovqB414WbBD1C9qQ+A+8/gjuo //PQfm6b4pGhNkJ6xcoUQSWVy3uLFzZvcnT63BdTH5Fd8gN9faaScbM/xIBa/zhk5KAZGUz DWhZiSKXl222Gc3CWBPBycSd4vAD+lM2SxeHBMxzjDPhgoUxGpNVlHS9BijMTCn/Zpr/hgD CIucu/YEjdlM1zBvk8X9Q== UI-OutboundReport: notjunk:1;M01:P0:oox4eGqyIoE=;IAyfsC81YxD0LyoyaNG9SZs4sP4 0eG2SjqnHL39KzNxpbBjDp9yJWMBcp5pDtsLh1vmJ3MEJOqEnEMv0tcrc9ZIbAtBxv5x+4jje Jv0wB8uW4flpAiHTAto3HAb2pwWzMEsTyzNfiR19bKKoRrMA9aUfIEubI+ovoJUGDBHsYsbr4 N7c/juyeSgwBFyD4cCkzJhpOlEMIsYIgWsNgLJrDPJLx3t5nNioRfJbIle57KXN9dQ9muNLwk GBFzXd5uPGJp46oTRBQXBySie/CwMETyN1Rg/PMgfKiBYk28S4ixq3kYFgUl8Lfdbg1eD5vY9 mkVA8wx5QeRXi5NNtYdeMYFrJrOKDBDSTreCPYKVlF5+/yjd3A2yMiO9KiDsCSCmMLM8obwGx 6CHvZdBMNsqpEg+IpdfVQMP5b+2p6YYRxSfmI75MwEpIeC0EtjFtSSESiHTBJ3wJcIo5Bjt21 vwX56VhUd3/poeduxVzSGc8i91uLqhcrZERnQfP7q+o1wjn7o9BKqVP2UXIMD8yz/EzaDucMg 3d4RazkXyLl84xKMoTK/u0rbbs4GwtzUqQNpazLwvJHCiAzlT+rbeKIJqayCgrw/dL/+e9H7Q 4VbU82L0khL4ih4qW+JbFc1gZdYJefN7h39A5L5DN3ozFaRpVwyKfafToQR1CK+4U3bbmpS2N ObWaqISNoonJZvtqE+pUP3QtXiF02wHA6VeAj5zkbpGMFXCRCqR2crllePk/AqLdJ6QsQ+bax EIBRGJzOTqBPGvBZ7+TYC+NA1rj9//B7V6+eMUbdM4DIhvlrGya36txUCBFIehKy24ZWhA/od wXjNPVNi7UYOylsDCdzUs3SKEwv9KiSAFWRI/EGzKjmLrR6Df/KhcGrajfokmYbBDefgbNARj qjPIPm1jJPviVUHiFmVbovuix4cuUTD0alyvt9ygHoFmgsYazNTXcsLzdAIup5813DrPBfpSg G/AoIg== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231105_075020_918046_8C60E421 X-CRM114-Status: GOOD ( 13.37 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The LED ACT which is included from bcm2711-rpi-4-b doesn't exists on the Raspberry Pi 400. So the bcm2711-rpi-400.dts tries to use the delete-node directive in order to remove the complete node. Unfortunately the usage get broken in commit 1156e3a78bcc ("ARM: dts: bcm283x: Move ACT LED into separate dtsi") and now ACT and PWR LED using the same GPIO and this prevent probing of led-gpios on Raspberry Pi 400: leds-gpio: probe of leds failed with error -16 So fix the delete-node directive. Fixes: 1156e3a78bcc ("ARM: dts: bcm283x: Move ACT LED into separate dtsi") Signed-off-by: Stefan Wahren --- arch/arm/boot/dts/broadcom/bcm2711-rpi-400.dts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) -- 2.34.1 diff --git a/arch/arm/boot/dts/broadcom/bcm2711-rpi-400.dts b/arch/arm/boot/dts/broadcom/bcm2711-rpi-400.dts index 1ab8184302db..5a2869a18bd5 100644 --- a/arch/arm/boot/dts/broadcom/bcm2711-rpi-400.dts +++ b/arch/arm/boot/dts/broadcom/bcm2711-rpi-400.dts @@ -36,9 +36,7 @@ &led_pwr { gpios = <&gpio 42 GPIO_ACTIVE_HIGH>; }; -&leds { - /delete-node/ led_act; -}; +/delete-node/ &led_act; &pm { /delete-property/ system-power-controller;