linux-hardened/Documentation
Dirk Behme 62f4666968 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>
2015-08-03 14:10:10 -07:00
..
ABI First set of IIO fixes for the 4.2 cycle. 2015-07-13 14:18:07 -07:00
accounting
acpi ACPI: Constify ACPI device IDs in documentation 2015-06-19 01:14:15 +02:00
aoe
arm Update Viresh Kumar's email address 2015-07-17 16:39:53 -07:00
arm64 arm64: use fixmap region for permanent FDT mapping 2015-06-02 16:31:33 +01:00
auxdisplay
backlight
blackfin Docs: blackfin: Use new switch macro SAMPLE_IRQ_TIMER instead of IRQ_TIMER5 2015-05-07 09:35:14 -06:00
block Documentation: Remove mentioning of block barriers 2015-03-20 07:41:56 -06:00
blockdev zram: add dynamic device add/remove functionality 2015-06-25 17:00:36 -07:00
bus-devices
cdrom
cgroups Merge branch 'for-4.2' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup 2015-06-26 19:50:04 -07:00
cma cma: debug: document new debugfs interface 2015-04-14 16:49:00 -07:00
connector
console
cpu-freq Documentation updates for 4.2 2015-06-24 20:01:36 -07:00
cpuidle
cris
crypto crypto: doc - AEAD / RNG AF_ALG interface 2015-03-09 21:06:18 +11:00
development-process Documentation: remove outdated references to the linux-next wiki 2014-10-28 09:06:11 -04:00
device-mapper dm cache: display 'needs_check' in status if it is set 2015-07-16 10:23:50 -04:00
devicetree Input: zforce - make the interrupt GPIO optional 2015-08-03 14:10:10 -07:00
dmaengine Merge branch 'topic/pxa' into for-linus 2015-06-25 09:21:58 +05:30
DocBook Merge tag 'topic/drm-fixes-2015-07-16' of git://anongit.freedesktop.org/drm-intel into drm-fixes 2015-07-17 09:56:00 +10:00
driver-model Char/Misc driver patches for 4.1-rc1 2015-04-21 09:42:58 -07:00
dvb
early-userspace
EDID
extcon
fault-injection
fb
features Documentation/features: Explain kernel feature descriptions and add visualization script 2015-06-03 12:59:38 +02:00
filesystems Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2015-07-04 19:36:06 -07:00
firmware_class
fmc
frv
gpio Documentation updates for 4.2 2015-06-24 20:01:36 -07:00
hid HID: sensor: Update document for custom sensor 2015-04-10 22:22:56 +02:00
hwmon hwmon: Document which I2C addresses can be probed 2015-07-03 14:39:05 +02:00
i2c Merge branch 'i2c/for-4.2' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux 2015-06-25 18:42:39 -07:00
ia64 virtual: Documentation: simplify and generalize paravirt_ops.txt 2015-02-13 17:15:44 +10:30
ide
infiniband
input Doc: Change wikipedia's URL from http to https 2015-06-22 10:14:05 -06:00
ioctl fuse: device fd clone 2015-07-01 16:26:08 +02:00
isdn
ja_JP Doc: ja_JP: Fix typo in HOWTO 2015-06-08 16:43:09 -06:00
kbuild kbuild: Allow arch Makefiles to override {cpp,ld,c}flags 2015-07-06 11:09:00 +05:30
kdump kernel: add panic_on_warn 2014-12-10 17:41:10 -08:00
ko_KR
laptops Move freefall program from Documentation/ to tools/ 2015-06-08 16:42:07 -06:00
leds Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds 2015-07-01 19:09:11 -07:00
locking Documentation changes for 3.20 2015-02-11 13:03:11 -08:00
m68k
memory-devices
metag
mic Char/Misc driver patches for 4.2-rc1 2015-06-26 14:51:15 -07:00
mips
misc-devices Pratyush Anand has moved 2015-06-25 17:00:38 -07:00
mmc
mn10300
mtd
namespaces
netlabel
networking netconsole: implement extended console support 2015-06-25 17:00:39 -07:00
nfc NFC: Fix typo in nfc-hci.txt 2015-06-08 23:15:45 +02:00
nios2 Documentation: Add documentation for Nios2 architecture 2014-12-08 12:56:06 +08:00
nvdimm libnvdimm: Non-Volatile Devices 2015-06-26 11:23:38 -04:00
parisc
PCI The documentation tree update for 4.1. Numerous fixes, the overdue removal 2015-04-18 11:10:49 -04:00
pcmcia
phy
platform
power PM / hibernate: clarify resume documentation 2015-07-07 01:18:11 +02:00
powerpc powerpc/tm: Abort syscalls in active transactions 2015-06-19 17:10:28 +10:00
pps Doc:pps: Fix typo in pps.txt 2015-06-22 09:59:28 -06:00
prctl Documentation/prctl: don't build tsc tests when cross compiling 2015-06-22 16:05:04 -06:00
pti
ptp ptp: restore the makefile for building the test program. 2014-10-24 16:07:10 -04:00
rapidio
RCU Documentation updates for 4.2 2015-06-24 20:01:36 -07:00
s390 qeth: OSA version of SETBRIDGEPORT command 2015-05-18 12:14:17 -04:00
scheduler sched/dl/Documentation: Split Section 3 2015-05-19 08:39:21 +02:00
scsi Merge branch 'for-4.2/sg' of git://git.kernel.dk/linux-block 2015-06-25 15:22:36 -07:00
security Smack: allow multiple labels in onlycap 2015-06-02 11:53:42 -07:00
serial Doc: serial-rs485.txt: update RS485 driver interface 2015-06-12 17:39:51 -07:00
sh
sound Doc: sound:oss: Fix typo in sound/oss 2015-06-09 17:23:00 +02:00
spi Documentation/spi/spidev_test.c: fix warning 2015-04-17 09:04:12 -04:00
sysctl coredump: use from_kuid/kgid when formatting corename 2015-06-25 17:00:43 -07:00
target Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending 2015-07-04 14:13:43 -07:00
thermal thermal: support slope and offset coefficients 2015-05-11 19:46:52 -07:00
timers documentation: Update NO_HZ_FULL interaction with POSIX timers 2015-02-26 11:57:29 -08:00
tpm
trace Documentation: tracing: fix grammar 2015-05-13 15:39:04 -04:00
usb USB patches for 4.2-rc1 2015-06-26 15:59:26 -07:00
vDSO Documentation/vDSO: don't build tests when cross compiling 2015-06-22 16:04:57 -06:00
video4linux [media] Documentation: update cardlists 2015-06-09 18:43:47 -03:00
virtual KVM: x86: mark legacy PCI device assignment as deprecated 2015-06-05 17:26:39 +02:00
vm zswap: runtime enable/disable 2015-06-25 17:00:37 -07:00
w1 w1: Add support for DS28EA00 sequence to w1-therm 2015-05-24 12:08:59 -07:00
watchdog watchdog: omap_wdt: early_enable module parameter 2015-07-01 16:43:17 +02:00
wimax
x86 x86/asm/entry/64: Update path names 2015-07-02 11:08:50 +02:00
xtensa
zh_CN Documentation updates for 4.2 2015-06-24 20:01:36 -07:00
00-INDEX Update of Documentation/dmaengine/00-INDEX 2014-12-29 15:28:24 -07:00
applying-patches.txt
assoc_array.txt
atomic_ops.txt documentation: Clarify memory-barrier semantics of atomic operations 2015-02-26 11:57:31 -08:00
bad_memory.txt
basic_profiling.txt
bcache.txt
binfmt_misc.txt binfmt_misc: touch up documentation a bit 2014-10-14 02:18:16 +02:00
braille-console.txt
bt8xxgpio.txt
btmrvl.txt
BUG-HUNTING
bus-virt-phys-mapping.txt
cachetlb.txt rmap: drop support of non-linear mappings 2015-02-10 14:30:31 -08:00
Changes Documentation: GNU is frequently spelled Gnu 2014-12-29 15:33:17 -07:00
circular-buffers.txt
clk.txt clk: Update docs after removal of clk-private.h 2015-05-13 12:32:51 -07:00
coccinelle.txt
CodeOfConflict Code of Conflict 2015-02-27 11:44:24 -08:00
CodingStyle Documentation/CodingStyle: fix example macro parenthesis imbalance 2015-05-07 17:07:41 -06:00
cpu-hotplug.txt cpumask: fix cpu-hotplug documentation 2015-03-05 13:37:01 +10:30
cpu-load.txt
cputopology.txt Documentation: Update cputopology.txt 2015-05-27 15:22:15 +02:00
crc32.txt
dcdbas.txt
debugging-modules.txt
debugging-via-ohci1394.txt Doc: Change wikipedia's URL from http to https 2015-06-22 10:14:05 -06:00
dell_rbu.txt
devices.txt
digsig.txt
DMA-API-HOWTO.txt Documentation updates for 4.2 2015-06-24 20:01:36 -07:00
DMA-API.txt PCI: Add pci_bus_addr_t 2015-05-29 17:21:45 -05:00
DMA-attributes.txt
dma-buf-sharing.txt dma-buf: cleanup dma_buf_export() to make it easily extensible 2015-04-21 14:47:16 +05:30
DMA-ISA-LPC.txt
dontdiff
dynamic-debug-howto.txt
edac.txt EDAC: Update Documentation/edac.txt 2015-06-24 18:17:40 +02:00
efi-stub.txt
eisa.txt
email-clients.txt Documentation/email-clients.txt: Fix one grammar mistake, add extra info about TB 2015-03-20 07:41:55 -06:00
flexible-arrays.txt
futex-requeue-pi.txt doc: Fix misnamed FUTEX_CMP_REQUEUE_PI op constants 2015-01-19 12:05:32 +01:00
gcov.txt
gdb-kernel-debugging.txt scripts/gdb: add basic documentation 2015-02-17 14:34:54 -08:00
highuid.txt
HOWTO Documentation: remove outdated references to the linux-next wiki 2014-10-28 09:06:11 -04:00
hsi.txt
hw_random.txt
hwspinlock.txt hwspinlock/core: add device tree support 2015-05-02 09:54:30 +03:00
init.txt
initrd.txt
Intel-IOMMU.txt
intel_txt.txt
io-mapping.txt
io_ordering.txt
iostats.txt
IPMI.txt ipmi:ssif: Ignore spaces when comparing I2C adapter names 2015-05-05 14:24:45 -05:00
IRQ-affinity.txt
IRQ-domain.txt IRQCHIP: Update docs regarding irq_domain_add_tree() 2015-04-01 17:21:35 +02:00
IRQ.txt
irqflags-tracing.txt
isapnp.txt
java.txt
kasan.txt Merge branch 'doc/4.2' into docs-next 2015-06-08 17:04:11 -06:00
kernel-doc-nano-HOWTO.txt
kernel-docs.txt
kernel-parameters.txt Linux 4.2-rc3 2015-07-20 10:08:17 -07:00
kernel-per-CPU-kthreads.txt documentation: Update per-CPU kthreads documentation 2015-02-26 11:57:30 -08:00
kmemcheck.txt Documentation: update the CONFIG_DEBUG_PAGEALLOC description 2015-03-20 07:41:55 -06:00
kmemleak.txt Doc: Change wikipedia's URL from http to https 2015-06-22 10:14:05 -06:00
kobject.txt kobject: grammar fix 2014-12-08 09:07:11 -05:00
kprobes.txt kprobes: Update Documentation/kprobes.txt 2015-03-20 07:41:55 -06:00
kref.txt
kselftest.txt kselftest: Move the docs to the Documentation dir 2014-11-24 10:49:54 -07:00
ldm.txt
local_ops.txt percpu: update local_ops.txt to reflect this_cpu operations 2014-12-13 12:42:53 -08:00
lockup-watchdogs.txt watchdog: add watchdog_cpumask sysctl to assist nohz 2015-06-24 17:49:40 -07:00
logo.gif
logo.txt
lzo.txt
magic-number.txt Documentation/magic-number: Remove SCC_MAGIC 2015-05-13 15:39:04 -04:00
mailbox.txt Documentation: Fix a typo in mailbox.txt 2014-11-03 11:54:50 -05:00
Makefile Documentation: Remove ZBOOT MMC/SDHI utility and docs 2015-02-24 06:45:25 +09:00
ManagementStyle
md-cluster.txt md-cluster: Design Documentation 2015-02-23 07:16:46 -06:00
md.txt doc:md: fix typo in md.txt. 2015-06-23 06:49:44 -06:00
media-framework.txt
memory-barriers.txt Merge branch 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2015-06-22 14:54:22 -07:00
memory-hotplug.txt mem-hotplug: fix typo in Documentation/memory-hotplug.txt 2015-03-20 07:41:55 -06:00
module-signing.txt modsign: change default key details 2015-04-30 09:35:41 -07:00
mono.txt
nommu-mmap.txt fs: introduce f_op->mmap_capabilities for nommu mmap support 2015-01-20 14:02:58 -07:00
ntb.txt NTB: Rename Intel code names to platform names 2015-07-04 14:09:25 -04:00
numastat.txt
oops-tracing.txt livepatch: kernel: add TAINT_LIVEPATCH 2014-12-22 15:40:48 +01:00
padata.txt
parport-lowlevel.txt
parport.txt
percpu-rw-semaphore.txt
phy.txt phy: core: Add devm_of_phy_get_by_index to phy-core 2015-05-11 21:42:23 +05:30
pi-futex.txt
pinctrl.txt pinctrl: move strict option to pinmux_ops 2015-05-06 14:45:19 +02:00
pnp.txt
preempt-locking.txt x86/fpu: Rename math_state_restore() to fpu__restore() 2015-05-19 15:47:18 +02:00
printk-formats.txt The documentation tree update for 4.1. Numerous fixes, the overdue removal 2015-04-18 11:10:49 -04:00
pwm.txt
ramoops.txt pstore-ram: Allow optional mapping with pgprot_noncached 2014-12-11 13:38:31 -08:00
rbtree.txt
remoteproc.txt remoteproc: introduce rproc_get_by_phandle API 2015-06-16 21:12:52 +03:00
rfkill.txt rfkill: document rfkill module parameters 2015-01-09 23:22:12 +01:00
robust-futex-ABI.txt
robust-futexes.txt
rpmsg.txt
rtc.txt Documentation, split up rtc.txt into documentation and test file 2015-03-24 22:01:58 -06:00
SAK.txt
SecurityBugs
serial-console.txt
sgi-ioc4.txt
SM501.txt
smsc_ece1099.txt
sparse.txt
stable_api_nonsense.txt
stable_kernel_rules.txt stable: Update documentation to clarify preferred procedure 2015-05-22 09:38:56 -06:00
static-keys.txt
SubmitChecklist
SubmittingDrivers
SubmittingPatches SubmittingPatches: Clarify requirements for patches directed toward stable 2015-05-14 15:34:52 -04:00
svga.txt
sysfs-rules.txt
sysrq.txt
this_cpu_ops.txt
unaligned-memory-access.txt
unicode.txt
unshare.txt
vfio.txt vfio: powerpc/spapr: Support Dynamic DMA windows 2015-06-11 15:16:55 +10:00
VGA-softcursor.txt
vgaarbiter.txt
video-output.txt
vme_api.txt Documentation: mention vme_master_mmap() in VME API 2015-06-12 17:26:56 -07:00
volatile-considered-harmful.txt
workqueue.txt workqueue: fix trivial typo in Documentation/workqueue.txt 2015-05-05 09:50:38 -04:00
xillybus.txt
xz.txt
zorro.txt