From cf216bf4b39ec728f565e63242aedab115f570d3 Mon Sep 17 00:00:00 2001 From: theshaun Date: Sat, 7 Mar 2026 14:34:37 +1000 Subject: [PATCH] Adjust periphery implementation to not use GPIO_V2_LINE_FLAG_EVENT_CLOCK_REALTIME in order to support older kernals without the need for gpiod --- src/pymc_core/hardware/gpio_manager.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/pymc_core/hardware/gpio_manager.py b/src/pymc_core/hardware/gpio_manager.py index 75f8455..9e04ac5 100644 --- a/src/pymc_core/hardware/gpio_manager.py +++ b/src/pymc_core/hardware/gpio_manager.py @@ -14,6 +14,9 @@ try: from periphery import GPIO, EdgeEvent + # We don't need the realtime event clock for our use case and it breaks support on older kernels, so disable it if present + import periphery.gpio_cdev2 as _cdev + _cdev.Cdev2GPIO._GPIO_V2_LINE_FLAG_EVENT_CLOCK_REALTIME = 0 PERIPHERY_AVAILABLE = True except ImportError: # Mock GPIO classes for testing/non-hardware environments