Re: [PATCH v2] gpio: add userspace ABI for GPIO line information

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

 



On Mon, Feb 22, 2016 at 1:05 PM, Markus Pargmann <mpa@xxxxxxxxxxxxxx> wrote:

>> +             /*
>> +              * Userspace only need to know that the kernel is using
>> +              * this GPIO so it can't use it.
>> +              */
>> +             lineinfo.flags = 0;
>> +             if (desc->flags & (FLAG_REQUESTED | FLAG_IS_HOGGED |
>> +                                FLAG_USED_AS_IRQ | FLAG_EXPORT |
>> +                                FLAG_SYSFS))
>> +                     lineinfo.flags |= GPIOLINE_FLAG_KERNEL;
>> +             if (desc->flags & FLAG_IS_OUT)
>> +                     lineinfo.flags |= GPIOLINE_FLAG_IS_OUT;
>> +             if (desc->flags & FLAG_ACTIVE_LOW)
>> +                     lineinfo.flags |= GPIOLINE_FLAG_ACTIVE_LOW;
>> +             if (desc->flags & FLAG_OPEN_DRAIN)
>> +                     lineinfo.flags |= GPIOLINE_FLAG_OPEN_DRAIN;
>> +             if (desc->flags & FLAG_OPEN_SOURCE)
>> +                     lineinfo.flags |= GPIOLINE_FLAG_OPEN_SOURCE;
>
> I just noticed while working on DT name parsing that these flags are bit
> numbers and not the real bits. So we have to use test_bit() here. I will
> send a patch later.

Ooops don't worry I will fix it and send a v3. If there are no
further comments I will then  APPLY it so we have this in
place for v4.6.

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



[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux