hc
2024-05-10 37f49e37ab4cb5d0bc4c60eb5c6d4dd57db767bb
kernel/include/linux/pinctrl/pinconf-generic.h
....@@ -1,3 +1,4 @@
1
+/* SPDX-License-Identifier: GPL-2.0-only */
12 /*
23 * Interface the generic pinconfig portions of the pinctrl subsystem
34 *
....@@ -6,11 +7,15 @@
67 * This interface is used in the core to keep track of pins.
78 *
89 * Author: Linus Walleij <linus.walleij@linaro.org>
9
- *
10
- * License terms: GNU General Public License (GPL) version 2
1110 */
1211 #ifndef __LINUX_PINCTRL_PINCONF_GENERIC_H
1312 #define __LINUX_PINCTRL_PINCONF_GENERIC_H
13
+
14
+#include <linux/device.h>
15
+#include <linux/pinctrl/machine.h>
16
+
17
+struct pinctrl_dev;
18
+struct pinctrl_map;
1419
1520 /**
1621 * enum pin_config_param - possible pin configuration parameters
....@@ -55,6 +60,8 @@
5560 * push-pull mode, the argument is ignored.
5661 * @PIN_CONFIG_DRIVE_STRENGTH: the pin will sink or source at most the current
5762 * passed as argument. The argument is in mA.
63
+ * @PIN_CONFIG_DRIVE_STRENGTH_UA: the pin will sink or source at most the current
64
+ * passed as argument. The argument is in uA.
5865 * @PIN_CONFIG_INPUT_DEBOUNCE: this will configure the pin to debounce mode,
5966 * which means it will wait for signals to settle when reading inputs. The
6067 * argument gives the debounce time in usecs. Setting the
....@@ -112,6 +119,7 @@
112119 PIN_CONFIG_DRIVE_OPEN_SOURCE,
113120 PIN_CONFIG_DRIVE_PUSH_PULL,
114121 PIN_CONFIG_DRIVE_STRENGTH,
122
+ PIN_CONFIG_DRIVE_STRENGTH_UA,
115123 PIN_CONFIG_INPUT_DEBOUNCE,
116124 PIN_CONFIG_INPUT_ENABLE,
117125 PIN_CONFIG_INPUT_SCHMITT,
....@@ -156,9 +164,6 @@
156164 return PIN_CONF_PACKED(param, argument);
157165 }
158166
159
-#ifdef CONFIG_GENERIC_PINCONF
160
-
161
-#ifdef CONFIG_DEBUG_FS
162167 #define PCONFDUMP(a, b, c, d) { \
163168 .param = a, .display = b, .format = c, .has_arg = d \
164169 }
....@@ -169,14 +174,6 @@
169174 const char * const format;
170175 bool has_arg;
171176 };
172
-#endif /* CONFIG_DEBUG_FS */
173
-
174
-#ifdef CONFIG_OF
175
-
176
-#include <linux/device.h>
177
-#include <linux/pinctrl/machine.h>
178
-struct pinctrl_dev;
179
-struct pinctrl_map;
180177
181178 struct pinconf_generic_params {
182179 const char * const property;
....@@ -221,8 +218,5 @@
221218 return pinconf_generic_dt_node_to_map(pctldev, np_config, map, num_maps,
222219 PIN_MAP_TYPE_INVALID);
223220 }
224
-#endif
225
-
226
-#endif /* CONFIG_GENERIC_PINCONF */
227221
228222 #endif /* __LINUX_PINCTRL_PINCONF_GENERIC_H */