summaryrefslogtreecommitdiffstats
path: root/include/platform_data
diff options
context:
space:
mode:
authorAntony Pavlov <antonynpavlov@gmail.com>2014-07-11 00:07:25 +0400
committerSascha Hauer <s.hauer@pengutronix.de>2014-07-14 08:04:04 +0200
commite4f94541badfff409c7be74b6282b9add2feb4c0 (patch)
tree7199244e8aadee87b42655ade6a932fa496f1c59 /include/platform_data
parent21c5b4ff131d6c7703411f710814991288d1f1ea (diff)
downloadbarebox-e4f94541badfff409c7be74b6282b9add2feb4c0.tar.gz
barebox-e4f94541badfff409c7be74b6282b9add2feb4c0.tar.xz
gpio: add driver for PCA95[357]x, PCA9698, TCA64xx, and MAX7310 SMBus I/O expanders
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/platform_data')
-rw-r--r--include/platform_data/pca953x.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/include/platform_data/pca953x.h b/include/platform_data/pca953x.h
new file mode 100644
index 0000000000..cfd253ebce
--- /dev/null
+++ b/include/platform_data/pca953x.h
@@ -0,0 +1,27 @@
+#ifndef _LINUX_PCA953X_H
+#define _LINUX_PCA953X_H
+
+#include <linux/types.h>
+#include <i2c/i2c.h>
+
+/* platform data for the PCA9539 16-bit I/O expander driver */
+
+struct pca953x_platform_data {
+ /* number of the first GPIO */
+ unsigned gpio_base;
+
+ /* initial polarity inversion setting */
+ u32 invert;
+
+ void *context; /* param to setup/teardown */
+
+ int (*setup)(struct i2c_client *client,
+ unsigned gpio, unsigned ngpio,
+ void *context);
+ int (*teardown)(struct i2c_client *client,
+ unsigned gpio, unsigned ngpio,
+ void *context);
+ const char *const *names;
+};
+
+#endif /* _LINUX_PCA953X_H */