u-boot-brain/drivers/pinctrl/renesas
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
..
Kconfig pinctrl: renesas: r8a77951: Add R8A774E1 PFC support 2020-11-22 12:49:22 +01:00
Makefile pinctrl: renesas: r8a77951: Add R8A774E1 PFC support 2020-11-22 12:49:22 +01:00
pfc-r7s72100.c dm: treewide: Rename ..._platdata variables to just ..._plat 2020-12-13 16:51:09 -07:00
pfc-r8a7790.c pinctrl: renesas: Synchronize Gen2/Gen3 tables with Linux 5.2 2019-07-23 13:38:23 +02:00
pfc-r8a7791.c pinctrl: renesas: Synchronize Gen2/Gen3 tables with Linux 5.2 2019-07-23 13:38:23 +02:00
pfc-r8a7792.c pinctrl: renesas: Synchronize Gen2/Gen3 tables with Linux 5.2 2019-07-23 13:38:23 +02:00
pfc-r8a7794.c pinctrl: renesas: Synchronize Gen2/Gen3 tables with Linux 5.2 2019-07-23 13:38:23 +02:00
pfc-r8a7795.c pinctrl: renesas: r8a7795: Optimize pinctrl image size for R8A774E1 2020-11-22 12:49:22 +01:00
pfc-r8a7796.c pinctrl: renesas: r8a7796: Optimize pinctrl image size for R8A774A1 2020-11-22 12:49:22 +01:00
pfc-r8a77965.c pinctrl: renesas: r8a77965: Optimize pinctrl image size for R8A774B1 2020-11-22 12:49:22 +01:00
pfc-r8a77970.c pinctrl: renesas: Synchronize Gen2/Gen3 tables with Linux 5.2 2019-07-23 13:38:23 +02:00
pfc-r8a77980.c pinctrl: renesas: Add R8A77980 V3H PFC tables 2019-08-09 23:15:01 +02:00
pfc-r8a77990.c pinctrl: renesas: pfc-r8a77990: Sync PFC tables with Linux 5.9 2020-10-20 12:56:52 +02:00
pfc-r8a77995.c pinctrl: renesas: Synchronize Gen2/Gen3 tables with Linux 5.2 2019-07-23 13:38:23 +02:00
pfc.c pinctrl: renesas: Make sure the pin type is updated after setting the MUX 2021-01-18 13:29:12 +01:00
sh_pfc.h pinctrl: renesas: r8a77951: Add R8A774E1 PFC support 2020-11-22 12:49:22 +01:00