]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
gpio: pcf857x: move header file out of I2C realm
authorWolfram Sang <wsa@the-dreams.de>
Sun, 21 May 2017 21:57:26 +0000 (23:57 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Tue, 23 May 2017 09:35:02 +0000 (11:35 +0200)
include/linux/i2c is not for client devices. Move the header file to a
more appropriate location.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
arch/arm/mach-davinci/board-da830-evm.c
arch/arm/mach-davinci/board-dm644x-evm.c
arch/arm/mach-davinci/board-dm646x-evm.c
arch/arm/mach-pxa/balloon3.c
arch/arm/mach-pxa/stargate2.c
arch/mips/ath79/mach-pb44.c
drivers/gpio/gpio-pcf857x.c
include/linux/i2c/pcf857x.h [deleted file]
include/linux/platform_data/pcf857x.h [new file with mode: 0644]

index 58075627c6df3ef0c0d4526dd94e586e0085c3e4..f673cd7a67665896f849cab26a394ce012e44e19 100644 (file)
@@ -17,7 +17,7 @@
 #include <linux/gpio/machine.h>
 #include <linux/platform_device.h>
 #include <linux/i2c.h>
-#include <linux/i2c/pcf857x.h>
+#include <linux/platform_data/pcf857x.h>
 #include <linux/platform_data/at24.h>
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/partitions.h>
index 20f1874a5657e2c4707b7336066acd362707bea2..70e00dbeec9694f819ff957014ccbff9841e2ac3 100644 (file)
@@ -14,7 +14,7 @@
 #include <linux/platform_device.h>
 #include <linux/gpio.h>
 #include <linux/i2c.h>
-#include <linux/i2c/pcf857x.h>
+#include <linux/platform_data/pcf857x.h>
 #include <linux/platform_data/at24.h>
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/nand.h>
index cb176826d1cbe4e0c77b2c955348d6a0adeebd53..ca69d0b96a4f07aa0e6c590ba616665f79c9eea8 100644 (file)
@@ -23,7 +23,7 @@
 #include <linux/platform_device.h>
 #include <linux/i2c.h>
 #include <linux/platform_data/at24.h>
-#include <linux/i2c/pcf857x.h>
+#include <linux/platform_data/pcf857x.h>
 
 #include <media/i2c/tvp514x.h>
 #include <media/i2c/adv7343.h>
index d452a49c039647097f77dae28764b2570ad9ee3b..1467c1d1e5419404ea07e921ca74e37b7a63d50b 100644 (file)
@@ -27,7 +27,7 @@
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/partitions.h>
 #include <linux/types.h>
-#include <linux/i2c/pcf857x.h>
+#include <linux/platform_data/pcf857x.h>
 #include <linux/i2c/pxa-i2c.h>
 #include <linux/mtd/nand.h>
 #include <linux/mtd/physmap.h>
index 7b6610e9dae46cc9e981b819f5326a909bf53e68..2d45d18b1a5e0a1b954fe3f691b933bb03488c08 100644 (file)
@@ -26,7 +26,7 @@
 #include <linux/mtd/partitions.h>
 
 #include <linux/i2c/pxa-i2c.h>
-#include <linux/i2c/pcf857x.h>
+#include <linux/platform_data/pcf857x.h>
 #include <linux/platform_data/at24.h>
 #include <linux/smc91x.h>
 #include <linux/gpio.h>
index 67b980d94fb7aa6d3485b83616397e05f4cc6413..be78298dffb4f3c4827b67e64bf3681424983427 100644 (file)
@@ -12,7 +12,7 @@
 #include <linux/platform_device.h>
 #include <linux/i2c.h>
 #include <linux/i2c-gpio.h>
-#include <linux/i2c/pcf857x.h>
+#include <linux/platform_data/pcf857x.h>
 
 #include "machtypes.h"
 #include "dev-gpio-buttons.h"
index 8ddf9302ce3b079adcd727c09ad56f9ce4b60883..a4fd78b9c0e4e36a6c0e7bb2b1e80c97a999d2aa 100644 (file)
@@ -20,7 +20,7 @@
 
 #include <linux/gpio.h>
 #include <linux/i2c.h>
-#include <linux/i2c/pcf857x.h>
+#include <linux/platform_data/pcf857x.h>
 #include <linux/interrupt.h>
 #include <linux/irq.h>
 #include <linux/irqdomain.h>
diff --git a/include/linux/i2c/pcf857x.h b/include/linux/i2c/pcf857x.h
deleted file mode 100644 (file)
index 0767a2a..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-#ifndef __LINUX_PCF857X_H
-#define __LINUX_PCF857X_H
-
-/**
- * struct pcf857x_platform_data - data to set up pcf857x driver
- * @gpio_base: number of the chip's first GPIO
- * @n_latch: optional bit-inverse of initial register value; if
- *     you leave this initialized to zero the driver will act
- *     like the chip was just reset
- * @setup: optional callback issued once the GPIOs are valid
- * @teardown: optional callback issued before the GPIOs are invalidated
- * @context: optional parameter passed to setup() and teardown()
- *
- * In addition to the I2C_BOARD_INFO() state appropriate to each chip,
- * the i2c_board_info used with the pcf875x driver must provide its
- * platform_data (pointer to one of these structures) with at least
- * the gpio_base value initialized.
- *
- * The @setup callback may be used with the kind of board-specific glue
- * which hands the (now-valid) GPIOs to other drivers, or which puts
- * devices in their initial states using these GPIOs.
- *
- * These GPIO chips are only "quasi-bidirectional"; read the chip specs
- * to understand the behavior.  They don't have separate registers to
- * record which pins are used for input or output, record which output
- * values are driven, or provide access to input values.  That must be
- * inferred by reading the chip's value and knowing the last value written
- * to it.  If you leave n_latch initialized to zero, that last written
- * value is presumed to be all ones (as if the chip were just reset).
- */
-struct pcf857x_platform_data {
-       unsigned        gpio_base;
-       unsigned        n_latch;
-
-       int             (*setup)(struct i2c_client *client,
-                                       int gpio, unsigned ngpio,
-                                       void *context);
-       int             (*teardown)(struct i2c_client *client,
-                                       int gpio, unsigned ngpio,
-                                       void *context);
-       void            *context;
-};
-
-#endif /* __LINUX_PCF857X_H */
diff --git a/include/linux/platform_data/pcf857x.h b/include/linux/platform_data/pcf857x.h
new file mode 100644 (file)
index 0000000..0767a2a
--- /dev/null
@@ -0,0 +1,44 @@
+#ifndef __LINUX_PCF857X_H
+#define __LINUX_PCF857X_H
+
+/**
+ * struct pcf857x_platform_data - data to set up pcf857x driver
+ * @gpio_base: number of the chip's first GPIO
+ * @n_latch: optional bit-inverse of initial register value; if
+ *     you leave this initialized to zero the driver will act
+ *     like the chip was just reset
+ * @setup: optional callback issued once the GPIOs are valid
+ * @teardown: optional callback issued before the GPIOs are invalidated
+ * @context: optional parameter passed to setup() and teardown()
+ *
+ * In addition to the I2C_BOARD_INFO() state appropriate to each chip,
+ * the i2c_board_info used with the pcf875x driver must provide its
+ * platform_data (pointer to one of these structures) with at least
+ * the gpio_base value initialized.
+ *
+ * The @setup callback may be used with the kind of board-specific glue
+ * which hands the (now-valid) GPIOs to other drivers, or which puts
+ * devices in their initial states using these GPIOs.
+ *
+ * These GPIO chips are only "quasi-bidirectional"; read the chip specs
+ * to understand the behavior.  They don't have separate registers to
+ * record which pins are used for input or output, record which output
+ * values are driven, or provide access to input values.  That must be
+ * inferred by reading the chip's value and knowing the last value written
+ * to it.  If you leave n_latch initialized to zero, that last written
+ * value is presumed to be all ones (as if the chip were just reset).
+ */
+struct pcf857x_platform_data {
+       unsigned        gpio_base;
+       unsigned        n_latch;
+
+       int             (*setup)(struct i2c_client *client,
+                                       int gpio, unsigned ngpio,
+                                       void *context);
+       int             (*teardown)(struct i2c_client *client,
+                                       int gpio, unsigned ngpio,
+                                       void *context);
+       void            *context;
+};
+
+#endif /* __LINUX_PCF857X_H */