Re: [PATCH] mmc: core: restore detect line inversion semantics

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Linus,

On Wed, Oct 1, 2014 at 9:54 AM, Linus Walleij <linus.walleij@xxxxxxxxxx> wrote:
> On Tue, Sep 30, 2014 at 5:07 PM, Javier Martinez Canillas
> <javier@xxxxxxxxxxxx> wrote:
>>>
>>> +       *gpio_invert = gpiod_is_active_low(desc);
>>> +
>>
>> The old code set gpio_inv_cd if (!(flags & OF_GPIO_ACTIVE_LOW)) so the
>> above should be:
>>
>> *gpio_invert = !gpiod_is_active_low(desc);
>
> Argh, done it like this in v2, but isn't that variable name a lie then?
> If it's active low then it's inverted, but if it's not active low it's not
> inverted right...
>

Right, the logic is confusing at the very least. I'm not familiar with
this code though, I just was bitten by this issue :-)

> Sigh, atleast we have restored the semantics, but maybe we need
> to comb over this again.
>

Agreed.

For completeness I just tested v2 of your patch and it makes the card
detection work again. Thanks a lot for all your help!

> Yours,
> Linus Walleij

Best regards,
Javier
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux