From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pali =?utf-8?B?Um9ow6Fy?= Subject: Re: [PATCH v5 2/6] leds: triggers: Add a keyboard backlight trigger Date: Thu, 24 Nov 2016 10:15:25 +0100 Message-ID: <20161124091525.GG13735@pali> References: <201611201605.17631@pali> <20161120162116.GA15737@amd> <0c4e7840-064c-5d8a-c5eb-8afe71727fcd@samsung.com> <3d623840-34c0-9d93-9eba-92e4198e4fff@redhat.com> <05766b18-026a-2af3-def8-9289ddb55234@samsung.com> <4fcc36c6-498b-0ce7-a7c8-28c214ccef88@redhat.com> <20161122145825.GS13735@pali> <6e8c3884-fec1-461a-e9b8-2020176ada93@samsung.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Content-Disposition: inline In-Reply-To: <6e8c3884-fec1-461a-e9b8-2020176ada93@samsung.com> Sender: platform-driver-x86-owner@vger.kernel.org To: Jacek Anaszewski Cc: gdg@zplane.com, Hans de Goede , Pavel Machek , Jacek Anaszewski , Darren Hart , Matthew Garrett , Henrique de Moraes Holschuh , Richard Purdie , ibm-acpi-devel@lists.sourceforge.net, platform-driver-x86@vger.kernel.org, linux-leds@vger.kernel.org List-Id: linux-leds@vger.kernel.org On Wednesday 23 November 2016 12:01:02 Jacek Anaszewski wrote: > I would also appreciate your opinion on the other solution to the > problem of notifying brightness changes originating from hardware, > i.e. hw_brightness_change{_ro} file, that would support POLLPRI events, > and reading brightness. Another idea: If no trigger is active then led subsystem will invoke POLLPRI on "brightness" sysfs file. And if there is active trigger then only trigger code could invoke POLLPRI on "brightness" file. This could solve problem with high CPU load and power usage when e.g. cpu trigger is active (and cpu trigger will not implement any POLLPRI). Do not know if this is really enough for your situation, it is just and another idea. But first please update documentation in ABI/testing to match current situation. That is really needed. -- Pali Rohár pali.rohar@gmail.com