Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753093AbdDJJwg (ORCPT ); Mon, 10 Apr 2017 05:52:36 -0400 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:39915 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751134AbdDJJwf (ORCPT ); Mon, 10 Apr 2017 05:52:35 -0400 Date: Mon, 10 Apr 2017 11:52:08 +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: <20170410095207.GA4475@xo-6d-61-c0.localdomain> References: <20170323055435.29197-1-bjorn.andersson@linaro.org> <20170323203749.GB8563@amd> <20170329021734.afhqmfpmbcjyv7bu@rob-hp-laptop> <20170329190725.GN20094@minitux> <20170329222301.GB7977@amd> <20170330000955.GP20094@minitux> <20170330074309.GA28533@amd> <1192806d-13bf-3b5c-4179-b7795737ed40@gmail.com> <20170403182158.GV20094@minitux> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170403182158.GV20094@minitux> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1440 Lines: 33 Hi! > > Actually we could achieve the goal by listing all available pattern > > configurations for given LED class device, so in case of Qualcomm LPG > > driver we could have transition-pattern-1 to transition-pattern-15 > > listed after executing "cat trigger". > > > > There's a common pattern-table of 24 (or 64) entries, that is shared > among the 8 LPGs (each LPG simply has to indices pointing into the > shared table). Each entry in the table holds a value between 0 and 511. > So that's a lot of "available pattern configurations". > > I wonder if I'm not missing some vital constraints here that could > > make this design unfeasible. > > > > Regardless of how we expose RGBs to userspace, the 8 LPG hardware blocks > are independent of each other. The fact that they end up controlling > something that is perceived by the human eye as some mixed color is to > me a matter of system integration, and as such should not convolute the > implementation of the individual instances. Well... the 8 LPG blocks share the pattern-table.. and the pattern-table is very limited. We could statically allocate 3 entries to each LPG block, but that would not be too useful. And if we dynamically allocate entries depending on patterns, then the LPG blocks are no longer independent. Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html