* [PATCH v1 0/1] gpio: cdev: EOPNOTSUPP when HTE unavailable
@ 2026-08-31 15:23 Iván Ezequiel Rodriguez
2026-08-31 15:23 ` [PATCH v1 1/1] gpio: cdev: return EOPNOTSUPP when HTE is unavailable Iván Ezequiel Rodriguez
0 siblings, 1 reply; 3+ messages in thread
From: Iván Ezequiel Rodriguez @ 2026-08-31 15:23 UTC (permalink / raw)
To: Bartosz Golaszewski
Cc: Linus Walleij, Kent Gibson, linux-gpio, linux-kernel,
Iván Ezequiel Rodriguez
Hi,
When CONFIG_HTE is enabled but hte_ts_get() returns -ENODEV (no HTE
provider for the line), gpiolib-cdev currently propagates -ENODEV to
userspace.
Map that to -EOPNOTSUPP so it matches the errno already returned when
CONFIG_HTE is disabled or GPIO_V2_LINE_FLAG_EVENT_CLOCK_HTE is
otherwise unsupported.
Base: v7.3-rc1
Tested: built with CONFIG_GPIOLIB=y, CONFIG_GPIO_CDEV=y, CONFIG_HTE=y.
QEMU smoke for the HTE ioctl path was skipped (no gpiochip0 in this
guest); the change is a one-line errno remap on the existing error
path.
Thanks,
Iván
Iván Ezequiel Rodriguez (1):
gpio: cdev: return EOPNOTSUPP when HTE is unavailable
drivers/gpio/gpiolib-cdev.c | 2 ++
1 file changed, 2 insertions(+)
--
2.43.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH v1 1/1] gpio: cdev: return EOPNOTSUPP when HTE is unavailable
2026-08-31 15:23 [PATCH v1 0/1] gpio: cdev: EOPNOTSUPP when HTE unavailable Iván Ezequiel Rodriguez
@ 2026-08-31 15:23 ` Iván Ezequiel Rodriguez
2026-09-02 10:37 ` Bartosz Golaszewski
0 siblings, 1 reply; 3+ messages in thread
From: Iván Ezequiel Rodriguez @ 2026-08-31 15:23 UTC (permalink / raw)
To: Bartosz Golaszewski
Cc: Linus Walleij, Kent Gibson, linux-gpio, linux-kernel,
Iván Ezequiel Rodriguez
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@gmail.com>
---
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v1 1/1] gpio: cdev: return EOPNOTSUPP when HTE is unavailable
2026-08-31 15:23 ` [PATCH v1 1/1] gpio: cdev: return EOPNOTSUPP when HTE is unavailable Iván Ezequiel Rodriguez
@ 2026-09-02 10:37 ` Bartosz Golaszewski
0 siblings, 0 replies; 3+ messages in thread
From: Bartosz Golaszewski @ 2026-09-02 10:37 UTC (permalink / raw)
To: Bartosz Golaszewski, Iván Ezequiel Rodriguez
Cc: Bartosz Golaszewski, Linus Walleij, Kent Gibson, linux-gpio,
linux-kernel
On Mon, 31 Aug 2026 12:23:06 -0300, Iván Ezequiel Rodriguez wrote:
> 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.
>
>
Makes sense. I hope it will not break any user-space users, though that's
highly unlikely.
[1/1] gpio: cdev: return EOPNOTSUPP when HTE is unavailable
https://git.kernel.org/brgl/c/cf176c115497bc6462391c3118bedfd212092c4d
Best regards,
--
Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-09-02 10:37 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-31 15:23 [PATCH v1 0/1] gpio: cdev: EOPNOTSUPP when HTE unavailable Iván Ezequiel Rodriguez
2026-08-31 15:23 ` [PATCH v1 1/1] gpio: cdev: return EOPNOTSUPP when HTE is unavailable Iván Ezequiel Rodriguez
2026-09-02 10:37 ` Bartosz Golaszewski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®