Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp1556451ybp; Wed, 9 Oct 2019 16:26:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqws9yrVale0yEBwjGypqypy5wUB07R1NQSH3mGn1l1H2e32ti1qXk1GjF8I2dwtLIB+6Rbu X-Received: by 2002:aa7:c2d7:: with SMTP id m23mr5386000edp.206.1570663580722; Wed, 09 Oct 2019 16:26:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570663580; cv=none; d=google.com; s=arc-20160816; b=CASS6yIthZCsSVUUdwEFmMJXaR68Q977+pp82zQWJEJ56pFdSanhNQgyvnZm2FcB4P S0+Dpi6EJISHDcVAHWP6IDHPvbFTR4ePzXK+FYQOY5JgDmPPJGoKFK7bD3cn/Ev8mWaN Slr3Pv1Y4xYxA3RjYrnYC8dSC0vOrCqcZhnUasKUwfagnF+/aFsIYGiwEV6DA7nWqrx/ o9F79irIryYR8bzDtCh7RATO1dWus01gNW6S5hBaVd2mtJuKOjFZkPDWSrz8COIuIPSq Jko0viivuHTMaxw1EWcPu6/j8qMvhKf71F0Bjzb//x6t2KieKp7bMZ8j+klJmyY1Wpct T5PQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=nlXGRir7qxNg9h2YHpsllSmIDcGkVZs+qNLw+3OKCsk=; b=K9By4xopo9GfRjqvXz85Rt11eM2y0J3otlpSWXYC9Dw1l1jE6ehJy9fFQhalcffdjk IdGBC/IrDAvE/GExyGlHRSTJAu6KIYHMD1UbvUbFKEMK4UQY1qH7KYdE/grwwhWqT571 coGfqK8t5qo09zTYBQKz/3cDMISBPS3RfI5yyrgNb/sa8PRfCmjf/ETsmPqYG5g/N99U BsGXC96XUtqksdIkKRCJ21efYT8A39sFvQ4RRU9yO2itDQZGRGTRAxZR8Vykq7az9+RR OnBsRzZ+juJIQ6nYdeO90Uz/5m26uPKXLwHqm/saL/TTY8Vs5vYldMVhQt8RPI0nFufv Nctw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=x34chc1l; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 5si2355113edy.95.2019.10.09.16.25.56; Wed, 09 Oct 2019 16:26:20 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=x34chc1l; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732395AbfJIXZn (ORCPT + 99 others); Wed, 9 Oct 2019 19:25:43 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:35284 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730900AbfJIXZn (ORCPT ); Wed, 9 Oct 2019 19:25:43 -0400 Received: by mail-pg1-f194.google.com with SMTP id p30so2419630pgl.2 for ; Wed, 09 Oct 2019 16:25:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=nlXGRir7qxNg9h2YHpsllSmIDcGkVZs+qNLw+3OKCsk=; b=x34chc1l4jhUZ+ieWqc/QAPmxIUsAJEfqo1ezDT7BobFrWN6CVavsRTggcyCxErecR YdtdK52rVs80vijSYalZdizlf+im10l6PzquuIoOJ9IkiTVY8jhcKzAgTu260eGu7qez YW7b0/lEKyjdcZNVRisYcSrcC52nmpqRX0WPUIHFx1t5WNPZKBpUKz+/ZLEnCLDzo1JB aAOYMm7hFT2kLclTZohWvBVopRkNgw0dicBjSBI3qFxrarqGlHr5IpUpqCMyvaSvqNUQ XdOnLzIdHBWBlxFUNjytOETYTlxng1UlLjirJN+q4vflwCkudObWX26WWbTisccwAz2r DCYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=nlXGRir7qxNg9h2YHpsllSmIDcGkVZs+qNLw+3OKCsk=; b=RNEawtpgSBGkxEElygZf/EOFwyhMAPnxCIi5l/BP5apK24ODEX8NRVLz80Kl8wyoPJ onuVB5BGgvIivKCnzWkz2WquYRUgDeuXjAwTG2yO9bilHa+kFIb4dyR9+Vw2jar0RmNl GUsG+gtmEQi/eJs0Aq0t084n18ip1xYzovMjk5FwLcc461IyPLsU5ONlD1i17C11qhsE tAd6j4LOZMi7c/Uyj9ZvMQDx2n63JDDUb8DSZ7si9bO4Bm3J5sGVLKkrKusltRdBNe44 EUd5YAabmxYq6OxV8A8cWaw39ickwa5xUg0rwpDUwZsTKUCQDg4g0oL+mFD/Hpp4LS4x O67A== X-Gm-Message-State: APjAAAVamdXrY0vd7uhpWUe84qFy6RtDpAyLa83OgzH7hKR7Wybong+I xkNNcg+sjwYPNiXBkoD3cnE3eg== X-Received: by 2002:a17:90a:3623:: with SMTP id s32mr7334902pjb.42.1570663542101; Wed, 09 Oct 2019 16:25:42 -0700 (PDT) Received: from minitux (104-188-17-28.lightspeed.sndgca.sbcglobal.net. [104.188.17.28]) by smtp.gmail.com with ESMTPSA id j25sm3132946pfi.113.2019.10.09.16.25.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Oct 2019 16:25:41 -0700 (PDT) Date: Wed, 9 Oct 2019 16:25:39 -0700 From: Bjorn Andersson To: Dan Murphy Cc: Jacek Anaszewski , Pavel Machek , Linux LED Subsystem , lkml Subject: Re: [PATCH v11 04/16] leds: multicolor: Introduce a multicolor class definition Message-ID: <20191009232539.GB571@minitux> References: <20191008204800.19870-1-dmurphy@ti.com> <20191008204800.19870-5-dmurphy@ti.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.12.2 (2019-09-21) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed 09 Oct 13:44 PDT 2019, Dan Murphy wrote: > Bjorn > > On 10/9/19 3:11 PM, Bjorn Andersson wrote: > > On Tue, Oct 8, 2019 at 1:49 PM Dan Murphy wrote: > > > Introduce a multicolor class that groups colored LEDs > > > within a LED node. > > > > > > The multi color class groups monochrome LEDs and allows controlling two > > > aspects of the final combined color: hue and lightness. The former is > > > controlled via _intensity files and the latter is controlled > > > via brightness file. > > > > > Thanks for making progress on this, it's been the one outstanding > > question mark for the long overdue respin of the Qualcomm LPG driver. > > > But while it works for the LPG, in that it has outputs named "RGB" I > > have boards with "generic" LED drivers that are connected to RGB LEDs. > > So per your proposed solution we would need to add the additional > > You don't have to add the MC class to those drivers.? This is an optional > framework but if you wanted to use the framework for specific devices then > yes you would need to add that support. This is why I did the LP55xx patches > to demonstrate the feasibility since the LP50xx has the MC class > intelligence already. > Correct me if I've misunderstood something, but if I have a product using e.g. lm3533 connected to an RGB LED then the correct way to represent this towards userspace is to introduce the MC class in the lm3533 LED driver, no? > The LP55xx driver can register to the LED class and/or the MC LED class > pending on the DT organization. > Understood. > I don't plan on going through all of TI's RGB drivers and retrofitting them > to the MC class.? I do have to update the GPIO LED driver to use the class > but that work is still pending. > > I may also update the Motorola PCAP driver as well since I have a Droid4 to > test. > My concern with this is that being connected to a RGB LED is not a property of the controller, but the system design and the proposed implementation makes it a property of each controller. I'm not saying that the proposed path is wrong, I'm saying that we have 83 files named leds-*.c in drivers/leds and this adaption needs to happen on each one. And I'm not saying I expect you to do this. > > mc_class handling to every single LED driver that might be used to > > sink current into an RGB LED. > > > > I also don't see anything preventing hardware designers from feeding > > single RGB LEDs from multiple different LED controllers, something the > > current proposal would prohibit. > > What do you mean by a single RGB LED? Are you referring to a RGB module? > > http://wiki.sunfounder.cc/index.php?title=RGB_LED_Module > Yes > There is no prevention for HW designers to put a driver on each LED output > but I am not sure why they would incur > > the additional BOM cost seems quite silly unless you have an unlimited > budget ;) > So if you have a system with e.g. 8 PWM channels on one PMIC and a single PWM available on a different PMIC then you're saying that the hardware guys would be silly to believe that they can drive 3 RGB LEDS off this? > If they did design the system that way then the SW would need to revert back > to the standard LED class as it is done today. > If that is the agreed upon design then I'll continue to adapt my LED drivers to the MC class. Regards, Bjorn