All of lore.kernel.org
 help / color / mirror / Atom feed
From: Linus Walleij <linus.walleij@linaro.org>
To: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Cc: Alexandre Courbot <gnurou@gmail.com>,
	Bamvor Jian Zhang <bamvor.zhangjian@linaro.org>,
	"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/7] gpiolib: support monitoring mockup devices
Date: Tue, 31 Jan 2017 14:23:01 +0100	[thread overview]
Message-ID: <CACRpkdZv19E49n1m0Kt9-ZpQBmjc7v0BY+VbJWr7PnoXG9QsTA@mail.gmail.com> (raw)
In-Reply-To: <1485358461-24070-3-git-send-email-bgolaszewski@baylibre.com>

On Wed, Jan 25, 2017 at 4:34 PM, Bartosz Golaszewski
<bgolaszewski@baylibre.com> 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@baylibre.com>

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

  reply	other threads:[~2017-01-31 13:30 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-25 15:34 [PATCH 0/7] gpio: mockup: extensions for testing purposes Bartosz Golaszewski
2017-01-25 15:34 ` [PATCH 1/7] gpiolib: clean up includes Bartosz Golaszewski
2017-01-31 13:20   ` Linus Walleij
2017-01-25 15:34 ` [PATCH 2/7] gpiolib: support monitoring mockup devices Bartosz Golaszewski
2017-01-31 13:23   ` Linus Walleij [this message]
2017-01-25 15:34 ` [PATCH 3/7] gpio: mockup: set the mockup flag in struct gpio_chip Bartosz Golaszewski
2017-01-25 15:34 ` [PATCH 4/7] gpiolib: allow injecting line events Bartosz Golaszewski
2017-01-31 13:24   ` Linus Walleij
2017-01-25 15:34 ` [PATCH 5/7] gpio: mockup: implement injecting events over debugfs Bartosz Golaszewski
2017-01-25 15:34 ` [PATCH 6/7] gpio: mockup: implement naming the GPIO lines Bartosz Golaszewski
2017-01-25 15:34 ` [PATCH 7/7] gpio: mockup: readability tweaks Bartosz Golaszewski
2017-01-31 13:28 ` [PATCH 0/7] gpio: mockup: extensions for testing purposes Linus Walleij
2017-01-31 14:05   ` Bartosz Golaszewski
2017-01-31 14:11     ` Lars-Peter Clausen
2017-01-31 14:21       ` Bartosz Golaszewski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CACRpkdZv19E49n1m0Kt9-ZpQBmjc7v0BY+VbJWr7PnoXG9QsTA@mail.gmail.com \
    --to=linus.walleij@linaro.org \
    --cc=bamvor.zhangjian@linaro.org \
    --cc=bgolaszewski@baylibre.com \
    --cc=gnurou@gmail.com \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.