From: Bamvor Jian Zhang <bamvor.zhangjian@linaro.org>
To: linux-gpio@vger.kernel.org
Cc: linus.walleij@linaro.org, broonie@kernel.org,
Bamvor Jian Zhang <bamvor.zhangjian@linaro.org>
Subject: [PATCH v2 0/3] Add gpio test framework
Date: Wed, 3 Feb 2016 20:14:33 +0800 [thread overview]
Message-ID: <1454501676-19900-1-git-send-email-bamvor.zhangjian@linaro.org> (raw)
These series of patches try to add support for testing of gpio
subsystem based on the proposal from Linus Walleij. The first version
is here[1].
The basic idea is implement a virtual gpio device(gpio-mockup) base
on gpiolib. Tester could test the gpiolib by manipulating gpio-mockup
device through sysfs or char device and check the result from debugfs.
Reference the following figure:
sysfs/char device debugfs
| |
gpiolib----------------/
|
gpio-mockup
Currently, this test script will use sysfs interface by default. I
plan set char device as default after it upstreamed.
In order to avoid conflict with other gpio exist in the system,
only dynamic allocation is tested by default. User could pass -f to
do full test.
[1] http://comments.gmane.org/gmane.linux.kernel.gpio/11883
Changes since v1:
1. Change value of gpio to boolean.
2. Only test dynamic allocation by default.
Bamvor Jian Zhang (3):
gpio/mockup: add virtual gpio device
selftest/gpio: add gpio test case
gpio: MAINTAINERS: Add an entry for GPIO mockup driver
Documentation/kernel-parameters.txt | 4 +
MAINTAINERS | 7 +
drivers/gpio/Kconfig | 12 ++
drivers/gpio/Makefile | 1 +
drivers/gpio/gpio-mockup.c | 231 ++++++++++++++++++++++
tools/testing/selftests/Makefile | 1 +
tools/testing/selftests/gpio/Makefile | 10 +
tools/testing/selftests/gpio/gpio-mockup-sysfs.sh | 117 +++++++++++
tools/testing/selftests/gpio/gpio-mockup.sh | 198 +++++++++++++++++++
9 files changed, 581 insertions(+)
create mode 100644 drivers/gpio/gpio-mockup.c
create mode 100644 tools/testing/selftests/gpio/Makefile
create mode 100644 tools/testing/selftests/gpio/gpio-mockup-sysfs.sh
create mode 100755 tools/testing/selftests/gpio/gpio-mockup.sh
--
2.1.4
next reply other threads:[~2016-02-03 12:14 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-03 12:14 Bamvor Jian Zhang [this message]
2016-02-03 12:14 ` [PATCH v2 1/3] gpio/mockup: add virtual gpio device Bamvor Jian Zhang
2016-02-03 12:21 ` Bamvor Zhang Jian
2016-02-03 12:14 ` [PATCH v2 2/3] selftest/gpio: add gpio test case Bamvor Jian Zhang
2016-02-03 12:14 ` [PATCH v2 3/3] gpio: MAINTAINERS: Add an entry for GPIO mockup driver Bamvor Jian Zhang
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=1454501676-19900-1-git-send-email-bamvor.zhangjian@linaro.org \
--to=bamvor.zhangjian@linaro.org \
--cc=broonie@kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@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).