Skip to contentSkip to conversation

pinctrl: eswin: Fix Handling of PIN_CONFIG_PERSIST_STATE

PATCH In review Yulin Lu 2 participants 2 messages Jul 28 – Aug 3

Subsystems (2)
lore
Share & tools
lore

Yulin Lu

author
#0 lore raw

PATCH 1/1 pinctrl: eswin: Fix Handling of PIN_CONFIG_PERSIST_STATE

The EIC7700 pinctrl driver does not handle PIN_CONFIG_PERSIST_STATE specifically, and returns -EOPNOTSUPP from the default case.

Since all pins on the EIC7700 SoC are persistent over suspend, the correct behaviour is to accept this parameter and return success.

Add an explicit case for PIN_CONFIG_PERSIST_STATE that returns 0 to prevent errors when this parameter is set.

Fixes 5b797bcc00ef ("pinctrl: eswin: Add EIC7700 pinctrl driver")
---
 drivers/pinctrl/pinctrl-eic7700.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/pinctrl/pinctrl-eic7700.c +3 -0
index d553ec20c619..09a3b097383c 100644
@@ -422,6 +422,9 @@ static int eic7700_pin_config_set(struct pinctrl_dev *pctldev, unsigned int pin,
 			else
 				value &= ~EIC7700_ST;
 			break;
+		/* All pins are persistent over suspend */
+		case PIN_CONFIG_PERSIST_STATE:
+			return 0;
 		default:
 			return -EOPNOTSUPP;
 		}
Signature · 1 line
2.34.1
maintainer
#1 lore raw
Quoted 11 lines · Yulin Lu

The EIC7700 pinctrl driver does not handle PIN_CONFIG_PERSIST_STATE specifically, and returns -EOPNOTSUPP from the default case.

Since all pins on the EIC7700 SoC are persistent over suspend, the correct behaviour is to accept this parameter and return success.

Add an explicit case for PIN_CONFIG_PERSIST_STATE that returns 0 to prevent errors when this parameter is set.

Fixes 5b797bcc00ef ("pinctrl: eswin: Add EIC7700 pinctrl driver")

Patch applied, I don't see any indication that this is a regression or urgent so applied as nonurgent fix.

Yours,
Linus Walleij