Re: [PATCH v2 2/2] leds: Add control of the voltage/current regulator to the LED core

From: Jean-Jacques Hiblot
Date: Wed Jul 17 2019 - 09:23:27 EST


Hi Jacek,

On 15/07/2019 22:42, Jacek Anaszewski wrote:
@@ -80,6 +107,7 @@ static void led_timer_function(struct timer_list *t)
}
led_set_brightness_nosleep(led_cdev, brightness);
+ __led_handle_regulator(led_cdev, brightness);
This cannot be called from atomic context since regulator_enable/disable
use mutex beneath, that can sleep on contention. Therefore this call
has to be made in two places instead:

__led_set_brightness()
__led_set_brightness_blocking()

Thanks. I'll fix this in v3.

JJ