Setting multi-color intensities stops software blink

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I'm experiencing an issue with multi-color LEDs when setting the intensities while software blinking is active (e.g. trigger=timer). This manifests itself by delay_on and delay_off being set to 0 when writing multi_intensities while the LED is off. If doing this while the LED is on, everything works as expected.

I suspect that this happens because multi_intensity_store() calls led_set_brightness(led_cdev, led_cdev->brightness) at the end. It seems like the software blinking modifies led_cdev->brightness directly, so if the LED is in its off-phase, we're effectively switching the LED off because we're setting its brightness to 0 which clears delay_on and delay_off to 0:

led_set_brightness(brightness=0): sets LED_BLINK_DISABLE
 -> set_brightness_delayed()
  -> led_stop_software_blink(): clears blink delays

How would one fix this properly? Should multi_intensity_store() call led_set_brightness() with brightness=led_cdev->blink_brightness if blinking is active? That feels like an unclean solution.

I'm hoping for some input. Thanks :)

Best regards,
Sven




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux