Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752897AbbF3NGe (ORCPT ); Tue, 30 Jun 2015 09:06:34 -0400 Received: from mailout3.w1.samsung.com ([210.118.77.13]:55845 "EHLO mailout3.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752467AbbF3NGZ (ORCPT ); Tue, 30 Jun 2015 09:06:25 -0400 X-AuditID: cbfec7f5-f794b6d000001495-71-5592944eae49 Message-id: <5592944B.5020809@samsung.com> Date: Tue, 30 Jun 2015 15:06:19 +0200 From: Jacek Anaszewski User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130804 Thunderbird/17.0.8 MIME-version: 1.0 To: Pavel Machek Cc: linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org, Bryan Wu , Richard Purdie , Stas Sergeev , 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 , =?ISO-8859-1?Q?M=E1rton_N=E9meth?= , 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 , =?ISO-8859-1?Q?=C1lvaro_Fern=E1ndez_Rojas?= 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> <20150630115809.GA13605@amd> In-reply-to: <20150630115809.GA13605@amd> Content-type: text/plain; charset=ISO-8859-1; format=flowed Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA02SbUxTZxSAfe/73ttLtfOuir5zMWKNJLqpQ8xy1GkwY8v9ZTSBxJiodHoF I19pQWVZYimaVEGEFlnWsLoZay0iKF9iGa6WFNDK0DCmsIFiKLLKh6BgseAHbUz495xznvPx 4/BY6WWX8IdSMyRNqjpZxcmJ523z32u2Fxnjv+rtXw65DQUE2rpdGKymOLj9+DjYPC8JFD8w Yihzfwfnevs4cN8sZOCPWi8G/bSPQLb9TwZK2k4QKAqUsJDrqWYhx38QJkbuERi5bmHgRtdb DKb60yzUdb7i4N/yuxzoH+WxMFllkIHlDgV3o4OFoikbA+2OEg5qBssR+PNrOShorJKB7U05 geHhAAHv2dsyaDivI/C69R2GwToPC2X/uVgI5NYTyHd9Bu5rsdDe6iZw/amZAe+9LgTNLXcY mGx4gqHe4WVhrHqCgYo+OYxPxsCp/GISEy2+q7qARF/HNvFyTzcjvrRfImLHm1IsVts7GdFi biHipZNXsHjR4JeJ42M+mXjT3C0TX4zuFS1WJxYrS09xoumfPFa0tz9hdkTuln9zQEo+dETS rNuaIE/yZf+UruOPXWm0Eh1ycadRGE+FDfRc37QsxIvo/Z6KD3k5rxSsiDqtDjYU9CP62ttE ZiyFsJrqB4aDTISV9Jq/As0wJ0TRyYHnzAyHC7volOcWG/I/pX5TT9BfKETQgSEbnhmKBeN8 erHtVrB5gSDRRkNx8CSlcJAONQ0FOUxYRccD7uBQLGymdmMtCvEyWlU2hAuQYJ61wzxLM8/S fkO4FIVLmfvTtT8kpqxfq1WnaDNTE9fuT0upRKHnG69D1qZNLiTwSDVPkeAtjFey6iParBQX ojxWLVTk6Y3xSsUBddaPkiZtnyYzWdK60Oc8US1W/OIYiVMKieoM6bAkpUuaj1WGD1uiQ5bB 6anU7NFW2bFq2+7+0YhY1pA09muhoE+L+X9Lr38sJ8OZs62j37ZibsfvXy7dHt3UeT/u6sTS zLCjW+I2zoktNUXW2OdLT6eenbSE7zxs8AaWPVznLDqxarDZOvpXxc+f1J+d07DA94Xz24jz 0XssZ3Bk+eaVvsXfo74HLV/rXmXVqIg2SR21Gmu06vfXQUXKeAMAAA== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1245 Lines: 29 On 06/30/2015 01:58 PM, Pavel Machek wrote: > On Tue 2015-06-30 10:01:08, Jacek Anaszewski wrote: >> This patch rearranges the core LED subsystem code, so that it >> now removes from drivers the responsibility of using work queues >> internally in case their brightness_set ops can sleep. >> Addition of two flags: LED_BRIGHTNESS_FAST and LED_BLINK_DISABLE >> as well as new_brightness_value property to the struct led_classdev >> allows for employing existing set_brightness_work to do the job. >> The modifications allow also to get rid of brightness_set_sync op, >> as flash LED devices can now be handled properly only basing on the >> SET_BRIGHTNESS_SYNC flag. > > Are you sure this is good idea? > > You'll now use single callback for blocking and non-blocking > behaviour. I'm pretty sure stuff like lockdep will have some fun with > that. I enabled "Lock Debugging" options and didn't get any warning. Could you describe the use case you are thinking of? -- 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/