From mboxrd@z Thu Jan 1 00:00:00 1970 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 7EEF6C6FA82 for ; Wed, 14 Sep 2022 14:16:56 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 34D0A84AF5; Wed, 14 Sep 2022 16:16:54 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.b="qWPFJRCk"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 188D284607; Wed, 14 Sep 2022 16:16:53 +0200 (CEST) Received: from mail-qv1-xf2b.google.com (mail-qv1-xf2b.google.com [IPv6:2607:f8b0:4864:20::f2b]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id D929084B0C for ; Wed, 14 Sep 2022 16:16:49 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-qv1-xf2b.google.com with SMTP id d1so11855145qvs.0 for ; Wed, 14 Sep 2022 07:16:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date; bh=4gA5EZnXx0BvAJJzBKVPtH3FwyJSbMgKw72g/DAAhao=; b=qWPFJRCkZML4mq/znrw2oivE8B3Y/Bil8NrmGOflIWI4Roa0nTV/aOXDTakWiKwrBW eEWWHt77620cl3HNpjGj3JcL8kKJannEK5p3vwWfKzsokkHMv2zkYWOxRNR8V0CxG5x0 dZ/Q+Qf8uO+iSEPlGw0FIPQvI3pextcEgOZo8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date; bh=4gA5EZnXx0BvAJJzBKVPtH3FwyJSbMgKw72g/DAAhao=; b=S3NLMY0YS0BIM8FdQUb2DNJmvTCkyP9zTGsbsq0AE14Qm+3QaBspRyt+sMcOoaaPF4 tUuxvNlHDBI/W6o1Je/l/UE25KjDYxS6YUfgXBawfkMbdlMN07tyFjsz2yHhNXEk/GE/ ASi0F3kCG9dwcy4zCHj6S35s8/8P65R77AlbSQbM9z6cO28Y7TQ9ztwa4Zrnn2ZebXz0 +F0AV+D7oghf7GxlHP9lGt9l5P/AiLeZulYVjs1tp7bEuodbrX/Ty1XoOq3YFcstcvK/ 219jWcJemkGyq4E2NAmgbu/G9Vn9C0TH5Z20vhhLlgoPwlN6LaW2JMFnvy0q3r3fB4Cf 4CnA== X-Gm-Message-State: ACgBeo3yNZFsfpbyjoAhZR5iwkMQWZJ7FdYssWBYe9TTV2ZRhVQ2MYs8 daqFLLUafLtUZXzA83GEetfhWg== X-Google-Smtp-Source: AA6agR6bVPUSapuS+7tZSwmAqCrMe88cxe1y+EZo9pjbWyvRWJSZsQJJwYveW36y60BrR7FWZda0gg== X-Received: by 2002:a05:6214:e41:b0:496:ac31:4a4b with SMTP id o1-20020a0562140e4100b00496ac314a4bmr31949754qvc.101.1663165008494; Wed, 14 Sep 2022 07:16:48 -0700 (PDT) Received: from bill-the-cat (2603-6081-7b00-6400-f8ad-dcc3-5c01-45c1.res6.spectrum.com. [2603:6081:7b00:6400:f8ad:dcc3:5c01:45c1]) by smtp.gmail.com with ESMTPSA id q50-20020a05620a2a7200b006ce2c3c48ebsm1888254qkp.77.2022.09.14.07.16.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Sep 2022 07:16:47 -0700 (PDT) Date: Wed, 14 Sep 2022 10:16:46 -0400 From: Tom Rini To: Nate Drude Cc: Simon Glass , Fabio Estevam , Samuel Holland , Heinrich Schuchardt , Andrew Jeffery , Eddie James , U-Boot Mailing List , eran.m@variscite.com Subject: Re: [PATCH] gpio: uclass: Introduce gpio-hog-optional property Message-ID: <20220914141646.GR6993@bill-the-cat> References: <20220912175513.4178793-1-nate.d@variscite.com> <01cfeafe-980c-aad7-7acc-4957c4622aaa@variscite.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="LHvWgpbS7VDUdu2f" Content-Disposition: inline In-Reply-To: <01cfeafe-980c-aad7-7acc-4957c4622aaa@variscite.com> X-Clacks-Overhead: GNU Terry Pratchett 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.6 at phobos.denx.de X-Virus-Status: Clean --LHvWgpbS7VDUdu2f Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Sep 14, 2022 at 08:59:52AM -0500, Nate Drude wrote: > Hi Simon, >=20 > On 9/14/22 7:49 AM, Simon Glass wrote: > > Hi Nate, > >=20 > > On Mon, 12 Sept 2022 at 14:57, Nate Drude wrote: > > >=20 > > > Hi Simon and Fabio, > > >=20 > > > On 9/12/22 3:16 PM, Simon Glass wrote: > > > > Hi, > > > >=20 > > > > On Mon, 12 Sept 2022 at 12:48, Fabio Estevam w= rote: > > > > >=20 > > > > > Hi Nate and Simon, > > > > >=20 > > > > > On Mon, Sep 12, 2022 at 2:55 PM Nate Drude = wrote: > > > > > >=20 > > > > > > gpio_hog_probe_all is invoked by init_sequence_r in board_r.c. > > > > > > If device_probe fails for any gpio-hog, boot hangs with the fol= lowing error: > > > > > >=20 > > > > > > > initcall sequence 00000000fffc8e18 failed at call 00000000402= 3b320 (err=3D-121) > > > > > > > ### ERROR ### Please RESET the board ### > > > > > >=20 > > > > > > gpio-hog-optional allows the boot sequence to continue if devic= e_probe > > > > > > fails for optional gpio-hog(s). > > > > > >=20 > > > > > > Signed-off-by: Nate Drude > > > > > > --- > > > > > > doc/device-tree-bindings/gpio/gpio.txt | 1 + > > > > > > drivers/gpio/gpio-uclass.c | 4 +++- > > > > > > 2 files changed, 4 insertions(+), 1 deletion(-) > > > > > >=20 > > > > > > diff --git a/doc/device-tree-bindings/gpio/gpio.txt b/doc/devic= e-tree-bindings/gpio/gpio.txt > > > > > > index 1481ed607d..02d296316b 100644 > > > > > > --- a/doc/device-tree-bindings/gpio/gpio.txt > > > > > > +++ b/doc/device-tree-bindings/gpio/gpio.txt > > > > > > @@ -189,6 +189,7 @@ gpio-controller's driver probe function. > > > > > > Each GPIO hog definition is represented as a child node of t= he GPIO controller. > > > > > > Required properties: > > > > > > - gpio-hog: A property specifying that this child node rep= resents a GPIO hog. > > > > > > +- gpio-hog-optional: A property specifying to continue boot wh= en device_probe fails in gpio_hog_probe_all > > > > >=20 > > > > > gpio-hog-optional property does not exist in Linux. > > > > >=20 > > > > > If this property is introduced then U-Boot and Linux devicetrees = will > > > > > not be in sync. > > > > >=20 > > > > > Can this be fixed differently? > > > >=20 > > > > Nate, can you send a patch to Linux with the binding update? > > > >=20 > > > > Regards, > > > > Simon > > >=20 > > > Thanks for your responses and feedback. > > >=20 > > > I don't think gpio-hog-optional is relevant to Linux. > >=20 > > Sure, but Linux is (for better or worse) the main repo for the device > > tree bindings. >=20 > I am not understanding the action. I think you're suggesting I update the > Linux device tree bindings so they stay aligned with U-Boot, adding a > property gpio-hog-optional after this line: https://github.com/torvalds/l= inux/blob/v6.0-rc5/Documentation/devicetree/bindings/gpio/gpio.txt#L191 >=20 > However, since it's not relevant to Linux, I think it will be confusing > since it will have no effect and won't be be used in any Linux code. >=20 > Can you please advise what description I should use for the > gpio-hog-optional property so that the Linux maintainers would accept suc= h a > patch? Yes, that would be one way to go about this, and there are other non-Linux bindings in the Linux kernel tree, but this might be the first property of an existing binding, so that might also be a bit challenging to get accepted, or find out what the preferred solution is. [snip] > > > Do you have any suggestions for a better approach? Does it make sense > > > for gpio_hog_probe_all to cause a fatal error when the gpio hog probe > > > fails (most devices, including the gpio-expander, will not cause a ha= ng > > > if they fail to probe)? > >=20 > > I think your approach is fine as is. >=20 > An alternate approach is to modify the default behavior so that > gpio_hog_probe_all will not trigger a fatal error. Do you think this is > better? This too would be acceptable. --=20 Tom --LHvWgpbS7VDUdu2f Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmMh4kcACgkQFHw5/5Y0 tyzyjQwAnkGS7IejkHGLA++npNoeCk4KMEQX4hAnDQlDZ4V4NSbU+eW1ZHtK7pRL VmTIB7sFvC2FRDTQmGEr1yq90lMRnYmeY7cmnATP91u9whe7vfDLUICdyeUgO71+ 2iM36OOvVhHq+OWAL8xEeTZS2fK5LlsD7FkWLK20Vmt0Z/Dx+KClqwOVHT7Rr1Iy nfAUkYJQAKzv0X/rcKjvssAiKAs5G5wJemUINLOjysbBeoTixDf/AibVGAXm1979 RkjByHxl8JlF+9FQEdNfOcXJxAfaoatpXQKMedWQgeEUVYfAyjkOF2BIMvPl7duu Qiqg8lO5jOiH/uCf/PxAKfD9KJrrCl5cT9aHXd7rdsm7zSiWvR32jp3Sbr7T9Bwb SInjtjVd2hCetybDWsZD/89jqdJ1DdQl0TXCoMR0WoIpBYKbEqpZGBskkq0PsJSS rv6CHyo/W0yWhWkLnt+G/eGc2xiwzvT+Mz2WEBZWwnOdGIxHqDWpyMbDO8rF5As9 jVfLO/jF =7hMW -----END PGP SIGNATURE----- --LHvWgpbS7VDUdu2f--