[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACRpkdbz0hyjy5U3-xo8Oi-ojB_H3=DEwuJtmoqJTJQNiAYYaA@mail.gmail.com>
Date: Thu, 20 Sep 2018 15:36:26 -0700
From: Linus Walleij <linus.walleij@...aro.org>
To: timur@...nel.org
Cc: Ricardo Ribalda Delgado <ricardo.ribalda@...il.com>,
Stephen Boyd <swboyd@...omium.org>,
"open list:GPIO SUBSYSTEM" <linux-gpio@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] gpiolib: Show correct direction from the beginning
On Thu, Sep 20, 2018 at 5:35 AM Timur Tabi <timur@...nel.org> wrote:
> On 9/20/18 12:23 AM, Linus Walleij wrote:
> > I think most gpiochips easily survives calling the .get_direction()
> > early, Qualcomm's stand out here.
> >
> > Now that we have .valid_mask in the gpiochip could we simply just
> > add this back, resepecting valid_mask and avoid checking the
> > direction of precisely these GPIOs?
>
> Can you be more specific? One of the proposals made previously was to
> add a check in msm_gpio_get_direction(), but that was rejected because
> the consensus was the valid_mask checks in gpiolib are sufficient.
What I mean is that $SUBJECT patch might not hurt Qualcomms
GPIOs (not crash the platform) if and only if it is augmented to not
try to get the initial direction from lines masked off in .valid_mask
if .need_valid_mask is true.
Whether it makes sense semantically is a different debate, but it
seems possible to reintroduce calling .get_direction() without
hurting anyone.
Yours,
Linus Walleij
Powered by blists - more mailing lists