linux/drivers/pinctrl
Vladimir Zapolskiy e73339037f pinctrl: remove unused 'pinconf-config' debugfs interface
The main goal of the change is to remove .pin_config_dbg_parse_modify
callback before a driver with its support appears. So far the in-kernel
interface did not attract any users since its introduction 5 years ago.

Originally .pin_config_dbg_parse_modify callback and the associated
'pinconf-config' debugfs file were introduced in commit f07512e615
("pinctrl/pinconfig: add debug interface"), a short description of
'pinconf-config' usage for debugging can be expressed this way:

Write to 'pinconf-config' (see pinconf_dbg_config_write() function):

% echo -n modify $map_type $device_name $state_name $pin_name $config > \
	/sys/kernel/debug/pinctrl/$pinctrl/pinconf-config

It supposes to update a global (therefore single!) 'pinconf_dbg_conf'
variable with an alternative setting, the arguments should match
an existing pinconf device and some registered pinctrl mapping 'map':

* $map_type is either 'config_pin' or 'config_group', it should match
  'map->type' value of PIN_MAP_TYPE_CONFIGS_PIN or
   PIN_MAP_TYPE_CONFIGS_GROUP accordingly,
* $device_name should match 'map->dev_name' string value,
* $state_name should match 'map->name' string value,
* $pin_name should match 'map->data.configs.group_or_pin' string value,

If all above has matched, then $config is a new value to be set by calling
pinconfops->pin_config_dbg_parse_modify(pctldev, config, matched_config).

After a successful write into 'pinconf-config' a user can read the file
to get information about that single modified pin configuration.

The fact is .pin_config_dbg_parse_modify callback has never been defined
in 'struct pinconf_ops' of any pinconf driver, thus an actual modification
of a pin or group state on any present pinconf controller does not happen,
and it declares that all related code is no more than dead code.

I discovered the issue while attempting to add .pin_config_dbg_parse_modify
support in some drivers and found that too short 'MAX_NAME_LEN' set by

  drivers/pinctrl/pinconf.c:372:#define MAX_NAME_LEN 15

is practically insufficient to store a regular pinctrl device name,
which are like 'e6060000.pin-controller-sh-pfc' or pin names like
'MX6QDL_PAD_ENET_REF_CLK', thus it is another indicator that the code
is barely usable, insufficiently tested and unprepossessing.

