From: Bartosz Golaszewski <bgolaszewski@baylibre.com>
To: Linus Walleij <linus.walleij@linaro.org>
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 0/7] gpio: mockup: extensions for testing purposes
Date: Tue, 31 Jan 2017 15:05:41 +0100 [thread overview]
Message-ID: <CAMpxmJU4GJ43fSU1SPFgN6e5pNw3zr4CQmmB_kq81ZtUHS-MYQ@mail.gmail.com> (raw)
In-Reply-To: <CACRpkdZfnJABCOOsDYap=3OLdLHTMFZdg5EV5g3fMNt+erL3zQ@mail.gmail.com>
2017-01-31 14:28 GMT+01:00 Linus Walleij <linus.walleij@linaro.org>:
> On Wed, Jan 25, 2017 at 4:34 PM, Bartosz Golaszewski
> <bgolaszewski@baylibre.com> wrote:
>
>> This series proposes to extend the gpio framework by allowing to
>> inject line events from the kernel code and by providing a debugfs
>> interface for that to the gpio-mockup driver. We also allow the
>> user to request that the mockup driver name the lines.
>
> I sympathize fully with the goal and intentions of the series, I
> agree: this is awesome to have for testing and validation of
> GPIO.
>
> I'm reluctant about the changes to gpiolib and want to make that
> code as optional as possible, definately #ifdef if nothing else
> works. Otherwise the memory footprint people will get me for this,
> haha. ;)
>
> The absolutely best would be if the driver could inject "real"
> irqs and also exercise the gpiolib irqchip helpers. I have been
> vaguely thinking that sofware interrupts should be able to do this
> but I'm not very versed in that kind of stuff.
>
This was my initial idea, but I thought it's not very likely that
Thomas Gleixner would allow me to allocate a new software interrupt
just for the sake of testing gpiolib. Also: the handling of softirqs
seems to be a bit different than regular IRQs, but I'm too not an
expert.
> The changes to gpio-mockup.c are entirely uncontroversial, it
> is for testing so I'm willing to accept almost anything if it looks
> maintainable and helps in testing.
>
How about creating a new config option GPIOLIB_LINE_EVENT_DEBUG that
would be selected by GPIO_MOCKUP and enclosing the relevant gpiolib
code with ifdefs (+ potentially comments explaining what's being done
and why)?
Thanks,
Bartosz
next prev parent reply other threads:[~2017-01-31 14:06 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
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 [this message]
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=CAMpxmJU4GJ43fSU1SPFgN6e5pNw3zr4CQmmB_kq81ZtUHS-MYQ@mail.gmail.com \
--to=bgolaszewski@baylibre.com \
--cc=bamvor.zhangjian@linaro.org \
--cc=gnurou@gmail.com \
--cc=linus.walleij@linaro.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).