mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-10 15:14:43 +00:00
pinctrl: zynqmp: Add version check for TRISTATE configuration
Support for configuring TRISTATE parameter is added in ZYNQMP PMUFW(Xilinx ZynqMP Platform Management Firmware) Configuration Param Set version 2.0. If the requested configuration is TRISTATE then check the version before requesting Xilinx firmware to set the configuration. Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@amd.com> Link: https://lore.kernel.org/r/20230811054829.13162-3-ashok.reddy.soma@amd.com Signed-off-by: Michal Simek <michal.simek@amd.com>
This commit is contained in:
parent
f16347f41c
commit
4af320b10c
1 changed files with 6 additions and 0 deletions
|
@ -158,6 +158,12 @@ static int zynqmp_pm_pinctrl_set_config(const u32 pin, const u32 param, u32 valu
|
|||
{
|
||||
int ret;
|
||||
|
||||
if (param == PM_PINCTRL_CONFIG_TRI_STATE) {
|
||||
ret = zynqmp_pm_feature(PM_PINCTRL_CONFIG_PARAM_SET);
|
||||
if (ret < PM_PINCTRL_PARAM_SET_VERSION)
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
/* Request the pin first */
|
||||
ret = xilinx_pm_request(PM_PINCTRL_REQUEST, pin, 0, 0, 0, NULL);
|
||||
if (ret) {
|
||||
|
|
Loading…
Reference in a new issue