Re: [PATCH 2/7] gpiolib: support monitoring mockup devices

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

 



On Wed, Jan 25, 2017 at 4:34 PM, Bartosz Golaszewski
<bgolaszewski@xxxxxxxxxxxx> wrote:

> Add a new flag to struct gpio_chip indicating that the chip doesn't
> model a real device. When setting up the line event queue, check if
> a device is a mockup chip and don't actually request the interrupt.
>
> This way we can monitor mockup GPIOs.
>
> Signed-off-by: Bartosz Golaszewski <bgolaszewski@xxxxxxxxxxxx>

Hm. I'm not so happy about adding code that gets compiled into every
system on the planet but is only used for testing with the mockup driver.

Atleast it should be #ifdef:ed (one of the few cases when we should
do that).

But I would prefer if there was some more elegant way. Like getting
a mockup irqchip! But I don't know how hard that is indeed.

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