summaryrefslogtreecommitdiff
path: root/drivers/input/misc/Kconfig
diff options
context:
space:
mode:
authorDirk Behme <dirk.behme@de.bosch.com>2015-08-03 13:03:09 -0700
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2015-08-03 14:10:10 -0700
commit62f46669688bf13643b91bbc30f19da1095a5ed6 (patch)
tree8d08537c78f1567badb6437d74aeb4a986471750 /drivers/input/misc/Kconfig
parent0642ffd6a864629c12a4cd7528782ed5b68ac69c (diff)
Input: zforce - make the interrupt GPIO optional
Add support for hardware which uses an I2C Serializer / Deserializer (SerDes) to communicate with the zFroce touch driver. In this case the SerDes will be configured as an interrupt controller and the zForce driver will have no access to poll the GPIO line. To support this, we add two dedicated new GPIOs in the device tree: reset-gpios and irq-gpios, with the irq-gpios being optional. To not break the existing device trees, the index based 'gpios' entries are still supported, but marked as deprecated. With this, if the interrupt GPIO is available, either via the old or new device tree style, the while loop will read and handle the packets as long as the GPIO indicates that the interrupt is asserted (existing, unchanged driver behavior). If the interrupt GPIO isn't available, i.e. not configured via the new device tree style, we are falling back to one read per ISR invocation (new behavior to support the SerDes). Note that the gpiod functions help to handle the optional GPIO: devm_gpiod_get_index_optional() will return NULL in case the interrupt GPIO isn't available. And gpiod_get_value_cansleep() does cover this, too, by returning 0 in this case. Signed-off-by: Dirk Behme <dirk.behme@de.bosch.com> Reviewed-by: Heiko Stuebner <heiko.stuebner@bq.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input/misc/Kconfig')
0 files changed, 0 insertions, 0 deletions