From mboxrd@z Thu Jan 1 00:00:00 1970 From: stefan.wahren@i2se.com (Stefan Wahren) Date: Thu, 27 Mar 2014 18:14:59 +0100 Subject: MX28: leds/pwm: Using pwm driven led as heartbeat leads to kernel warning Message-ID: <53345C93.9040005@i2se.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Hello, i'm using a i.MX28 custom board with two leds and Kernel 3.14-rc5. Here is the relevant dts part: pwmleds { compatible = "pwm-leds"; pinctrl-names = "default"; pinctrl-0 = <&pwm0_pins_b>; /* MX28_PAD_AUART1_RX__PWM_0 */ led0 { label = "duckbill:red"; pwms = <&pwm 0 7812500>; max-brightness = <127>; linux,default-trigger = "none"; }; }; gpioleds { compatible = "gpio-leds"; pinctrl-names = "default"; pinctrl-0 = <&led_pins>; led1 { label = "duckbill:green"; gpios = <&gpio3 5 0>; linux,default-trigger = "heartbeat"; }; }; The gpio driven led works perfect as heartbeat. But if i change the trigger of the pwm driven led from none to heartbeat, it results always in a kernel warning and the pwm led keeps on: [ 248.916168] WARNING: CPU: 0 PID: 0 at kernel/locking/mutex.c:856 mutex_trylock+0x184/0x1a4() [ 248.924745] DEBUG_LOCKS_WARN_ON(in_interrupt()) [ 248.929136] Modules linked in: [ 248.932517] CPU: 0 PID: 0 Comm: swapper Not tainted 3.14.0-rc5 #18 [ 248.938781] [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [ 248.946672] [] (show_stack) from [] (warn_slowpath_common+0x6c/0x8c) [ 248.954902] [] (warn_slowpath_common) from [] (warn_slowpath_fmt+0x30/0x40) [ 248.963742] [] (warn_slowpath_fmt) from [] (mutex_trylock+0x184/0x1a4) [ 248.972147] [] (mutex_trylock) from [] (clk_prepare_lock+0xc/0xec) [ 248.980132] [] (clk_prepare_lock) from [] (clk_get_rate+0xc/0x68) [ 248.988105] [] (clk_get_rate) from [] (mxs_pwm_config+0x20/0x198) [ 248.996098] [] (mxs_pwm_config) from [] (pwm_config+0x60/0x70) [ 249.003824] [] (pwm_config) from [] (__led_pwm_set+0x1c/0x3c) [ 249.011442] [] (__led_pwm_set) from [] (led_heartbeat_function+0x70/0x110) [ 249.020114] [] (led_heartbeat_function) from [] (call_timer_fn+0x7c/0x164) [ 249.028856] [] (call_timer_fn) from [] (run_timer_softirq+0x1f0/0x260) [ 249.037267] [] (run_timer_softirq) from [] (__do_softirq+0xc4/0x2f0) [ 249.045507] [] (__do_softirq) from [] (irq_exit+0xa4/0x10c) [ 249.052966] [] (irq_exit) from [] (handle_IRQ+0x34/0x84) [ 249.060079] [] (handle_IRQ) from [] (__irq_svc+0x44/0x54) [ 249.067358] [] (__irq_svc) from [] (arch_cpu_idle+0x40/0x48) [ 249.074916] [] (arch_cpu_idle) from [] (cpu_startup_entry+0x70/0x198) [ 249.083258] [] (cpu_startup_entry) from [] (start_kernel+0x2a8/0x2f8) Best regards Stefan Wahren