For debug purpose, it's useful to know the pins muxing to check if a pin is configured as a GPIO or as an alternate function and to get information about this alternate function configuration. For this purpose a new command pinmux is implemented.
This series adds: - Add get_pin_muxing ops to UCLASS pinctrl - Add pinmux command - Add get_function() support to stm32 gpio driver - Add get_pins_count() support to stm32 pinctrl driver - Add get_pin_name() support to stm32 pinctrl driver - Add get_pin_muxing() support to stm32 pinctrl driver Changes in v2: - Replace pinmux_show ops which displayed the complete pin-controller muxing by get_pin_muxing ops which displays the muxing of one pin - In order to make pin muxing display less SoC specific, use pinctrl_pins_count(), pinctrl_get_pin_name() and pinctrl_get_pin_muxing() methods instead of previous pinctrl_pinmux_show() method. Patrice Chotard (9): dm: pinctrl: Add get_pin_muxing() ops dm: pinctrl: Add pinctrl_get_pin_name and pinctrl_get_pins_count dm: uclass: Add uclass_foreach_dev_probe cmd: pinmux: Add pinmux command pinctrl: stm32: Add get_pins_count() ops pinctrl: stm32: Add get_pin_name() ops pinctrl: stm32: Add get_pin_muxing() ops gpio: stm32f7: Add ops get_function pinctrl: sandbox: Add get_pin_muxing ops support cmd/Kconfig | 8 ++ cmd/Makefile | 1 + cmd/pinmux.c | 144 +++++++++++++++++++++++++ drivers/gpio/stm32f7_gpio.c | 20 ++++ drivers/pinctrl/pinctrl-sandbox.c | 15 +++ drivers/pinctrl/pinctrl-uclass.c | 35 ++++++ drivers/pinctrl/pinctrl_stm32.c | 218 +++++++++++++++++++++++++++++++++++++- include/dm/pinctrl.h | 52 +++++++++ include/dm/uclass.h | 16 +++ 9 files changed, 504 insertions(+), 5 deletions(-) create mode 100644 cmd/pinmux.c -- 1.9.1 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot