Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752072AbdDHJeD (ORCPT ); Sat, 8 Apr 2017 05:34:03 -0400 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:33894 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750986AbdDHJdx (ORCPT ); Sat, 8 Apr 2017 05:33:53 -0400 Date: Sat, 8 Apr 2017 11:33:50 +0200 From: Pavel Machek To: Bjorn Andersson Cc: Jacek Anaszewski , Rob Herring , Richard Purdie , linux-kernel@vger.kernel.org, linux-leds@vger.kernel.org, linux-arm-msm@vger.kernel.org, Mark Rutland , devicetree@vger.kernel.org Subject: Re: [PATCH 1/2] leds: Add driver for Qualcomm LPG Message-ID: <20170408093350.GA17007@amd> References: <20170323203749.GB8563@amd> <20170329021734.afhqmfpmbcjyv7bu@rob-hp-laptop> <20170329190725.GN20094@minitux> <20170329222301.GB7977@amd> <20170330000955.GP20094@minitux> <20170330074309.GA28533@amd> <20170403190032.GX20094@minitux> <20170407133223.GE4756@amd> <20170407203649.GD15143@minitux> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="W/nzBZO5zC0uMSeA" Content-Disposition: inline In-Reply-To: <20170407203649.GD15143@minitux> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1883 Lines: 56 --W/nzBZO5zC0uMSeA Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri 2017-04-07 13:36:49, Bjorn Andersson wrote: > On Fri 07 Apr 06:32 PDT 2017, Pavel Machek wrote: >=20 > > > For the patterns I don't know how a trigger for this would look like, > > > how would setting the pattern of a trigger be propagated down to the > > > hardware? > >=20 > > Well... I'm not sure if we _want_ to do triggers for > > patterns. LED triggers change rather quickly (100 times a second?) so > > doing them in kernel makes sense. Patterns take 10s of seconds, so we > > do not need to handle them in kernel.=20 > >=20 >=20 > On any current Qualcomm based phone (using the Qualcomm PMIC to drive > the RGB notification LED) the patterns are hard coded in DeviceTree and > the option you have in runtime is to enable/disable the usage of the > configured pattern and a few knobs of how to traverse the configured > pattern. Yes... that's easy, but I believe too limiting. Users will want to configure their own patterns for their own events. > When you enter e.g. a low-battery scenario you trigger the red LED to > run its low-battery-pattern and you don't touch it until there's a > higher prio notification (e.g. someone connects the charger). Yes, I have something like that, too. https://gitlab.com/tui/tui/blob/master/ofone/watchdog.py Pavel --=20 (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blo= g.html --W/nzBZO5zC0uMSeA Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAljorn4ACgkQMOfwapXb+vLeNQCePZEaXBPoXM2ZXlFPKDAjCY5V Ab8AnRZhUGpFAvd4QjKrPM7/KFPbdUfY =fwee -----END PGP SIGNATURE----- --W/nzBZO5zC0uMSeA--