From: Steve Jeong Date: Fri, 15 Dec 2023 01:45:11 +0000 (+0000) Subject: generic_linux: pwmout: Remove duty-cycle reset in deinit flow X-Git-Tag: 8.28.0~3^2 X-Git-Url: https://git.ayoreis.com/Adafruit_Blinka-hackapet.git/commitdiff_plain/869fb8c260870faeca7c61f346f729a713419b7c?ds=inline 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 --- 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)