From patchwork Sat Nov 18 12:42:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 13460023 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 4E49AC2BB3F for ; Sat, 18 Nov 2023 12:43:56 +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=9g9l1zTFW5q1e9FWcFtvVSrO6gvSdIg3xu06qnjX3HU=; b=TTHlALifE5E0Ap BgPvJWYyb1L1uTxv+nymSE+dzD5skijxOq2bc/pwtrK6mMc0Pewh4groPGlV7KFpA+4aXYC0gygjy xLF/rt4XFO7n8PS/1+bp7aLJKpCXYeK7xdtToW2b1hRZETXhwVlvZ0K9Fb2UTfmvqq6zz3JtO0hAH SasIzJ1k2ErihZp5MP0AvXAj4i5Alibo9NNOEVP4PxfEW2iqFNfZPr0Ajx45CgyDCCVX8acG8RTJY 6DfkjqbrexVfggTfG3xaCKuiXTFpKnDujdUS7RIoy/JAXS6G2pmUcohOl3yaf0QNaEIbe2xZn0IBV lrkOY2Q7+1KtAz7nu6ig==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r4KfU-008UFP-2s; Sat, 18 Nov 2023 12:43:24 +0000 Received: from mout.gmx.net ([212.227.15.19]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1r4KfQ-008UE3-29 for linux-arm-kernel@lists.infradead.org; Sat, 18 Nov 2023 12:43:23 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=s31663417; t=1700311390; x=1700916190; i=wahrenst@gmx.net; bh=HR6koxbLHfU1PLH0ktzrr5zUB6pdF380Odvqsc1xiIM=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To: References; b=ShYQcOd4tpfW3XLxvVlVBjDyYnX5dK/frOoTIAqRpxzULLYyrrPycc6wNBMjlwJH P/dvXPNLL6rgdiPf3q6Cp4CQuxbwAMJXM64+Gx9F8Phxy09ZhG1p0wKHK9nqV7fc9 B82l2TS13h3JnT3ZiqHYqCxfCvbB9zM2o+2wnHN6xDbbiDhUiVC7mTFaqWtpxah/3 93m6b/rZxOj+UTmFQUh9GV4S7EbWjM2e1MY9dRPxIfpCERTLK1rSvDPcLhfh76A2H IAUb8zSX9SW5YS9aEOyD1zR4XTTa6U786JH3dHo2gmNRQfALi+nhWl2f4a3xOXViY XAJiJxMJFEF5FEFXtQ== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from stefanw-SCHENKER ([37.4.248.43]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MplXz-1rgvbf20WD-00qEDd; Sat, 18 Nov 2023 13:43:10 +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 V2 1/2] leds: gpio: Add kernel log if devm_fwnode_gpiod_get fails Date: Sat, 18 Nov 2023 13:42:51 +0100 Message-Id: <20231118124252.14838-2-wahrenst@gmx.net> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231118124252.14838-1-wahrenst@gmx.net> References: <20231118124252.14838-1-wahrenst@gmx.net> MIME-Version: 1.0 X-Provags-ID: V03:K1:q0GAkZRr/Y8I8XzOn+mDTl/H/sY92WAqSgmUYSEt5pmAX/cvP3N uEMbRNS3dZUv8ILqHj+aB8aAQJ78G0421D8rJ1AUBascm8GEneQgqdsy+7VUbW5K8kI+Fe3 5loHFX7J08vuKaDa62IK8j95nIleUXZQ+aMbuIQV8t93fMnLpxCuahH8rqpHyrW0FtYtACl UOgnquNua4NeHe6Y0F88Q== UI-OutboundReport: notjunk:1;M01:P0:Cj71fqjZ0iU=;ka7CUlJQN91shKmH2E5i+lXDr5M 1+MPu2OWcXGNoSVMfZT/h1zAV5K/mSH6rCvzhiiQ5Wtyt31YFdjW4mMg7ccYFdQ3SzOdSH9/C ySKdj1uJjxwFONk3c22TgJ7inbY5tv+i2Sgv4AJQEeg7eQ4I3sSGQ3/jgZmqLeMHXxMQn59Pg ekOkSX5ayo+50WvR4Y3mqAjyouVjAQPGJlHh2mm1jCRsgKVV2cbzGkwRaOF1fL9AwBNBVnusX WeOaWsxmhC3JxAkyNRuwXbUMr8nNrvplFE/pfkEuS4kMO8sv2Vm0aQR4dh0LLi22J8AcpoULw Pz4i/SrP/kof4J7NijxgekbsjUTYNlD6QtzjaVg48R6TLUb2ELoqqBB84PZd45jJTnIdQrLUv Dd8iQ6oo9PgRsD0RWWoe2I2O/2HZphmTY2NfPp5hz0060ac7uV3kuceH8DaGOSRU2JgBZ8AYN cVqAn90SFm5GogFdoBCHMDk4SwPa2I/3CXC96KiHC8F8RFE29/8MSuk5eSj/p9a8s09lqNNxu 4q1csLhhltcKyi+laC5Mm39T/rN92JaOPA9r9aWW5E8L3Q1B1RUiRQ38GdjVxjeGhDuakLE61 ky/ZD9Ox71FlJ2QxZ9JLKrW054ylujJ4zsruiLYDxGPl3nscWgGq0oHKZEzW6RoSijiJOJgUo vJkkyHa2Yvut1xkTrvWDNqa2fpGu+Gx8boVw/8d5dl2eVWonoO9abSH6Nna3OGUna1b8lZt+b 15Ldxm3XvVBsSp7ztvsBCNarozVQWhthfyC0s8Wbgm+tT1DQitLoBhjCP9zOu21lBf2bGy+Wj wm1Rjc5ZsZ3Z2IoKOAvliWP5ldyWB16Tv07VFCIeRnYyYdzD82vUEnMEiwRPhYIVG6xoeuLPN ok74Oe8t6qs/4lbh+BAqWobx11rhR3ymOa9r3N1ACxPqu+dCODVdVoZhwEzcF4T8q0NbQWvwq le5uZSVhkcjg7lQhIcFEuG955i4= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231118_044321_340244_BA2AD62A X-CRM114-Status: GOOD ( 10.72 ) 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..0159cedffa9e 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_probe(dev, PTR_ERR(led.gpiod), "Failed to get gpio '%pfw'\n", + child); fwnode_handle_put(child); return ERR_CAST(led.gpiod); } From patchwork Sat Nov 18 12:42:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 13460024 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 98084C2BB3F for ; Sat, 18 Nov 2023 12:43:58 +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=YZmalsLk8fzS3E a0x84qmtSnNJzPHeIlkgU/PwHDkGM1X+lFqv6DggRGwgricHPiwbjT5NIzxDsPUNJFt5351tVfPMK 7sb0sweg15q+4ghMnaU9Gr5TyCnYTiVuV0Vm3Yhqpxaf7UESZNjnp3mIIKP+DKwIsCbrPx9p3M8OL D5T6Iq0kyGMkl4xjWJMzTYRqPXSNiuIRDJm974ecG1ajCQZPkAfrAccDtBe3VCe90FJYDEg3fXLuD 6NXy+IsiOl2gfHQyJOgICY5p/DSta6zcUcI8zGhoYXNv/ng7RF7CrfkgkU7MYLiv3CWB+LuLPeMeI kSD9xcPYotZSKeKjKWKg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r4Kfb-008UGJ-1w; Sat, 18 Nov 2023 12:43:31 +0000 Received: from mout.gmx.net ([212.227.15.15]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1r4KfQ-008UE4-2U for linux-arm-kernel@lists.infradead.org; Sat, 18 Nov 2023 12:43:24 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=s31663417; t=1700311391; x=1700916191; i=wahrenst@gmx.net; bh=uE3UgaMWX691oAfqe3827yIFDo67qS1ai4DImMS0WyQ=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To: References; b=SZAcbAsKE95527j4cZy41RIF/9MVkwmU5zN2itUAkvJnKizu8ZF6Iu8U+DTZugfJ FlBsPoI2Uphr5hLLC8PeAy/X24innpwOb/2kqMtCoL294M2PV/W3fWZNAEjG8x/Wl usEzA8SwD9qtPK3W2mmRA0GO3qsErUCd61AjCDMcTFKM5CWuTyagmVw0kt8Fo4rNe 7VmHO7L7snm8EP9bjFwcwPRrqvr+hqzmqR92ybaIYGq9NI9U0VY1zv7lgp8sUVqGi iuNioI+bw7c8D920E5tChNh4K9C7cAZtfiXVFehitPo34/Ms/2HieYUHcM2YHti2t 3nCIg+Blrvy9gwpbKg== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from stefanw-SCHENKER ([37.4.248.43]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MRCOE-1qjUOA3q6e-00N6Vg; Sat, 18 Nov 2023 13:43:11 +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 V2 2/2] ARM: dts: bcm2711-rpi-400: Fix delete-node of led_act Date: Sat, 18 Nov 2023 13:42:52 +0100 Message-Id: <20231118124252.14838-3-wahrenst@gmx.net> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231118124252.14838-1-wahrenst@gmx.net> References: <20231118124252.14838-1-wahrenst@gmx.net> MIME-Version: 1.0 X-Provags-ID: V03:K1:tUqmj8fVqWa6a8fOCIKp6khTGQuGLFarRxUH2BHqKTL3thukt8s VvsH4PdKf+JtRufzia8ap+dVrpby8R+WGeBBlWgxRO3cP7+xmtdUZKY0l8rgiaqI4zyuxIX K/3B3ugJ49Jp9wArswTZPe5LwBE5PjNM/F/AoRQCmgmtHcCKxAR+tADHfgl/Xcs/YK2H8OS RpReDNBLc6d2iqcZStmBw== UI-OutboundReport: notjunk:1;M01:P0:AiN5NzomRGw=;PbOc9bN2KdSP+tn+MysYfgRAFsb M8Qd4U4G2D0RJZdYteCs44gxio2zidBg6MTrBHH5uReupAr3xaCkhk8QykdJ3vha1Z1BJFAkI XNfCL/sJ5S79eIGy+RJpNeC6HZqj/FlhYHgZuVquoFf93gLg3jYS5ennq8S53O0g41O8MezqI 0ZGcpoTKFYX+m7eWd/yv3yLlonUcgFcew4cU0pwcarOwKGSHiGI1bXFufGcTnRxhSG++jrn4/ 6GjXb1eDFRJLZjLUDCC0oGagSHz8FCXq0lEkmfAiTV1xMY1/xVRw6PjxUG2tsbNdQaoPKE6p6 8IwzBPpg5xdnHWaAhyGrKB8LkPXrHAnzAIleceOh7eE3JH4fbbd9n3/RQ6Q43yAJ0c+bYiQqq yNV7z4l6MCZ/He8SDfj92sGr+jUKTAMC9FOczJI8oisjPpuNGiqvqOuP7X2yrvBoqjFFiZWKv d3euh4PuNv6CysIrDc8W59OtuYlSrcZLopZZ3Eejd5RYnz9P54Aq1FD7kwnsmrcSF6I3VElnc dC4YGKiLcbNMH94BsZZu2AqqJBY+0eaQvDfsbJBmam5hJTiNUbTFZak4/ue/dACbr1Ei5vCP0 UG4RZ3pjs+tXvklS0IXakbd3P6y/DEDVTaTABazjAiB52v9X8jUUzmVJiei++XfwFW4519srY vID0hpvV1oGLfzVld+sPsb21fGcno8NFe40Q/N0IB0JzMPzfmNMSb4MrHpjFoJJCYS140GHir fHFLDZD6vb6KQDRvBmpywygAvU33HjcM2LxEp4Ea+yERC8V3pENKa/CNyCh0ymGf9iALpTcy/ u2DQLjubohANI7uKejnm4W1eTbOelH8wh4E6Bvw1Jd4SRAQX4uZigDdTWGTBjmm5imVN0jreg 4LbdR5NFysnxPU2yMQGllj8ae4iMJeVA6+Y0OhRZDmKXtoi6ResBwfeb/6yqS4RzwvEJ1yvtE YEW5Sg== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231118_044321_337175_49DA4642 X-CRM114-Status: GOOD ( 12.07 ) 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;