12 #ifndef __LINUX_PINCTRL_PINCONF_GENERIC_H
13 #define __LINUX_PINCTRL_PINCONF_GENERIC_H
19 #ifdef CONFIG_GENERIC_PINCONF
69 enum pin_config_param {
70 PIN_CONFIG_BIAS_DISABLE,
71 PIN_CONFIG_BIAS_HIGH_IMPEDANCE,
72 PIN_CONFIG_BIAS_PULL_UP,
73 PIN_CONFIG_BIAS_PULL_DOWN,
74 PIN_CONFIG_DRIVE_PUSH_PULL,
75 PIN_CONFIG_DRIVE_OPEN_DRAIN,
76 PIN_CONFIG_DRIVE_OPEN_SOURCE,
77 PIN_CONFIG_INPUT_SCHMITT,
78 PIN_CONFIG_INPUT_DEBOUNCE,
79 PIN_CONFIG_POWER_SOURCE,
80 PIN_CONFIG_LOW_POWER_MODE,
81 PIN_CONFIG_END = 0x7FFF,
87 #define PIN_CONF_PACKED(p, a) ((a << 16) | ((unsigned long) p & 0xffffUL))
96 static inline enum pin_config_param pinconf_to_config_param(
unsigned long config)
98 return (
enum pin_config_param) (config & 0xffff
UL);
101 static inline u16 pinconf_to_config_argument(
unsigned long config)
103 return (
enum pin_config_param) ((config >> 16) & 0xffffUL);
106 static inline unsigned long pinconf_to_config_packed(
enum pin_config_param
param,
109 return PIN_CONF_PACKED(param, argument);