| .. | .. |
|---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-only */ |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Interface the generic pinconfig portions of the pinctrl subsystem |
|---|
| 3 | 4 | * |
|---|
| .. | .. |
|---|
| 6 | 7 | * This interface is used in the core to keep track of pins. |
|---|
| 7 | 8 | * |
|---|
| 8 | 9 | * Author: Linus Walleij <linus.walleij@linaro.org> |
|---|
| 9 | | - * |
|---|
| 10 | | - * License terms: GNU General Public License (GPL) version 2 |
|---|
| 11 | 10 | */ |
|---|
| 12 | 11 | #ifndef __LINUX_PINCTRL_PINCONF_GENERIC_H |
|---|
| 13 | 12 | #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; |
|---|
| 14 | 19 | |
|---|
| 15 | 20 | /** |
|---|
| 16 | 21 | * enum pin_config_param - possible pin configuration parameters |
|---|
| .. | .. |
|---|
| 55 | 60 | * push-pull mode, the argument is ignored. |
|---|
| 56 | 61 | * @PIN_CONFIG_DRIVE_STRENGTH: the pin will sink or source at most the current |
|---|
| 57 | 62 | * 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. |
|---|
| 58 | 65 | * @PIN_CONFIG_INPUT_DEBOUNCE: this will configure the pin to debounce mode, |
|---|
| 59 | 66 | * which means it will wait for signals to settle when reading inputs. The |
|---|
| 60 | 67 | * argument gives the debounce time in usecs. Setting the |
|---|
| .. | .. |
|---|
| 112 | 119 | PIN_CONFIG_DRIVE_OPEN_SOURCE, |
|---|
| 113 | 120 | PIN_CONFIG_DRIVE_PUSH_PULL, |
|---|
| 114 | 121 | PIN_CONFIG_DRIVE_STRENGTH, |
|---|
| 122 | + PIN_CONFIG_DRIVE_STRENGTH_UA, |
|---|
| 115 | 123 | PIN_CONFIG_INPUT_DEBOUNCE, |
|---|
| 116 | 124 | PIN_CONFIG_INPUT_ENABLE, |
|---|
| 117 | 125 | PIN_CONFIG_INPUT_SCHMITT, |
|---|
| .. | .. |
|---|
| 156 | 164 | return PIN_CONF_PACKED(param, argument); |
|---|
| 157 | 165 | } |
|---|
| 158 | 166 | |
|---|
| 159 | | -#ifdef CONFIG_GENERIC_PINCONF |
|---|
| 160 | | - |
|---|
| 161 | | -#ifdef CONFIG_DEBUG_FS |
|---|
| 162 | 167 | #define PCONFDUMP(a, b, c, d) { \ |
|---|
| 163 | 168 | .param = a, .display = b, .format = c, .has_arg = d \ |
|---|
| 164 | 169 | } |
|---|
| .. | .. |
|---|
| 169 | 174 | const char * const format; |
|---|
| 170 | 175 | bool has_arg; |
|---|
| 171 | 176 | }; |
|---|
| 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; |
|---|
| 180 | 177 | |
|---|
| 181 | 178 | struct pinconf_generic_params { |
|---|
| 182 | 179 | const char * const property; |
|---|
| .. | .. |
|---|
| 221 | 218 | return pinconf_generic_dt_node_to_map(pctldev, np_config, map, num_maps, |
|---|
| 222 | 219 | PIN_MAP_TYPE_INVALID); |
|---|
| 223 | 220 | } |
|---|
| 224 | | -#endif |
|---|
| 225 | | - |
|---|
| 226 | | -#endif /* CONFIG_GENERIC_PINCONF */ |
|---|
| 227 | 221 | |
|---|
| 228 | 222 | #endif /* __LINUX_PINCTRL_PINCONF_GENERIC_H */ |
|---|