[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y20HJe/vQPI4dWyW@smile.fi.intel.com>
Date: Thu, 10 Nov 2022 16:13:57 +0200
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Dmitry Torokhov <dmitry.torokhov@...il.com>
Cc: Linus Walleij <linus.walleij@...aro.org>,
Bartosz Golaszewski <brgl@...ev.pl>,
linux-kernel@...r.kernel.org, linux-acpi@...r.kernel.org,
linux-gpio@...r.kernel.org
Subject: Re: [PATCH v3 5/6] gpiolib: consolidate GPIO lookups
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@...ux.intel.com>
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists