pinctrl: cherryview: Return correct value if pin in push-pull mode
Subsystems (3)
PATCH 1/1 pinctrl: cherryview: Return correct value if pin in push-pull mode
Currently the getter returns ENOTSUPP on pin configured in the push-pull mode. Fix this by adding the missed switch case.
Fixes ccdf81d08dbe ("pinctrl: cherryview: add option to set open-drain pin config")
Fixes 6e08d6bbebeb ("pinctrl: Add Intel Cherryview/Braswell pin controller support")
Signed-off-by Andy Shevchenko <[email protected]>
--- drivers/pinctrl/intel/pinctrl-cherryview.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-)
drivers/pinctrl/intel/pinctrl-cherryview.c +10 -5
@@ -949,11 +949,6 @@ static int chv_config_get(struct pinctrl_dev *pctldev, unsigned int pin,break ; -case PIN_CONFIG_DRIVE_OPEN_DRAIN : -if (!(ctrl1 &CHV_PADCTRL1_ODEN )) -return -EINVAL ; -break ; -case PIN_CONFIG_BIAS_HIGH_IMPEDANCE : {u32 cfg;
@@ -963,6 +958,16 @@ static int chv_config_get(struct pinctrl_dev *pctldev, unsigned int pin,return -EINVAL ;break ; + +case PIN_CONFIG_DRIVE_PUSH_PULL : +if (ctrl1 &CHV_PADCTRL1_ODEN ) +return -EINVAL ; +break ; + +case PIN_CONFIG_DRIVE_OPEN_DRAIN : +if (!(ctrl1 &CHV_PADCTRL1_ODEN )) +return -EINVAL ; +break ; }default :
Signature · 1 line
2.40.0.1.gaa8946217a0b
Quoted 6 lines · Andy Shevchenko
Currently the getter returns ENOTSUPP on pin configured in the push-pull mode. Fix this by adding the missed switch case.
Fixes ccdf81d08dbe ("pinctrl: cherryview: add option to set open-drain pin config")Fixes 6e08d6bbebeb ("pinctrl: Add Intel Cherryview/Braswell pin controller support")Signed-off-by Andy Shevchenko <[email protected]>
Acked-by Mika Westerberg <[email protected]>
Quoted 9 lines · Mika Westerberg
Quoted 6 lines · Andy Shevchenko
Currently the getter returns ENOTSUPP on pin configured in the push-pull mode. Fix this by adding the missed switch case.
Fixes ccdf81d08dbe ("pinctrl: cherryview: add option to set open-drain pin config")Fixes 6e08d6bbebeb ("pinctrl: Add Intel Cherryview/Braswell pin controller support")Signed-off-by Andy Shevchenko <[email protected]>Acked-by Mika Westerberg <[email protected]>
Pushed to my review and testing queue, thanks!
Signature · 2 lines
With Best Regards, Andy Shevchenko