Skip to contentSkip to conversation

pinctrl: qcom: spmi: fix debugfs drive strength

PATCH In review Johan Hovold 3 participants 3 messages Oct 25, 2024

Subsystems (6)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pinctrl: qcom: spmi: fix debugfs drive strength

Commit 723e8462a4fe ("pinctrl: qcom: spmi-gpio: Fix the GPIO strength mapping") fixed a long-standing issue in the Qualcomm SPMI PMIC gpio driver which had the 'low' and 'high' drive strength settings switched but failed to update the debugfs interface which still gets this wrong.

Fix the debugfs code so that the exported values match the hardware settings.

Note that this probably means that most devicetrees that try to describe the firmware settings got this wrong if the settings were derived from debugfs. Before the above mentioned commit the settings would have actually matched the firmware settings even if they were described incorrectly, but now they are inverted.

Fixes 723e8462a4fe ("pinctrl: qcom: spmi-gpio: Fix the GPIO strength mapping")
Fixes eadff3024472 ("pinctrl: Qualcomm SPMI PMIC GPIO pin controller driver")
Cc Anjelique Melendez <[email protected]>
---
 drivers/pinctrl/qcom/pinctrl-spmi-gpio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pinctrl/qcom/pinctrl-spmi-gpio.c +1 -1
index 3d03293f6320..3a12304e2b7d 100644
@@ -667,7 +667,7 @@ static void pmic_gpio_config_dbg_show(struct pinctrl_dev *pctldev,
 		"push-pull", "open-drain", "open-source"
 	};
 	static const char *const strengths[] = {
-		"no", "high", "medium", "low"
+		"no", "low", "medium", "high"
 	};
 
 	pad = pctldev->desc->pins[pin].drv_data;
Signature · 1 line
2.45.2
Reviewed-by on v1 1/1
#1 lore raw
Quoted 14 lines · Johan Hovold

Commit 723e8462a4fe ("pinctrl: qcom: spmi-gpio: Fix the GPIO strength mapping") fixed a long-standing issue in the Qualcomm SPMI PMIC gpio driver which had the 'low' and 'high' drive strength settings switched but failed to update the debugfs interface which still gets this wrong.

Fix the debugfs code so that the exported values match the hardware settings.

Note that this probably means that most devicetrees that try to describe the firmware settings got this wrong if the settings were derived from debugfs. Before the above mentioned commit the settings would have actually matched the firmware settings even if they were described incorrectly, but now they are inverted.

Quoted 6 lines
Fixes 723e8462a4fe ("pinctrl: qcom: spmi-gpio: Fix the GPIO strength mapping")
Fixes eadff3024472 ("pinctrl: Qualcomm SPMI PMIC GPIO pin controller driver")
Cc Anjelique Melendez <[email protected]>

---

Konrad

#2 lore raw
In reply to Johan Hovold
Quoted 14 lines · Johan Hovold

Commit 723e8462a4fe ("pinctrl: qcom: spmi-gpio: Fix the GPIO strength mapping") fixed a long-standing issue in the Qualcomm SPMI PMIC gpio driver which had the 'low' and 'high' drive strength settings switched but failed to update the debugfs interface which still gets this wrong.

Fix the debugfs code so that the exported values match the hardware settings.

Note that this probably means that most devicetrees that try to describe the firmware settings got this wrong if the settings were derived from debugfs. Before the above mentioned commit the settings would have actually matched the firmware settings even if they were described incorrectly, but now they are inverted.

Quoted 5 lines
Fixes 723e8462a4fe ("pinctrl: qcom: spmi-gpio: Fix the GPIO strength mapping")
Fixes eadff3024472 ("pinctrl: Qualcomm SPMI PMIC GPIO pin controller driver")
Cc Anjelique Melendez <[email protected]>

Patch applied for fixes, thanks for digging into this Johan!

Yours,
Linus Walleij