From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Linus Walleij <linus.walleij@linaro.org>,
Bartosz Golaszewski <brgl@bgdev.pl>,
linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org,
linux-gpio@vger.kernel.org
Subject: Re: [PATCH v3 5/6] gpiolib: consolidate GPIO lookups
Date: Thu, 10 Nov 2022 16:13:57 +0200 [thread overview]
Message-ID: <Y20HJe/vQPI4dWyW@smile.fi.intel.com> (raw)
In-Reply-To: <20221031-gpiolib-swnode-v3-5-0282162b0fa4@gmail.com>
On Wed, Nov 09, 2022 at 11:30:43AM -0800, Dmitry Torokhov wrote:
> Ensure that all paths to obtain/look up GPIOD from generic
> consumer-visible APIs go through the new gpiod_find_and_request()
> helper, so that we can easily extend it with support for new firmware
> mechanisms.
>
> The only exception is OF-specific [devm_]gpiod_get_from_of_node() API
> that is still being used by a couple of drivers and will be removed as
> soon as patches converting them to use generic fwnode/device APIs are
> accepted.
...
> + if (!IS_ERR_OR_NULL(fwnode))
As pointed earlier I still think this is not needed. Even for the sake of
showing an intent, the not-found fwnode(i.e. GPIO), will be handled anyway...
> + desc = gpiod_find_by_fwnode(fwnode, consumer, con_id, idx,
> + &flags, &lookupflags);
> +
> + if (gpiod_not_found(desc) && platform_lookup_allowed) {
...here by gpiod_not_found() which is an exact intention in both cases above
(fwnode is not provided / invalid or GPIO wasn't found).
With this addressed
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2022-11-10 14:14 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-09 19:30 [PATCH v3 0/6] Add support for software nodes to gpiolib Dmitry Torokhov
2022-11-09 19:30 ` [PATCH v3 1/6] gpiolib: of: change of_find_gpio() to accept device node Dmitry Torokhov
2022-11-09 19:30 ` [PATCH v3 2/6] gpiolib: acpi: change acpi_find_gpio() to accept firmware node Dmitry Torokhov
2022-11-09 19:30 ` [PATCH v3 3/6] gpiolib: acpi: teach acpi_find_gpio() to handle data-only nodes Dmitry Torokhov
2022-11-09 19:30 ` [PATCH v3 4/6] gpiolib: acpi: avoid leaking ACPI details into upper gpiolib layers Dmitry Torokhov
2022-11-09 19:30 ` [PATCH v3 5/6] gpiolib: consolidate GPIO lookups Dmitry Torokhov
2022-11-10 14:13 ` Andy Shevchenko [this message]
2022-11-10 17:24 ` Dmitry Torokhov
2022-11-09 19:30 ` [PATCH v3 6/6] gpiolib: add support for software nodes Dmitry Torokhov
2022-11-10 14:15 ` Andy Shevchenko
2022-11-11 21:49 ` [PATCH v3 0/6] Add support for software nodes to gpiolib Bartosz Golaszewski
2022-11-11 22:06 ` Dmitry Torokhov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Y20HJe/vQPI4dWyW@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=brgl@bgdev.pl \
--cc=dmitry.torokhov@gmail.com \
--cc=linus.walleij@linaro.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).