From 869fb8c260870faeca7c61f346f729a713419b7c Mon Sep 17 00:00:00 2001 From: Steve Jeong Date: Fri, 15 Dec 2023 01:45:11 +0000 Subject: [PATCH] generic_linux: pwmout: Remove duty-cycle reset in deinit flow The 'deinit' function is called each time a property value is read and written. However, the duty cycle continues to reset, so the sysfs PWM does not work properly. Signed-off-by: Steve Jeong --- .../microcontroller/generic_linux/sysfs_pwmout.py | 1 - 1 file changed, 1 deletion(-) diff --git a/src/adafruit_blinka/microcontroller/generic_linux/sysfs_pwmout.py b/src/adafruit_blinka/microcontroller/generic_linux/sysfs_pwmout.py index 4aca0a2..9bf2602 100644 --- a/src/adafruit_blinka/microcontroller/generic_linux/sysfs_pwmout.py +++ b/src/adafruit_blinka/microcontroller/generic_linux/sysfs_pwmout.py @@ -158,7 +158,6 @@ class PWMOut: def deinit(self): """Deinit the sysfs PWM.""" if self._channel is not None: - self.duty_cycle = 0 try: channel_path = os.path.join( self._sysfs_path, self._channel_path.format(self._channel) -- 2.49.0