Add interrupt handling capability to pca953x
PATCH v4 1/1 Add interrupt handling capability to pca953x
Guys,
Here is the latest version of my pca953x irq_chip patch.
Changes from v3:
- Fix compilation issue on anything but ARM
- Remove unnecessary inlines, courtesy of Andrew Morton
As always, I'd appreciate any comment on this.
M.
Quoted 1 line
From
46c88794ddf1e59d0192ada4c7a93868b1e96978Mon Sep 17 00:00:00 2001
From: Marc Zyngier <[email protected]>
Date: Tue, 22 Dec 2009 17:38:29 +0100
Subject: [PATCH 1/3] Add interrupt handling capability to pca953x.
Most of the GPIO expanders controlled by the pca953x driver are able to report changes on the input pins through an *INT pin.
This patch implements the irq_chip functionality (edge detection only).
The driver has been tested on an Arcom Zeus.
--- drivers/gpio/Kconfig | 7 ++ drivers/gpio/pca953x.c | 249 ++++++++++++++++++++++++++++++++++++++++-- include/linux/i2c/pca953x.h | 3 + 3 files changed, 247 insertions(+), 12 deletions(-)
drivers/gpio/Kconfig +7 -0
@@ -124,6 +124,13 @@ config GPIO_PCA953X This driver can also be built as a module. If so, the module will be called pca953x. +config GPIO_PCA953X_IRQ + bool "Interrupt controller support for PCA953x" + depends on GPIO_PCA953X=y + help + Say yes here to enable the pca953x to be used as an interrupt + controller. It requires the driver to be built in the kernel. + config GPIO_PCF857X tristate "PCF857x, PCA{85,96}7x, and MAX732[89] I2C GPIO expanders" depends on I2C
drivers/gpio/pca953x.c +237 -12
303 lines not on this page · raw message
include/linux/i2c/pca953x.h +3 -0
@@ -7,6 +7,9 @@ struct pca953x_platform_data {/* initial polarity inversion setting */ uint16_t invert; +/* interrupt base */ +int irq_base; +void *context;/* param to setup/teardown */ int (*setup)(struct i2c_client *client,
Signature · 5 lines
1.6.6.1 -- I'm the slime oozin' out from your TV set...