u-boot-brain/drivers/pinctrl
Lad Prabhakar cc6aa80dd1 pinctrl: renesas: Make sure the pin type is updated after setting the MUX
By default on startup all the pin types are configured to
PINMUX_TYPE_NONE (in sh_pfc_map_pins()), when pin is set as GPIO the
pin type is updated to PINMUX_TYPE_GPIO. But the type is not updated
when the pin is set as a function in sh_pfc_pinctrl_pin_set() or
sh_pfc_pinctrl_group_set() calls (these calls only set the MUX if
the pin type is PINMUX_TYPE_NONE ie unused).

So with the current implementation pin functionality could be overwritten
silently, for example if the same pin is added for SPI and serial.

This patch makes sure of updating pin type after every successful call to
sh_pfc_config_mux() and thus fixing from pin functionality to be
overwritten. Also a warning message is printed if the current pin is being
overwritten before abort.

This also avoids pin re-muxing to same type that is for example from
command line device is asked to re-probe/select (mmc dev x) we return
early with success in this case as the pin is already muxed.

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com>
2021-01-18 13:29:12 +01:00
..
aspeed dm: treewide: Rename auto_alloc_size members to be shorter 2020-12-13 08:00:25 -07:00
ath79 dm: treewide: Rename auto_alloc_size members to be shorter 2020-12-13 08:00:25 -07:00
broadcom dm: treewide: Rename ofdata_to_platdata() to of_to_plat() 2020-12-13 16:51:09 -07:00
exynos pinctrl: Update for new sequence numbers 2020-12-18 20:32:21 -07:00
intel x86: apl: Move priv/plat structs to headers 2021-01-05 12:24:41 -07:00
mediatek dm: treewide: Rename auto_alloc_size members to be shorter 2020-12-13 08:00:25 -07:00
meson Prepare v2021.01-rc5 2021-01-05 16:20:26 -05:00
mscc dm: treewide: Rename auto_alloc_size members to be shorter 2020-12-13 08:00:25 -07:00
mtmips dm: treewide: Rename ofdata_to_platdata() to of_to_plat() 2020-12-13 16:51:09 -07:00
mvebu dm: treewide: Rename auto_alloc_size members to be shorter 2020-12-13 08:00:25 -07:00
nexell dm: treewide: Rename auto_alloc_size members to be shorter 2020-12-13 08:00:25 -07:00
nxp dm: Rename U_BOOT_DRIVER_ALIAS to DM_DRIVER_ALIAS 2021-01-05 12:26:35 -07:00
renesas pinctrl: renesas: Make sure the pin type is updated after setting the MUX 2021-01-18 13:29:12 +01:00
rockchip dm: treewide: Rename auto_alloc_size members to be shorter 2020-12-13 08:00:25 -07:00
uniphier dm: treewide: Rename auto_alloc_size members to be shorter 2020-12-13 08:00:25 -07:00
Kconfig pinctrl: Add support for Kendryte K210 FPIOA 2020-10-08 11:42:36 -04:00
Makefile pinctrl: Add support for Kendryte K210 FPIOA 2020-10-08 11:42:36 -04:00
pinctrl_pic32.c dm: treewide: Rename auto_alloc_size members to be shorter 2020-12-13 08:00:25 -07:00
pinctrl_stm32.c pinctrl: stm32: migrate trace to log macro 2021-01-13 09:52:58 +01:00
pinctrl-at91-pio4.c dm: treewide: Rename ..._platdata variables to just ..._plat 2020-12-13 16:51:09 -07:00
pinctrl-at91.c dm: Rename U_BOOT_DRIVER_ALIAS to DM_DRIVER_ALIAS 2021-01-05 12:26:35 -07:00
pinctrl-generic.c pinctrl: Add pinmux property support to pinctrl-generic 2020-10-08 11:42:36 -04:00
pinctrl-kendryte.c dm: treewide: Rename auto_alloc_size members to be shorter 2020-12-13 08:00:25 -07:00
pinctrl-qe-io.c dm: Use access methods for dev/uclass private data 2021-01-05 12:24:40 -07:00
pinctrl-sandbox.c dm: treewide: Rename auto_alloc_size members to be shorter 2020-12-13 08:00:25 -07:00
pinctrl-single.c dm: Use access methods for dev/uclass private data 2021-01-05 12:24:40 -07:00
pinctrl-sti.c Prepare v2021.01-rc5 2021-01-05 16:20:26 -05:00
pinctrl-stmfx.c dm: treewide: Rename dev_get_platdata() to dev_get_plat() 2020-12-13 16:51:09 -07:00
pinctrl-uclass.c dm: core: Use dev_has_ofnode() instead of dev_of_valid() 2021-01-05 12:24:41 -07:00