linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/5] Add gpio test framework
@ 2016-08-31  9:45 bamvor.zhangjian
  2016-08-31  9:45 ` [PATCH v3 1/5] tools/gpio: add gpio basic opereations bamvor.zhangjian
                   ` (4 more replies)
  0 siblings, 5 replies; 13+ messages in thread
From: bamvor.zhangjian @ 2016-08-31  9:45 UTC (permalink / raw)
  To: linux-gpio; +Cc: linus.walleij, broonie, Bamvor Jian Zhang

From: Bamvor Jian Zhang <bamvor.zhangjian@linaro.org>

These series of patches try to add support for testing of gpio
subsystem based on the proposal from Linus Walleij. The first two
version is here[1][2].

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 chardev interface by default.

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
[2] http://www.spinics.net/lists/linux-gpio/msg11700.html

Changes since v1:
1.  Change value of gpio to boolean.
2.  Only test dynamic allocation by default.
Changes since v2:
1.  Switch to chardev.
2.  Add basic gpio operation for chardev.

Bamvor Jian Zhang (5):
  tools/gpio: add gpio basic opereations
  tools/gpio: re-work gpio hammer with gpio operations
  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                         | 214 ++++++++++++++
 tools/gpio/gpio-hammer.c                           |  52 +---
 tools/gpio/gpio-utils.c                            | 163 +++++++++++
 tools/gpio/gpio-utils.h                            | 121 ++++++++
 tools/testing/selftests/Makefile                   |   1 +
 tools/testing/selftests/gpio/Makefile              |  23 ++
 tools/testing/selftests/gpio/gpio-mockup-chardev.c | 321 +++++++++++++++++++++
 tools/testing/selftests/gpio/gpio-mockup-sysfs.sh  | 134 +++++++++
 tools/testing/selftests/gpio/gpio-mockup.sh        | 200 +++++++++++++
 13 files changed, 1211 insertions(+), 42 deletions(-)
 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-chardev.c
 create mode 100755 tools/testing/selftests/gpio/gpio-mockup-sysfs.sh
 create mode 100755 tools/testing/selftests/gpio/gpio-mockup.sh

-- 
1.8.4.5


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2016-10-13  4:29 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-31  9:45 [PATCH v3 0/5] Add gpio test framework bamvor.zhangjian
2016-08-31  9:45 ` [PATCH v3 1/5] tools/gpio: add gpio basic opereations bamvor.zhangjian
2016-09-26 19:37   ` Linus Walleij
2016-09-28 19:16   ` Michael Welling
2016-09-28 21:35     ` Bamvor Zhang Jian
2016-09-28 22:12       ` Michael Welling
2016-08-31  9:45 ` [PATCH v3 2/5] tools/gpio: re-work gpio hammer with gpio operations bamvor.zhangjian
2016-10-13  4:28   ` Bamvor Zhang Jian
2016-08-31  9:45 ` [PATCH v3 3/5] gpio/mockup: add virtual gpio device bamvor.zhangjian
2016-09-26 18:48   ` Linus Walleij
2016-08-31  9:45 ` [PATCH v3 4/5] selftest/gpio: add gpio test case bamvor.zhangjian
2016-08-31  9:45 ` [PATCH v3 5/5] gpio: MAINTAINERS: Add an entry for GPIO mockup driver bamvor.zhangjian
2016-09-26 18:50   ` Linus Walleij

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).