[U-Boot] [PATCH v3 0/9] Add pinmux command

Patrice Chotard patrice.chotard at st.com
Tue Oct 9 13:31:19 UTC 2018


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 v3:
 - Replace const char **buf parameter by char *buf, int size parameters
   for pinctrl_get_pin_muxing()
 - Replace const char **buf parameter by char *buf, int size parameters
   for pinctrl_get_pin_name()
 - Update calls to pinctrl_get_pin_name() and pinctrl_get_pin_muxing
   due to prototype update.
 - Fix typo

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  |  36 +++++++
 drivers/pinctrl/pinctrl_stm32.c   | 218 +++++++++++++++++++++++++++++++++++++-
 include/dm/pinctrl.h              |  55 ++++++++++
 include/dm/uclass.h               |  16 +++
 9 files changed, 508 insertions(+), 5 deletions(-)
 create mode 100644 cmd/pinmux.c

-- 
1.9.1



More information about the U-Boot mailing list