Re: gpio desc flags being lost

From: Chris Packham
Date: Wed Jul 03 2019 - 17:31:01 EST


On 3/07/19 9:29 PM, Chris Packham wrote:
> On 3/07/19 6:28 PM, Linus Walleij wrote:
>> On Wed, Jul 3, 2019 at 7:35 AM Chris Packham
>> <Chris.Packham@xxxxxxxxxxxxxxxxxxx> wrote:
>>
>>> Doing a bit of debugging so far I see that after startup the desc->flags
>>> for those gpios is 0. But for the hogged ones it should be 0x800 (or 0x801).
>>
>> Yeah that is wrong.
>>
>>> I'll do some proper bisecting tomorrow, but figured you might want to
>>> know sooner rather than later.
>>
>> Thanks, I have another critical GPIO fix queued so would be great if we
>> can fix this too before v5.2 is released.
>
> Bit of an update. v4.19.54 works, v5.1.15 is broken. I'll keep bisecting
> between those tomorrow.
>

The problem is caused by commit 3edfb7bd76bd1cba ("gpiolib: Show correct
direction from the beginning"). I'll see if I can whip up a patch to fix it.