Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933528AbcKOK6Q (ORCPT ); Tue, 15 Nov 2016 05:58:16 -0500 Received: from mailout4.w1.samsung.com ([210.118.77.14]:29400 "EHLO mailout4.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751783AbcKOK6M (ORCPT ); Tue, 15 Nov 2016 05:58:12 -0500 X-AuditID: cbfec7ef-f79e76d000005b57-56-582aea413700 Subject: Re: LEDs that change brightness "itself" -- that's a trigger. Re: PM regression with LED changes in next-20161109 To: Pavel Machek , Hans de Goede Cc: Jacek Anaszewski , Tony Lindgren , linux-leds@vger.kernel.org, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Darren Hart From: Jacek Anaszewski Message-id: <4e392d5d-eb10-f285-517e-976a55c3e318@samsung.com> Date: Tue, 15 Nov 2016 11:58:06 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-version: 1.0 In-reply-to: <20161115103133.GA22860@amd> Content-type: text/plain; charset=windows-1252; format=flowed Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrAKsWRmVeSWpSXmKPExsWy7djP87qOr7QiDOZtkLboWmhg8eb4dCaL 21s3sFhsenyN1eLyrjlsFlvfrGO0mL2kn8Xi7qmjbBb7r3g5cHp8+zqJxWPnrLvsHptXaHls XlLv8X7fVTaPFau/s3t83iQXwB7FZZOSmpNZllqkb5fAlTFj3i3GggWcFc86VjE3MB5k72Lk 5JAQMJG4sqGVCcIWk7hwbz1bFyMXh5DAMkaJmbN2M0M4nxkl9nztBHI4wDq6V0rBFV299AOq 6BmjxIaJK8HGCgvUSFza3MwMYosIuEhMWjqDEaSIWeAno0Tv+i42kASbgKHEzxevwXbzCthJ zJ+0E6yZRUBVYnH7XHaQbaICERK776ZClAhK/Jh8jwUkzCmgKbFkgS5ImFnA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qXrpecn7uJERh724793LyD8dLG4EOMAhyMSjy8O45q RgixJpYVV+YeYpTgYFYS4WV+qRUhxJuSWFmVWpQfX1Sak1p8iNEU6IeJzFKiyfnAtJBXEm9o YmhuaWhkbGFhbmSkJM5b8uFKuJBAemJJanZqakFqEUwfEwenVANj3Ldf2Zm732a+sXnLV7r+ 74oVaqlzGXQmtz/Zp20/wWje4Rmurn8STi2/16Pb+e25aoCwnsttdjvv2Zxn/2sLvm3p6br6 bE31a7Ful79rS37dKb+VnFXNOyvBeEOuv9W7tSwis7julOhsdXuy0inL752y1bIPVzpY3+2c rG49Yf+BbZ5nwk9VKrEUZyQaajEXFScCAAwQUFzTAgAA X-MTR: 20000000000000000@CPGS X-CMS-MailID: 20161115105807eucas1p2dc4f971c2ab7fc7ccfd649ad78c4d13b X-Msg-Generator: CA X-Sender-IP: 182.198.249.179 X-Local-Sender: =?UTF-8?B?SmFjZWsgQW5hc3pld3NraRtTUlBPTC1TeXN0ZW0gRlcgIChN?= =?UTF-8?B?Qikb7IK87ISx7KCE7J6QG1NlbmlvciBTb2Z0d2FyZSBFbmdpbmVlcg==?= X-Global-Sender: =?UTF-8?B?SmFjZWsgQW5hc3pld3NraRtTUlBPTC1TeXN0ZW0gRlcgIChN?= =?UTF-8?B?QikbU2Ftc3VuZyBFbGVjdHJvbmljcxtTZW5pb3IgU29mdHdhcmUgRW5naW5l?= =?UTF-8?B?ZXI=?= X-Sender-Code: =?UTF-8?B?QzEwG0VIURtDMTBDRDAyQ0QwMjc1MjY=?= CMS-TYPE: 201P X-HopCount: 7 X-CMS-RootMailID: 20161115103141epcas2p251f2521354a8cd7b9dfcfe55bfa482f0 X-RootMTR: 20161115103141epcas2p251f2521354a8cd7b9dfcfe55bfa482f0 References: <4c31faef-144d-289c-0e32-83e76aff6178@gmail.com> <3eb60c78-d891-27e5-6b7b-a54a5b547a1c@redhat.com> <9b476f85-d45e-deb6-335d-fc56f6d90350@redhat.com> <127cdd42-6fd8-c671-60b7-3826b351577f@samsung.com> <15cafbf5-d842-e184-2fd4-65f8272f505a@redhat.com> <20161115103133.GA22860@amd> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1151 Lines: 33 On 11/15/2016 11:31 AM, Pavel Machek wrote: > Hi! > >>> Hmm, v4 still calls led_notify_brightness_change(led_cdev) >> >from both __led_set_brightness() and __led_set_brightness_blocking(). >> >> Ugh, I see I accidentally send a v4 twice, instead of >> calling the version which dropped those called v5 as >> I should have, sorry. >> >> The v4 which I would like to see merged, the one with >> those calls dropped, is here: >> >> https://patchwork.kernel.org/patch/9423093/ > > Please, lets fix this properly. > > The LED you are talking about _has_ a trigger, implemented in > hardware. That trigger can change LED brightness behind kernel's (and > userspace's) back. Don't pretend the trigger does not exist, it does. > > And when you do that, you'll have nice place to report changes to > userspace -- trigger can now export that information, and offer poll() > interface. Well, that sounds interesting. It is logically justifiable. I initially proposed exactly this solution, with recently added userspace LED being a trigger listener. It seems a bit awkward though. How would you listen to the trigger events? -- Best regards, Jacek Anaszewski