lkml.org 
[lkml]   [2016]   [Jul]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] Revert "gpiolib: Split GPIO flags parsing and GPIO configuration"
    On Tue, Jul 05, 2016 at 08:54:36AM +0200, Linus Walleij wrote:
    > On Mon, Jul 4, 2016 at 10:33 PM, Laurent Pinchart
    > <laurent.pinchart@ideasonboard.com> wrote:
    >
    > > As we're not dealing with a v4.7 regression that would need to be applied this
    > > week, can't you propose a proper fix instead of a revert ?
    >
    > AFAICT the proper fix is to simply move the gpiod_request() sites earlier,
    > I can propose something if that's all right?

    How would that work?

    You still need to claim the pin before touching the descriptor flags,
    and that isn't done until gpiod_request(). Furthermore, it's that very
    function that calls the gpio driver request() callback, which in turn
    was supposed to do the sanity check.

    So what you need to do is to pass the desired flags down the call stack,
    and make sure not to apply them before claiming the pin.

    This may work without modifying the request callback prototype (which I
    mentioned in my reply to Laurent), but it could still get a bit
    invasive and hence not suitable for stable (and we really need this to
    be fixed in 4.[456] stable).

    Your call. :)

    Thanks,
    Johan

    \
     
     \ /
      Last update: 2016-07-05 12:01    [W:3.538 / U:0.228 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site