Of course it might be possible to increase MAX_NAME_LEN, and then add
.pin_config_dbg_parse_modify callbacks to the drivers, but the whole
idea of such a limited debug option looks inviable. A more flexible
way to functionally substitute the original approach is to implicitly
or explicitly use pinctrl_select_state() function whenever needed.

Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
Cc: Laurent Meunier <laurent.meunier@st.com>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Russell King <linux@arm.linux.org.uk>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2019-01-28 14:39:52 +01:00
..
actions pinctrl: actions: Add Actions Semi S700 pinctrl driver 2018-11-19 14:12:34 +01:00
aspeed pinctrl: aspeed: Wrap -Woverride-init with cc-option 2018-12-16 01:22:38 +01:00
bcm pinctrl: bcm: ns: support updated DT binding as syscon subnode 2018-12-21 11:45:49 +01:00
berlin pinctrl: Convert to using %pOFn instead of device_node.name 2018-08-29 14:05:36 +02:00
cirrus pinctrl: remove pinctrl/machine.h inclusion from pinctrl/pinconf.h 2019-01-28 14:39:17 +01:00
freescale pinctrl: imx: add imx8qm driver 2019-01-11 09:25:01 +01:00
intel pinctrl: cherryview: Stop clearing the GPIO_EN bit from chv_gpio_disable_free 2018-12-05 14:11:05 +02:00
mediatek pinctrl: mediatek: add EINT support to virtual GPIOs 2019-01-11 13:15:06 +01:00
meson Merge branch 'ib-meson-fixes' into devel 2019-01-22 10:55:07 +01:00
mvebu pinctrl: armada-37xx: change suspend/resume time 2019-01-21 14:12:50 +01:00
nomadik pinctrl: nomadik: Fix debugfs 2018-10-03 09:10:52 +02:00
nuvoton pinctrl: nuvoton: check for devm_kasprintf() failure 2018-12-05 22:55:04 +01:00
pxa pinctrl: pxa: pxa2xx: add missing MODULE_DESCRIPTION/AUTHOR/LICENSE 2017-11-30 14:42:04 +01:00
qcom qcom: spmi-gpio: add support for hierarchical IRQ chip 2019-01-24 15:33:26 +01:00
samsung pinctrl: Use of_node_name_eq for node name comparisons 2018-12-14 16:03:03 +01:00
sh-pfc pinctrl: sh-pfc: Make pinmux_cfg_reg.var_field_width[] variable-length 2018-12-18 11:25:56 +01:00
sirf pinctrl: sirf: atlas7: use struct_size() in devm_kzalloc() 2019-01-11 13:24:21 +01:00
spear pinctrl: Include <linux/gpio/driver.h> nothing else 2018-09-14 15:10:57 +02:00
sprd pinctrl: sprd: Use define directive for sprd_pinconf_params values 2018-11-09 10:20:47 +01:00
stm32 pinctrl: stm32: protect configuration registers with a hwspinlock 2018-11-19 13:17:46 +01:00
sunxi Pin control bulk changes for the v4.21 kernel cycle: 2019-01-01 13:19:16 -08:00
tegra pinctrl: tegra: do not export tegra_pinctrl_probe 2018-09-20 08:15:16 -07:00
ti pinctrl: ti: iodelay: Lower the priority of prints 2019-01-21 14:38:40 +01:00
uniphier pinctrl: uniphier: constify uniphier_pinctrl_socdata 2018-12-21 11:18:08 +01:00
vt8500 pinctrl: Include <linux/gpio/driver.h> nothing else 2018-09-14 15:10:57 +02:00
zte treewide: devm_kzalloc() -> devm_kcalloc() 2018-06-12 16:19:22 -07:00
core.c pinctrl: core: make sure strcmp() doesn't get a null parameter 2018-10-01 13:46:13 +02:00
core.h pinctrl: core: Remove broken remove_last group and pinmux functions 2018-07-17 10:49:49 +02:00
devicetree.c pinctrl: Support stopping deferred probe after initcalls 2018-07-10 17:22:35 +02:00
devicetree.h
Kconfig pinctrl: ocelot: Add dependency on HAS_IOMEM 2018-12-22 11:15:04 +01:00
Makefile pinctrl: Add RZ/A2 pin and gpio controller 2018-11-23 09:30:27 +01:00
pinconf-generic.c pinctrl: Add skew-delay pin config and bindings 2017-11-08 13:49:45 +01:00
pinconf.c pinctrl: remove unused 'pinconf-config' debugfs interface 2019-01-28 14:39:52 +01:00
pinconf.h pinctrl: move const qualifier before struct 2017-08-14 15:01:02 +02:00
pinctrl-amd.c pinctrl/amd: fix typo 2019-01-11 13:25:24 +01:00
pinctrl-amd.h pinctrl/amd: fix gpio irq level in debugfs 2018-07-29 22:20:15 +02:00
pinctrl-artpec6.c pinctrl: artpec-6: Add smaller groups for uarts 2018-03-01 17:04:09 +01:00
pinctrl-as3722.c pinctrl: Include <linux/gpio/driver.h> nothing else 2018-09-14 15:10:57 +02:00
pinctrl-at91-pio4.c pinctrl: pinctrl-at91-pio4: simplify getting .driver_data 2018-11-05 09:33:32 +01:00
pinctrl-at91.c pinctrl: Include <linux/gpio/driver.h> nothing else 2018-09-14 15:10:57 +02:00
pinctrl-at91.h
pinctrl-axp209.c pinctrl: axp209: Fix NULL pointer dereference after allocation 2018-08-10 23:12:43 +02:00
pinctrl-coh901.c pinctrl: Include <linux/gpio/driver.h> nothing else 2018-09-14 15:10:57 +02:00
pinctrl-coh901.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
pinctrl-da850-pupd.c
pinctrl-digicolor.c pinctrl: Include <linux/gpio/driver.h> nothing else 2018-09-14 15:10:57 +02:00
pinctrl-falcon.c pinctrl: Include <linux/gpio/driver.h> nothing else 2018-09-14 15:10:57 +02:00
pinctrl-gemini.c pinctrl: gemini: Fix up TVC clock group 2018-10-10 21:05:35 +02:00
pinctrl-ingenic.c This is the 4.19-rc6 release 2018-10-01 13:20:45 +02:00
pinctrl-lantiq.c pinctrl: Convert to using %pOFn instead of device_node.name 2018-08-29 14:05:36 +02:00
pinctrl-lantiq.h
pinctrl-lpc18xx.c pinctrl: lpc18xx: Use define directive for PIN_CONFIG_GPIO_PIN_INT 2018-11-09 10:23:58 +01:00
pinctrl-max77620.c pinctrl: max77620: Use define directive for max77620_pinconf_param values 2018-11-09 10:02:22 +01:00
pinctrl-mcp23s08.c pinctrl: mcp23s08: Allocate irq_chip dynamic 2019-01-21 14:19:25 +01:00
pinctrl-ocelot.c pinctrl: ocelot: add MSCC Jaguar2 support 2018-12-21 11:50:48 +01:00
pinctrl-oxnas.c gpio: Move irqdomain into struct gpio_irq_chip 2017-11-08 14:06:21 +01:00
pinctrl-palmas.c pinctrl: palmas: Delete an error message for a failed memory allocation in palmas_pinctrl_probe() 2018-01-03 08:46:49 +01:00
pinctrl-pic32.c gpio: Move irqdomain into struct gpio_irq_chip 2017-11-08 14:06:21 +01:00
pinctrl-pic32.h
pinctrl-pistachio.c pinctrl: Include <linux/gpio/driver.h> nothing else 2018-09-14 15:10:57 +02:00
pinctrl-rk805.c pinctrl: Add pinctrl driver for the RK805 PMIC 2017-08-21 08:54:46 +01:00
pinctrl-rockchip.c pinctrl: rockchip: add rk3188 routes to switch between nand and emmc 2018-11-17 13:18:53 +01:00
pinctrl-rza1.c pinctrl: rza1: Handle devm_kasprintf() failure cases 2018-12-18 11:25:56 +01:00
pinctrl-rza2.c pinctrl: Add RZ/A2 pin and gpio controller 2018-11-23 09:30:27 +01:00
pinctrl-rzn1.c pinctrl: rzn1: Fix of_get_child_count() error check 2018-12-04 10:33:49 +01:00
pinctrl-single.c pinctrl: Convert to using %pOFn instead of device_node.name 2018-08-29 14:05:36 +02:00
pinctrl-st.c pinctrl: Convert to using %pOFn instead of device_node.name 2018-08-29 14:05:36 +02:00
pinctrl-sx150x.c pinctrl: sx150x: handle failure case of devm_kstrdup 2018-12-07 13:22:47 +01:00
pinctrl-tb10x.c pinctrl: tb10x: constify pinconf_ops, pinctrl_ops, and pinmux_ops structures 2017-08-22 14:41:40 +02:00
pinctrl-u300.c headers: separate linux/mod_devicetable.h from linux/platform_device.h 2018-07-07 17:52:26 +02:00
pinctrl-utils.c pinctrl: utils: Delete an error message for a failed memory allocation in pinctrl_utils_add_map_configs() 2018-01-03 08:46:53 +01:00
pinctrl-utils.h
pinctrl-xway.c pinctrl: xway: fix gpio-hog related boot issues 2018-12-17 23:11:18 +01:00
pinctrl-zynq.c pinctrl: zynq: Use define directive for PIN_CONFIG_IO_STANDARD 2018-11-09 10:25:17 +01:00
pinmux.c pinctrl: Change to use DEFINE_SHOW_ATTRIBUTE macro 2018-12-07 11:11:10 +01:00
pinmux.h pinctrl: core: Remove broken remove_last group and pinmux functions 2018-07-17 10:49:49 +02:00