Lines Matching +full:output +full:- +full:ohms

1 // SPDX-License-Identifier: GPL-2.0-only
5 * Copyright (C) 2011 ST-Ericsson SA
6 * Written on behalf of Linaro for ST-Ericsson
22 #include <linux/pinctrl/pinconf-generic.h>
26 #include "pinctrl-utils.h"
33 PCONFDUMP(PIN_CONFIG_BIAS_PULL_DOWN, "input bias pull down", "ohms", true),
35 "input bias pull to pin specific state", "ohms", true),
36 PCONFDUMP(PIN_CONFIG_BIAS_PULL_UP, "input bias pull up", "ohms", true),
37 PCONFDUMP(PIN_CONFIG_DRIVE_OPEN_DRAIN, "output drive open drain", NULL, false),
38 PCONFDUMP(PIN_CONFIG_DRIVE_OPEN_SOURCE, "output drive open source", NULL, false),
39 PCONFDUMP(PIN_CONFIG_DRIVE_PUSH_PULL, "output drive push pull", NULL, false),
40 PCONFDUMP(PIN_CONFIG_DRIVE_STRENGTH, "output drive strength", "mA", true),
41 PCONFDUMP(PIN_CONFIG_DRIVE_STRENGTH_UA, "output drive strength", "uA", true),
47 PCONFDUMP(PIN_CONFIG_OUTPUT_ENABLE, "output enabled", NULL, false),
48 PCONFDUMP(PIN_CONFIG_OUTPUT, "pin output", "level", true),
49 PCONFDUMP(PIN_CONFIG_OUTPUT_IMPEDANCE_OHMS, "output impedance", "ohms", true),
71 ret = pin_config_group_get(dev_name(pctldev->dev), in pinconf_generic_dump_one()
76 if (ret == -EINVAL || ret == -ENOTSUPP) in pinconf_generic_dump_one()
100 * pinconf_generic_dump_pins - Print information about pin or group of pins
113 const struct pinconf_ops *ops = pctldev->desc->confops; in pinconf_generic_dump_pins()
116 if (!ops->is_generic) in pinconf_generic_dump_pins()
122 /* driver-specific parameters */ in pinconf_generic_dump_pins()
123 if (pctldev->desc->num_custom_params && in pinconf_generic_dump_pins()
124 pctldev->desc->custom_conf_items) in pinconf_generic_dump_pins()
126 pctldev->desc->custom_conf_items, in pinconf_generic_dump_pins()
127 pctldev->desc->num_custom_params, in pinconf_generic_dump_pins()
143 if (!pctldev->desc->num_custom_params || in pinconf_generic_dump_config()
144 !pctldev->desc->custom_conf_items) in pinconf_generic_dump_config()
147 for (i = 0; i < pctldev->desc->num_custom_params; i++) { in pinconf_generic_dump_config()
149 pctldev->desc->custom_conf_items[i].param) in pinconf_generic_dump_config()
152 pctldev->desc->custom_conf_items[i].display, in pinconf_generic_dump_config()
161 { "bias-bus-hold", PIN_CONFIG_BIAS_BUS_HOLD, 0 },
162 { "bias-disable", PIN_CONFIG_BIAS_DISABLE, 0 },
163 { "bias-high-impedance", PIN_CONFIG_BIAS_HIGH_IMPEDANCE, 0 },
164 { "bias-pull-up", PIN_CONFIG_BIAS_PULL_UP, 1 },
165 { "bias-pull-pin-default", PIN_CONFIG_BIAS_PULL_PIN_DEFAULT, 1 },
166 { "bias-pull-down", PIN_CONFIG_BIAS_PULL_DOWN, 1 },
167 { "drive-open-drain", PIN_CONFIG_DRIVE_OPEN_DRAIN, 0 },
168 { "drive-open-source", PIN_CONFIG_DRIVE_OPEN_SOURCE, 0 },
169 { "drive-push-pull", PIN_CONFIG_DRIVE_PUSH_PULL, 0 },
170 { "drive-strength", PIN_CONFIG_DRIVE_STRENGTH, 0 },
171 { "drive-strength-microamp", PIN_CONFIG_DRIVE_STRENGTH_UA, 0 },
172 { "input-debounce", PIN_CONFIG_INPUT_DEBOUNCE, 0 },
173 { "input-disable", PIN_CONFIG_INPUT_ENABLE, 0 },
174 { "input-enable", PIN_CONFIG_INPUT_ENABLE, 1 },
175 { "input-schmitt", PIN_CONFIG_INPUT_SCHMITT, 0 },
176 { "input-schmitt-disable", PIN_CONFIG_INPUT_SCHMITT_ENABLE, 0 },
177 { "input-schmitt-enable", PIN_CONFIG_INPUT_SCHMITT_ENABLE, 1 },
178 { "low-power-disable", PIN_CONFIG_MODE_LOW_POWER, 0 },
179 { "low-power-enable", PIN_CONFIG_MODE_LOW_POWER, 1 },
180 { "output-disable", PIN_CONFIG_OUTPUT_ENABLE, 0 },
181 { "output-enable", PIN_CONFIG_OUTPUT_ENABLE, 1 },
182 { "output-high", PIN_CONFIG_OUTPUT, 1, },
183 { "output-impedance-ohms", PIN_CONFIG_OUTPUT_IMPEDANCE_OHMS, 0 },
184 { "output-low", PIN_CONFIG_OUTPUT, 0, },
185 { "power-source", PIN_CONFIG_POWER_SOURCE, 0 },
186 { "sleep-hardware-state", PIN_CONFIG_SLEEP_HARDWARE_STATE, 0 },
187 { "slew-rate", PIN_CONFIG_SLEW_RATE, 0 },
188 { "skew-delay", PIN_CONFIG_SKEW_DELAY, 0 },
192 * parse_dt_cfg() - Parse DT pinconf parameters
216 ret = of_property_read_u32(np, par->property, &val); in parse_dt_cfg()
219 if (ret == -EINVAL) in parse_dt_cfg()
224 val = par->default_value; in parse_dt_cfg()
226 pr_debug("found %s with value %u\n", par->property, val); in parse_dt_cfg()
227 cfg[*ncfg] = pinconf_to_config_packed(par->param, val); in parse_dt_cfg()
251 return -EINVAL; in pinconf_generic_parse_dt_config()
256 max_cfg += pctldev->desc->num_custom_params; in pinconf_generic_parse_dt_config()
259 return -ENOMEM; in pinconf_generic_parse_dt_config()
262 if (pctldev && pctldev->desc->num_custom_params && in pinconf_generic_parse_dt_config()
263 pctldev->desc->custom_params) in pinconf_generic_parse_dt_config()
264 parse_dt_cfg(np, pctldev->desc->custom_params, in pinconf_generic_parse_dt_config()
265 pctldev->desc->num_custom_params, cfg, &ncfg); in pinconf_generic_parse_dt_config()
282 ret = -ENOMEM; in pinconf_generic_parse_dt_config()
301 struct device *dev = pctldev->dev; in pinconf_generic_dt_subnode_to_map()
327 if (ret != -EINVAL) in pinconf_generic_dt_subnode_to_map()