• Home
  • Raw
  • Download

Lines Matching +full:drive +full:- +full:open +full:- +full:drain

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"
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),
70 ret = pin_config_group_get(dev_name(pctldev->dev), in pinconf_generic_dump_one()
75 if (ret == -EINVAL || ret == -ENOTSUPP) in pinconf_generic_dump_one()
99 * pinconf_generic_dump_pins - Print information about pin or group of pins
112 const struct pinconf_ops *ops = pctldev->desc->confops; in pinconf_generic_dump_pins()
115 if (!ops->is_generic) in pinconf_generic_dump_pins()
121 /* driver-specific parameters */ in pinconf_generic_dump_pins()
122 if (pctldev->desc->num_custom_params && in pinconf_generic_dump_pins()
123 pctldev->desc->custom_conf_items) in pinconf_generic_dump_pins()
125 pctldev->desc->custom_conf_items, in pinconf_generic_dump_pins()
126 pctldev->desc->num_custom_params, in pinconf_generic_dump_pins()
142 if (!pctldev->desc->num_custom_params || in pinconf_generic_dump_config()
143 !pctldev->desc->custom_conf_items) in pinconf_generic_dump_config()
146 for (i = 0; i < pctldev->desc->num_custom_params; i++) { in pinconf_generic_dump_config()
148 pctldev->desc->custom_conf_items[i].param) in pinconf_generic_dump_config()
151 pctldev->desc->custom_conf_items[i].display, in pinconf_generic_dump_config()
160 { "bias-bus-hold", PIN_CONFIG_BIAS_BUS_HOLD, 0 },
161 { "bias-disable", PIN_CONFIG_BIAS_DISABLE, 0 },
162 { "bias-high-impedance", PIN_CONFIG_BIAS_HIGH_IMPEDANCE, 0 },
163 { "bias-pull-up", PIN_CONFIG_BIAS_PULL_UP, 1 },
164 { "bias-pull-pin-default", PIN_CONFIG_BIAS_PULL_PIN_DEFAULT, 1 },
165 { "bias-pull-down", PIN_CONFIG_BIAS_PULL_DOWN, 1 },
166 { "drive-open-drain", PIN_CONFIG_DRIVE_OPEN_DRAIN, 0 },
167 { "drive-open-source", PIN_CONFIG_DRIVE_OPEN_SOURCE, 0 },
168 { "drive-push-pull", PIN_CONFIG_DRIVE_PUSH_PULL, 0 },
169 { "drive-strength", PIN_CONFIG_DRIVE_STRENGTH, 0 },
170 { "drive-strength-microamp", PIN_CONFIG_DRIVE_STRENGTH_UA, 0 },
171 { "input-debounce", PIN_CONFIG_INPUT_DEBOUNCE, 0 },
172 { "input-disable", PIN_CONFIG_INPUT_ENABLE, 0 },
173 { "input-enable", PIN_CONFIG_INPUT_ENABLE, 1 },
174 { "input-schmitt", PIN_CONFIG_INPUT_SCHMITT, 0 },
175 { "input-schmitt-disable", PIN_CONFIG_INPUT_SCHMITT_ENABLE, 0 },
176 { "input-schmitt-enable", PIN_CONFIG_INPUT_SCHMITT_ENABLE, 1 },
177 { "low-power-disable", PIN_CONFIG_LOW_POWER_MODE, 0 },
178 { "low-power-enable", PIN_CONFIG_LOW_POWER_MODE, 1 },
179 { "output-disable", PIN_CONFIG_OUTPUT_ENABLE, 0 },
180 { "output-enable", PIN_CONFIG_OUTPUT_ENABLE, 1 },
181 { "output-high", PIN_CONFIG_OUTPUT, 1, },
182 { "output-low", PIN_CONFIG_OUTPUT, 0, },
183 { "power-source", PIN_CONFIG_POWER_SOURCE, 0 },
184 { "sleep-hardware-state", PIN_CONFIG_SLEEP_HARDWARE_STATE, 0 },
185 { "slew-rate", PIN_CONFIG_SLEW_RATE, 0 },
186 { "skew-delay", PIN_CONFIG_SKEW_DELAY, 0 },
190 * parse_dt_cfg() - Parse DT pinconf parameters
214 ret = of_property_read_u32(np, par->property, &val); in parse_dt_cfg()
217 if (ret == -EINVAL) in parse_dt_cfg()
222 val = par->default_value; in parse_dt_cfg()
224 pr_debug("found %s with value %u\n", par->property, val); in parse_dt_cfg()
225 cfg[*ncfg] = pinconf_to_config_packed(par->param, val); in parse_dt_cfg()
249 return -EINVAL; in pinconf_generic_parse_dt_config()
254 max_cfg += pctldev->desc->num_custom_params; in pinconf_generic_parse_dt_config()
257 return -ENOMEM; in pinconf_generic_parse_dt_config()
260 if (pctldev && pctldev->desc->num_custom_params && in pinconf_generic_parse_dt_config()
261 pctldev->desc->custom_params) in pinconf_generic_parse_dt_config()
262 parse_dt_cfg(np, pctldev->desc->custom_params, in pinconf_generic_parse_dt_config()
263 pctldev->desc->num_custom_params, cfg, &ncfg); in pinconf_generic_parse_dt_config()
280 ret = -ENOMEM; in pinconf_generic_parse_dt_config()
299 struct device *dev = pctldev->dev; in pinconf_generic_dt_subnode_to_map()
325 if (ret != -EINVAL) in pinconf_generic_dt_subnode_to_map()