summaryrefslogtreecommitdiff
path: root/include/linux/platform_data/i2c-mux-gpio.h
diff options
context:
space:
mode:
authorWolfram Sang <wsa@the-dreams.de>2018-04-19 23:00:08 +0300
committerWolfram Sang <wsa@the-dreams.de>2018-05-17 17:27:52 +0300
commit62ea22c4954f5b147488eefa644d668e843be6f7 (patch)
tree34a8a79e0cfee07467fb147a40b414ffcf1d1f71 /include/linux/platform_data/i2c-mux-gpio.h
parent1e9d42194e4c8f0ba3f9d4f72b5f54050ddf7a39 (diff)
downloadlinux-62ea22c4954f5b147488eefa644d668e843be6f7.tar.xz
i2c: mux: gpio: move header to platform_data
This header only contains platform_data. Move it to the proper directory. Signed-off-by: Wolfram Sang <wsa@the-dreams.de> Acked-by: Peter Korsgaard <peter.korsgaard@barco.com>
Diffstat (limited to 'include/linux/platform_data/i2c-mux-gpio.h')
-rw-r--r--include/linux/platform_data/i2c-mux-gpio.h43
1 files changed, 43 insertions, 0 deletions
diff --git a/include/linux/platform_data/i2c-mux-gpio.h b/include/linux/platform_data/i2c-mux-gpio.h
new file mode 100644
index 000000000000..4406108201fe
--- /dev/null
+++ b/include/linux/platform_data/i2c-mux-gpio.h
@@ -0,0 +1,43 @@
+/*
+ * i2c-mux-gpio interface to platform code
+ *
+ * Peter Korsgaard <peter.korsgaard@barco.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#ifndef _LINUX_I2C_MUX_GPIO_H
+#define _LINUX_I2C_MUX_GPIO_H
+
+/* MUX has no specific idle mode */
+#define I2C_MUX_GPIO_NO_IDLE ((unsigned)-1)
+
+/**
+ * struct i2c_mux_gpio_platform_data - Platform-dependent data for i2c-mux-gpio
+ * @parent: Parent I2C bus adapter number
+ * @base_nr: Base I2C bus number to number adapters from or zero for dynamic
+ * @values: Array of bitmasks of GPIO settings (low/high) for each
+ * position
+ * @n_values: Number of multiplexer positions (busses to instantiate)
+ * @classes: Optional I2C auto-detection classes
+ * @gpio_chip: Optional GPIO chip name; if set, GPIO pin numbers are given
+ * relative to the base GPIO number of that chip
+ * @gpios: Array of GPIO numbers used to control MUX
+ * @n_gpios: Number of GPIOs used to control MUX
+ * @idle: Bitmask to write to MUX when idle or GPIO_I2CMUX_NO_IDLE if not used
+ */
+struct i2c_mux_gpio_platform_data {
+ int parent;
+ int base_nr;
+ const unsigned *values;
+ int n_values;
+ const unsigned *classes;
+ char *gpio_chip;
+ const unsigned *gpios;
+ int n_gpios;
+ unsigned idle;
+};
+
+#endif /* _LINUX_I2C_MUX_GPIO_H */