gpio/mockup: add virtual gpio device
authorBamvor Jian Zhang <bamvor.zhangjian@linaro.org>
Wed, 31 Aug 2016 09:45:46 +0000 (11:45 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Mon, 26 Sep 2016 18:47:14 +0000 (11:47 -0700)
commit0f98dd1b27d27412af3aef6a49ea6975988e33e7
treea26a7625f099135f2849cd5fdc86c75626fe518b
parente3296f19c8620a9c47b6734df84c4b3126d2fe46
gpio/mockup: add virtual gpio device

This patch add basic structure of a virtual gpio device(gpio-mockup)
for testing gpio subsystem. The tester could manipulate such device
through userspace(sysfs or char device) and check the result from
debugfs.

Currently, it support one or more gpiochip(determined by module
parameters with base,ngpio pair). One could test the overlap of
different gpiochip and test the direction and/or output values of
these chips.

Signed-off-by: Kamlakant Patel <kamlakant.patel@broadcom.com>
Signed-off-by: Bamvor Jian Zhang <bamvor.zhangjian@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Documentation/kernel-parameters.txt
drivers/gpio/Kconfig
drivers/gpio/Makefile
drivers/gpio/gpio-mockup.c [new file with mode: 0644]