Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933222AbbENKdz (ORCPT ); Thu, 14 May 2015 06:33:55 -0400 Received: from mailout3.w1.samsung.com ([210.118.77.13]:40319 "EHLO mailout3.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932490AbbENKdx (ORCPT ); Thu, 14 May 2015 06:33:53 -0400 MIME-version: 1.0 Content-type: text/plain; charset=UTF-8; format=flowed X-AuditID: cbfec7f5-f794b6d000001495-5b-55547a0ee650 Content-transfer-encoding: 8BIT Message-id: <55547A0C.3060103@samsung.com> Date: Thu, 14 May 2015 12:33:48 +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: linux-leds@vger.kernel.org, Linux kernel , Bryan Wu , Richard Purdie , Kyungmin Park , Stas Sergeev Subject: Re: [PATCH] leds: fix brightness changing when software blinking is active References: <55535DA4.2010509@list.ru> <55546084.9050704@samsung.com> <55546EAC.70408@list.ru> In-reply-to: <55546EAC.70408@list.ru> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrHLMWRmVeSWpSXmKPExsVy+t/xK7p8VSGhBv+a5C2O7pzIZHG26Q27 xeVdc9gstr5Zx2ixe9dTVovWTQ3MFp1901gc2D12zrrL7nFvy2Vmjz3zf7B69G1ZxejRdKqd 1ePzJrkAtigum5TUnMyy1CJ9uwSujA8z7Ao+clVMfPSGqYHxMkcXIyeHhICJxJInV9ghbDGJ C/fWs3UxcnEICSxllGjbtYINJMErICjxY/I9li5GDg5mAXmJI5eyQcLMAmYSj1rWMUPUP2OU 2Lm8hRmiXkti4tQFLCA2i4CqxLXbtxhBbDYBQ4mfL14zgdiiAhESf07vYwWZKQI0c0NjGcgc ZoFXjBIvXz0EqxcWCJX4PfMr2HFCAgkSx5YuAOvlBJp5cckepgmMArOQnDcL4bxZSM5bwMi8 ilE0tTS5oDgpPddIrzgxt7g0L10vOT93EyMk1L/uYFx6zOoQowAHoxIPL4dhcKgQa2JZcWXu IUYJDmYlEd710SGhQrwpiZVVqUX58UWlOanFhxilOViUxHln7nofIiSQnliSmp2aWpBaBJNl 4uCUAoby10lJK62SXaZWNnn07pbZWu7jtq/86oKXm+6FSdw05n7EKb6Qf9fjy8bLLt6qmfBu Qhj/zkPe9y1VJfSS3E/9uKh2d7uUX+Of7oyV+w/cNFp0tHJeoLjw4chvD/mOim13+3T459U1 /3nDzgQk6pX9ul0pVySWH1ImsN7pj/LWBzf4BY/ZmaxQYinOSDTUYi4qTgQALRlJk3ECAAA= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1600 Lines: 43 On 05/14/2015 11:45 AM, Stas Sergeev wrote: > 14.05.2015 11:44, Jacek Anaszewski пишет: >> >>> if (led_cdev->blink_delay_on || led_cdev->blink_delay_off) { >>> led_cdev->delayed_set_value = brightness; >>> - schedule_work(&led_cdev->set_brightness_work); >> >> This line is still required. Please refer to the patch d23a22a74. > But I really want to get rid of this line and > vacate the work-queue, so that in the future the > per-driver work-queues can be replaced with this. set_brightness_delayed functions can be used for this as well. It would only need to be extended. > Why do you think it is still needed? > Are there any valid cases where you need to disable the > soft-blink from hard-irq context? IMHO the soft-blink is > only disabled as a result of user's actions, which is not > in a hard-irq context. > Could you please explain the use-case? > >>> /* Stop blinking */ >>> + led_stop_software_blink(led_cdev); >> This won't be needed. > Indeed, but with these changes there should be no requirement > for disabling a soft-blink from hard-irq context, which is what > I really wanted to have. What am I missing? > Please look at this [1]. Author mentions setting brightness from sound-card irq handler. [1] http://www.spinics.net/lists/linux-leds/msg00006.html -- 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/