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 phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0269FC433F5 for ; Mon, 25 Apr 2022 16:43:44 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 3197883C8C; Mon, 25 Apr 2022 18:43:43 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1650905023; bh=KCicGnkDjwk84xfH45OTcSWq3KWKu7yiz0gxWyTBE/Y=; h=Date:Subject:To:Cc:References:From:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=EtHle/bFvbJ4fCsjEkYXQtcIQKSY85BVxDU7PSzvXDB8BUxhC6OsdtOTTlmBc7RbV C4GbSCWyvYzf9bITxMhT1SqZk+ByJqrj10DGqYg4BJyGOQe1d4fymUs56yfUzsxUZZ 2RICBjR2ikMxyTUu/FCW06qy9ZvJoQobAtPd8W3GsqT8dk5rfD9I27agsJkCb4V1XM 2wO2kiXaz03kX7aGO4jFMeH+8f9fhmfu85V67QARu0A17EOPj84Dqpu9NDWgPTzSZf B33LgUaj4rodBMyin0eERC5X21c8uryFJuEeLVcYIkjoYIH3yPP0WYYy/tCAjyrpJF rebYyUrjOuDIw== Received: from [127.0.0.1] (p578adb1c.dip0.t-ipconnect.de [87.138.219.28]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: marex@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id 19D5083C1E; Mon, 25 Apr 2022 18:43:41 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1650905021; bh=KCicGnkDjwk84xfH45OTcSWq3KWKu7yiz0gxWyTBE/Y=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=tf1ooSFlGlWJ3N4mjsCn1rEVf+lekPAAqfDGQTyxBWs/vOJ1MYnftb4tIPm18WpbO xH+QjAzdvZiabAiYdT8YfD35YcWmPrqG4+FFo+At8k3c+m8H+ui9PpxX2YhwCCEZ/z 3J+SI0ho2rGaqDUT512Q79CrI9QuJJC/gBpk7U2bXOV+HzWS7Ms8zQReEWV6PF2Om/ H3bRFkyvBOm8poSoY8Dp3+fHxA3cBw+gC1GlMNTsIneV3vVNVwQOwM3xs46CNC/Nmw v04Yq8cJMJIi/T0eOF6xbyTJA/BrLaVuFKfsYlRsAV1309aTB93Rc24UMJWfa/cTZf ZF1I64jjKLjXg== Message-ID: <2f740706-0b64-6254-44bf-e5fd9e6e4cf0@denx.de> Date: Mon, 25 Apr 2022 18:43:40 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0 Subject: Re: [PATCH 2/3] led: Mark device instance with DM_FLAG_PROBE_AFTER_BIND Content-Language: en-US To: Tom Rini Cc: u-boot@lists.denx.de, Patrice Chotard , Patrick Delaunay , Sean Anderson , Simon Glass , Steven Lawrance References: <20220422131555.123598-1-marex@denx.de> <20220422131555.123598-2-marex@denx.de> <20220425143155.GA303559@bill-the-cat> From: Marek Vasut In-Reply-To: <20220425143155.GA303559@bill-the-cat> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.5 at phobos.denx.de X-Virus-Status: Clean On 4/25/22 16:31, Tom Rini wrote: > On Fri, Apr 22, 2022 at 03:15:54PM +0200, Marek Vasut wrote: > >> Calling device_probe() from uclass .post_bind() callback has all kinds >> of odd side-effects, e.g. device instances not being available just yet. >> Make use of the DM_FLAG_PROBE_AFTER_BIND instead, mark device instances >> which need to be probe()d in order to configure the LED default state >> with this flag and let the DM core do the device_probe() at the right >> time instead. >> >> Fixes: 72675b063b6 ("led: Configure LED default-state on boot") >> Signed-off-by: Marek Vasut >> Cc: Patrice Chotard >> Cc: Patrick Delaunay >> Cc: Sean Anderson >> Cc: Simon Glass >> Cc: Steven Lawrance >> Reviewed-by: Patrice Chotard >> Tested-by: Patrice Chotard >> --- >> drivers/led/led-uclass.c | 4 +++- >> 1 file changed, 3 insertions(+), 1 deletion(-) > > This breaks all of the sandbox tests, which perhaps need another update > for what you've changed here? I already had to tweak them once in > 72675b063b6e ("led: Configure LED default-state on boot"). But my > perhaps incorrect read then was that the dts / test weren't quite right > to start with. Perhaps that's still the case however? Pick these two test fixes: [PATCH 1/2] test: dm: led: Fix LED enumeration [PATCH 2/2] test: dm: pinmux: Get LED2 udevice in the pinmux test