History

pinctrl: pinconf-generic: Add support for "output-impedance-ohms" to be extracted from DT files

Add "output-impedance-ohms" property to generic options used for DT parsing files. This enables drivers, which use generic pin configurations, to get the value passed to this property.

Lad Prabhakar committed 5 years ago

Commit 032816f1 parent 7388fa82 files · +5 −0Browse files

Unified · Split

2 files
  1. drivers/pinctrl/pinconf-generic.c +2 −0
  2. include/linux/pinctrl/pinconf-generic.h +3 −0
drivers/pinctrl/pinconf-generic.c+2−0
@@ -46,6 +46,7 @@ static const struct pin_config_item conf_items[] = { · 45 unmodified lines
46 PCONFDUMP(PIN_CONFIG_MODE_LOW_POWER, "pin low power", "mode", true),46 PCONFDUMP(PIN_CONFIG_MODE_LOW_POWER, "pin low power", "mode", true),
47 PCONFDUMP(PIN_CONFIG_OUTPUT_ENABLE, "output enabled", NULL, false),47 PCONFDUMP(PIN_CONFIG_OUTPUT_ENABLE, "output enabled", NULL, false),
48 PCONFDUMP(PIN_CONFIG_OUTPUT, "pin output", "level", true),48 PCONFDUMP(PIN_CONFIG_OUTPUT, "pin output", "level", true),
49 PCONFDUMP(PIN_CONFIG_OUTPUT_IMPEDANCE_OHMS, "output impedance", "ohms", true),
49 PCONFDUMP(PIN_CONFIG_POWER_SOURCE, "pin power source", "selector", true),50 PCONFDUMP(PIN_CONFIG_POWER_SOURCE, "pin power source", "selector", true),
50 PCONFDUMP(PIN_CONFIG_SLEEP_HARDWARE_STATE, "sleep hardware state", NULL, false),51 PCONFDUMP(PIN_CONFIG_SLEEP_HARDWARE_STATE, "sleep hardware state", NULL, false),
51 PCONFDUMP(PIN_CONFIG_SLEW_RATE, "slew rate", NULL, true),52 PCONFDUMP(PIN_CONFIG_SLEW_RATE, "slew rate", NULL, true),
@@ -179,6 +180,7 @@ static const struct pinconf_generic_params dt_params[] = { · 127 unmodified lines
179 { "output-disable", PIN_CONFIG_OUTPUT_ENABLE, 0 },180 { "output-disable", PIN_CONFIG_OUTPUT_ENABLE, 0 },
180 { "output-enable", PIN_CONFIG_OUTPUT_ENABLE, 1 },181 { "output-enable", PIN_CONFIG_OUTPUT_ENABLE, 1 },
181 { "output-high", PIN_CONFIG_OUTPUT, 1, },182 { "output-high", PIN_CONFIG_OUTPUT, 1, },
183 { "output-impedance-ohms", PIN_CONFIG_OUTPUT_IMPEDANCE_OHMS, 0 },
182 { "output-low", PIN_CONFIG_OUTPUT, 0, },184 { "output-low", PIN_CONFIG_OUTPUT, 0, },
183 { "power-source", PIN_CONFIG_POWER_SOURCE, 0 },185 { "power-source", PIN_CONFIG_POWER_SOURCE, 0 },
184 { "sleep-hardware-state", PIN_CONFIG_SLEEP_HARDWARE_STATE, 0 },186 { "sleep-hardware-state", PIN_CONFIG_SLEEP_HARDWARE_STATE, 0 },
include/linux/pinctrl/pinconf-generic.h+3−0
@@ -91,6 +91,8 @@ struct pinctrl_map; · 90 unmodified lines
91 * configuration (eg. the currently selected mux function) drive values on91 * configuration (eg. the currently selected mux function) drive values on
92 * the line. Use argument 1 to enable output mode, argument 0 to disable92 * the line. Use argument 1 to enable output mode, argument 0 to disable
93 * it.93 * it.
94 * @PIN_CONFIG_OUTPUT_IMPEDANCE_OHMS: this will configure the output impedance
95 * of the pin with the value passed as argument. The argument is in ohms.
94 * @PIN_CONFIG_PERSIST_STATE: retain pin state across sleep or controller reset96 * @PIN_CONFIG_PERSIST_STATE: retain pin state across sleep or controller reset
95 * @PIN_CONFIG_POWER_SOURCE: if the pin can select between different power97 * @PIN_CONFIG_POWER_SOURCE: if the pin can select between different power
96 * supplies, the argument to this parameter (on a custom format) tells98 * supplies, the argument to this parameter (on a custom format) tells
@@ -129,6 +131,7 @@ enum pin_config_param { · 32 unmodified lines
129 PIN_CONFIG_MODE_PWM,131 PIN_CONFIG_MODE_PWM,
130 PIN_CONFIG_OUTPUT,132 PIN_CONFIG_OUTPUT,
131 PIN_CONFIG_OUTPUT_ENABLE,133 PIN_CONFIG_OUTPUT_ENABLE,
134 PIN_CONFIG_OUTPUT_IMPEDANCE_OHMS,
132 PIN_CONFIG_PERSIST_STATE,135 PIN_CONFIG_PERSIST_STATE,
133 PIN_CONFIG_POWER_SOURCE,136 PIN_CONFIG_POWER_SOURCE,
134 PIN_CONFIG_SKEW_DELAY,137 PIN_CONFIG_SKEW_DELAY,