]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit4fea72ae7998d39f735320d141747928c7f7e70d
treea26a7625f099135f2849cd5fdc86c75626fe518b
parent46325c8626ea6bd1e235be047684a2d4f4d3f55f
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]