[PATCH v1 1/1] gpio: cdev: return EOPNOTSUPP when HTE is unavailable
From: Iván Ezequiel Rodriguez
Date: Mon Aug 31 2026 - 13:43:02 EST
Map hte_ts_get() -ENODEV to -EOPNOTSUPP so userspace sees the same
errno as when CONFIG_HTE is disabled or EVENT_CLOCK_HTE is unsupported.
Signed-off-by: Iván Ezequiel Rodriguez <ivanrwcm25@xxxxxxxxx>
---
drivers/gpio/gpiolib-cdev.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/gpio/gpiolib-cdev.c b/drivers/gpio/gpiolib-cdev.c
index 9f3b628d5793..6dc01f7ea838 100644
--- a/drivers/gpio/gpiolib-cdev.c
+++ b/drivers/gpio/gpiolib-cdev.c
@@ -715,6 +715,8 @@ static int hte_edge_setup(struct line *line, u64 eflags)
line->desc);
ret = hte_ts_get(NULL, hdesc, 0);
+ if (ret == -ENODEV)
+ return -EOPNOTSUPP;
if (ret)
return ret;
--
2.43.0