lkml.org 
[lkml]   [2019]   [Jun]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/2 v9] serial: mctrl_gpio: Check if GPIO property exisits before requesting it
On Tue, Jun 25, 2019 at 07:27:33AM +0200, Stefan Roese wrote:
> On 24.06.19 17:35, Geert Uytterhoeven wrote:
> > On Mon, Jun 24, 2019 at 5:29 PM Stefan Roese <sr@denx.de> wrote:
> > > On 24.06.19 10:42, Geert Uytterhoeven wrote:

> > > Should both options be supported ("cts-gpio" vs "cts-gpios")?
> > > Documentation/devicetree/bindings/serial/serial.txt only mentions
> > > the "-gpios" variant.
> >
> > Well, the "-gpio" variant is deprecated, but still supported by
> > devm_gpiod_get_index_optional(), and there are active users in upstream
> > DTS files.
> >
> > My main objection is (trying to) replicate the matching logic inside
> > gpiolib.c, causing subtle semantic differences. And keeping it consistent,
> > of course.
> >
> > It would be nice if this could be fixed inside acpi_find_gpio(), so
> > users don't need to be updated. There may be other subsystems where
> > the difference between DT and ACPI may cause issues, unbeknownst.
>
> Sure, I can fix this. I would prefer to do this in a follow-up patch
> though, if nobody objects.

In case if you are going to do this, use approach from GPIO library. Perhaps,
it may require to create something like for_each_gpio_suffix() helper.

--
With Best Regards,
Andy Shevchenko


\
 
 \ /
  Last update: 2019-06-25 13:20    [W:0.567 / U:0.284 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site