Re: [RFC] gpiolib: introduce descriptor-based GPIO interface

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

 



On Fri, Dec 7, 2012 at 3:06 AM, Alex Courbot <acourbot@xxxxxxxxxx> wrote:
> On Thursday 06 December 2012 22:42:59 Grant Likely wrote:
>> how about "gpio_chip_hwnum()" to somewhat match irqdomain convention?
>
> Sure, matching existing interfaces is better. "git grep hwnum" does not seem
> to reveal much related to irqdomain though?

I think Grant is referring to the similarity with hwirq. Check:
include/linux/irqdomain.h

For example GPIO drivers using irqdomain often look up the
trigging local GPIO pin offset from the irqdomain descriptor
passed with the interrupt like this:

static void foo_gpio_irq_unmask(struct irq_data *d)
    int offset = d->hwirq;
    (...)

Maybe "hwgpio" is an even better choice for the name of this.

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


[Index of Archives]     [Linux Kernel]     [Kernel Newbies]     [x86 Platform Driver]     [Netdev]     [Linux Wireless]     [Netfilter]     [Bugtraq]     [Linux Filesystems]     [Yosemite Discussion]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux