Input: edt-ft5x06: correct CONFIG_DEBUG_FS macro name in comment
Subsystems (2)
PATCH 1/1 Input: edt-ft5x06: correct CONFIG_DEBUG_FS macro name in comment
A comment in the edt-ft5x06 driver incorrectly refers to CONFIG_DEBUGFS instead of CONFIG_DEBUG_FS. Correct it.
Discovered while searching for CONFIG_* symbols referenced in code but not defined in any Kconfig file.
--- drivers/input/touchscreen/edt-ft5x06.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/input/touchscreen/edt-ft5x06.c +1 -1
@@ -825,7 +825,7 @@ static void edt_ft5x06_ts_teardown_debugfs(struct edt_ft5x06_ts_data *tsdata) { } -#endif /* CONFIG_DEBUGFS */ +#endif /* CONFIG_DEBUG_FS */ static int edt_ft5x06_ts_identify (struct i2c_client *client,struct edt_ft5x06_ts_data *tsdata)
Signature · 1 line
2.43.0
[email protected]
AI reviewThank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues:
- [High] Imbalanced disable_irq() causes the touchscreen to remain disabled after resume if suspended while in factory mode. --
commit c833a423ddc21c60c7ceaf7761d2c4e876b25fee
Author: Ethan Nelson-Moore <[email protected]>
Input: edt-ft5x06: correct CONFIG_DEBUG_FS macro name in comment
A comment in the edt-ft5x06 driver incorrectly refers to CONFIG_DEBUGFS instead of CONFIG_DEBUG_FS. Correct it.
drivers/input/touchscreen/edt-ft5x06.c static void edt_ft5x06_ts_teardown_debugfs(struct edt_ft5x06_ts_data *tsdata) · line 828
Quoted 10 lines
drivers/input/touchscreen/edt-ft5x06.c +1
-1@@ -825,7 +825,7 @@ static void edt_ft5x06_ts_teardown_debugfs(struct edt_ft5x06_ts_data *tsdata) { } -#endif /* CONFIG_DEBUGFS */ +#endif /* CONFIG_DEBUG_FS */
[Severity: High]
This is a pre-existing issue, but I noticed an IRQ depth imbalance that causes the touchscreen to remain disabled after resume if suspended while in factory mode.
If the device is placed into factory mode via debugfs, edt_ft5x06_factory_mode() calls disable_irq(), increasing the IRQ disable depth to 1. During system suspend, edt_ft5x06_ts_suspend() unconditionally calls disable_irq(), increasing the depth to 2.
On resume, edt_ft5x06_ts_resume() calls enable_irq() (reducing depth to 1), but then it invokes edt_ft5x06_factory_mode() to restore state:
drivers/input/touchscreen/edt-ft5x06.c:edt_ft5x06_ts_resume() {
...
if (tsdata->factory_mode)
ret = edt_ft5x06_factory_mode(tsdata);
...
}Because edt_ft5x06_factory_mode() unconditionally calls disable_irq() again, the depth goes back to 2:
drivers/input/touchscreen/edt-ft5x06.c:edt_ft5x06_factory_mode() {
...
disable_irq(client->irq);
...
}When the user later switches back to work mode, edt_ft5x06_work_mode() only calls enable_irq() once. Does this leave the IRQ permanently disabled, making the touchscreen entirely unusable?
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1