Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752813AbbF3I1q (ORCPT ); Tue, 30 Jun 2015 04:27:46 -0400 Received: from mailout1.w1.samsung.com ([210.118.77.11]:34278 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750952AbbF3I1a (ORCPT ); Tue, 30 Jun 2015 04:27:30 -0400 MIME-version: 1.0 Content-type: text/plain; charset=UTF-8; format=flowed X-AuditID: cbfec7f4-f79c56d0000012ee-c6-559252ef8413 Content-transfer-encoding: 8BIT Message-id: <559252EC.2050906@samsung.com> Date: Tue, 30 Jun 2015 10:27:24 +0200 From: Jacek Anaszewski User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130804 Thunderbird/17.0.8 To: Stas Sergeev Cc: Jacek Anaszewski , linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org, Bryan Wu , Richard Purdie , Pavel Machek , Sakari Ailus , Andreas Werner , Andrew Lunn , Antonio Ospite , Atsushi Nemoto , Ben Dooks , Chris Boot , Dan Murphy , Daniel Jeong , Daniel Mack , "David S. Miller" , Fabio Baltieri , Felipe Balbi , Florian Fainelli , "G.Shark Jeong" , Guennadi Liakhovetski , Ingi Kim , Jan-Simon Moeller , Johan Hovold , John Lenz , Jonas Gorski , Kim Kyuwon , Kristian Kielhofner , Kristoffer Ericson , Linus Walleij , Mark Brown , Michael Hennerich , Milo Kim , =?UTF-8?B?TcOhcnRvbiBOw6ltZXRo?= , Nate Case , NeilBrown , Nick Forbes , Paul Parsons , Peter Meerwald , Phil Sutter , Philippe Retornaz , Raphael Assenat , Richard Purdie , Rod Whitby , Dave Hansen , Rodolfo Giometti , "Sebastian A. Siewior" , Shuah Khan , Simon Guinot , =?UTF-8?B?w4FsdmFybyBGZXJuw6FuZGV6IFJvamFz?= Subject: Re: [PATCH/RFC RESEND] leds: Use set_brightness_work for brightness_set ops that can sleep References: <1435651268-9657-1-git-send-email-j.anaszewski@samsung.com> In-reply-to: <1435651268-9657-1-git-send-email-j.anaszewski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA02Sa0xTZxzG9573PaeHzsZ3xcuLS7ak2SUh80Ikyz9KFrZk8XzY3MIkI0s2 V/WMEgqSFjrlg6JiUm7lKi5NqWQMGUzrKEyhiBuFolAImwgRFVQUK8jo5rWFAlrIMr89+T/P /8nvwyNi9X1+nZiSnikb0rV6jaAk3oWLV9b7E8oSN9kqIqGgvYTAwKgbQ235Dui4eRDqvI8I VP5VhuGU52M4dvuuAJ7WUg7On53AcHh+isCh+t85sA3kEqiYs/FQ4G3m4UjgO3jq7yPgb7Rz cO7aAobytnweWkYeC1A05ENw3dErwOGrhTwEm8wKsPcw8HS6eKgI1XEw6LIJ8Nu0A0HAclaA ks4mBdTNOgjMzMwRmCjuUED7iRwCz/oXMUy3eHk4dcPNw1xBGwGLOwpGez0CDPZ7CDSOWzmY 6LuG4OKlHg6C7bcwtLkmeHjY/JSDM3eV8CQYD3mWShIfKy02/YikqaEPpZ/HRjnpUf1JIg3N NmCpuX6Ek04e/QVLP5kDCunJwymF1GodVUj//PuNZK/9A0vOhjxBKh8u5KX6wVucdGP4vPD5 O18p4/bI+hSTbNj4wbdKXfDICSHjnLCvsfoZzkFmPh9FiIzGMl/xorCs17A/x8680EpRTWsR q7EN47Choq+xQPkYyUeiiOmbrOtyaviM6ftsPNeBl/P3EDt+vVsIZ1Q0mvks28MZQt9mzsHg Ur9AY1jw/gMurFfTJBbyXlhiWEXXs6JAFx/uwfTXlWymNI+EjUgqs05z5dKzmm5j9h4XCvdH UIk5jq8oQdT6Ep31fzrrS3TVCDeg1XLW7gzjruS0mA1GbZoxKz15w+69aU60vL/HLaime4sb URFpVqhafKWJal5rMu5PcyMmYs0q1YGoskS1ao92f7Zs2LvTkKWXjW70ukg0a1VVLv8ONU3W ZsqpspwhG/5zOTFiXQ5KmY206aoMk5O5xdXzFn2SXfdeRkdhqPXgR58av59e3Lf5dPed05m6 L740hY7Fj/ev8eoHeoWRd81fz1/xRaHse/05F1C0M+GTquaFotQuPGJyTqqPLpj8hz77uzT1 QdIrceLWHxJe3VWz7dLW7SUz3uzJvuS33ti5SbkyzuuJDcXoNMSo08ZEY4NR+xxcGNIeewMA AA== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1046 Lines: 27 On 06/29/2015 05:17 PM, Stas Sergeev wrote:> 29.06.2015 17:05, Jacek Anaszewski пишет: >> + * If need to disable soft blinking delegate this to the >> + * work queue task to avoid problems in case we are >> + * called from hard irq context. >> + */ >> + led_cdev->flags |= LED_BLINK_DISABLE; > Wouldn't it be better to just enforce the callers > to explicitly disable software blink, so that it to > never happen from irq context? Something like in this > patch: > https://lkml.org/lkml/2015/5/13/491 > Blinking can be disabled not only by removing trigger explicitly, but also by setting brightness to 0 and led_set_brightness can be called from hard irq context. set_brightness_work was originally introduced exactly for this use case. -- Best Regards, Jacek Anaszewski -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/