Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp427144pxb; Wed, 3 Feb 2021 08:39:11 -0800 (PST) X-Google-Smtp-Source: ABdhPJwsSjPfxP5jfgck9AyhdrLlcsSiD/Ei9zRnAXyZ3jqGa0yhrwSxWWqM+iBBjfrVQnvFG5rY X-Received: by 2002:a05:6402:270e:: with SMTP id y14mr3799738edd.322.1612370351075; Wed, 03 Feb 2021 08:39:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612370351; cv=none; d=google.com; s=arc-20160816; b=KR+ElAkCX1UO1rhJaZVUkOoPI+jubkE8VXOz/g2LCjXQ0vPYbntKbeupMNCLJ0Lfrt pmKKvOnPC+3LjH67bpNieFhyB9RF/iPkE/fBoUoaZ5fCOnfd6XRDT4qi8AwYj3pzoGNu r7CLYNGtZm/Dn5FjBGoQ7c5BM57SFzXJ2XqTQC+dmJ+QA2CKzMYBAgmsXkb5kLhTk53f opkw2HmwwTKw19rzJgnj7fuebgDe1valkIZQI3Ui9mp5smV4Enylal8jo78Ty9VJQgsE KsvDHKHPSh7QSFWXWJWYOBkixIAfWFnLkrrYVTa+bZ5V/hvKQ6SlHklB+ZonMtzs/Kv1 niwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=34zvzsHXYrhc14itxb/GCg3WYs1q/btHDPOfh/FTqsc=; b=nOc2T1V5hVSuby0H+FpDFrPrfwNu8vTrFREQ0Y6jVd0PMGrkSN5bAbwWF/SdX6vrl5 gxlJH6YfJdF9rCnR8LNc2KMecRLxM7IW8Jcx6ZVsrjZfiZjkx/sfg25KcH029pVEqnDZ tI7Mnc54PAG7tmF/LaEuk4rlL650oQ/RMauM1yi+jm0Sl1Ox0b+r2g3obOQUAx/aExqS aCuLDz+Ug7CHMVSbscLkexxHs5Ppqn/wZCrorN1QVWcebZVk2MvP6+WR28/D7k3q1NBr ozdxu5IS1EUuCmIsoB2MY1Lk8U/DB5SjtLQEI5gZtnNxEAqWf+NQIIMfRgkBLJhWffZM lgzw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u1si1689446ejr.305.2021.02.03.08.38.44; Wed, 03 Feb 2021 08:39:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234550AbhBCQhO (ORCPT + 99 others); Wed, 3 Feb 2021 11:37:14 -0500 Received: from jabberwock.ucw.cz ([46.255.230.98]:45752 "EHLO jabberwock.ucw.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231799AbhBCQgy (ORCPT ); Wed, 3 Feb 2021 11:36:54 -0500 Received: by jabberwock.ucw.cz (Postfix, from userid 1017) id EDDE21C0B9C; Wed, 3 Feb 2021 17:35:55 +0100 (CET) Date: Wed, 3 Feb 2021 17:35:55 +0100 From: Pavel Machek To: Sven Schuchmann Cc: Dan Murphy , Rob Herring , "linux-leds@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH v1] leds: lp50xx: add setting of default intensity from DT Message-ID: <20210203163555.GA23019@duo.ucw.cz> References: <20210119105312.2636-1-schuchmann@schleissheimer.de> <20210203142940.GB12369@duo.ucw.cz> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ZGiS0Q5IWpPtfppv" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --ZGiS0Q5IWpPtfppv Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed 2021-02-03 15:39:59, Sven Schuchmann wrote: > Hello Pavel, >=20 > > > In order to use a multicolor-led together with a trigger > > > from DT the led needs to have an intensity set to see something. > > > The trigger changes the brightness of the led but if there > > > is no intensity we actually see nothing. > > > > > > This patch adds the ability to set the default intensity > > > of each led so that it is turned on from DT. > >=20 > > Do we need this to be configurable from device tree? Can we just set > > it to max or something? > >=20 > > Aha, this basically sets the initial color for LEDs the monochromatic > > triggers, right? >=20 > Let me try to explain in other words: I have one RGB-LED > which consists of 3 Colors. Each of the three colors (Red, Green, Blue) y= ou have > to define in the DT. For example this is my setup for one RGB-LED which I= wanted > to show the heartbeat in Red (half intensity): >=20 > multi-led@3 { > #address-cells =3D <1>; > #size-cells =3D <0>; > reg =3D <0x3>; > color =3D ; >=20 > linux,default-trigger =3D "heartb= eat"; > function =3D LED_FUNCTION_HEARTBE= AT; >=20 > led-9 { > color =3D ; > default-intensity =3D <10= 0>; > }; >=20 > led-10 { > color =3D ; > }; >=20 > led-11 { > color =3D ; > }; > }; >=20 > If I would not have the default-intensity I would actually see nothing, > since the intensity (which goes from 0-255) of each led is initialized wi= th 0. >=20 > I hope I could clarify this a little more? Yes, sounds reasonable. Could we get default intensity of 100% on all channels if nothing else is specified? Or maybe simply "if intensity is not specified, start with 100%, and use explicit =3D0 if other color is expected". Best regards, Pavel --=20 http://www.livejournal.com/~pavelmachek --ZGiS0Q5IWpPtfppv Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQRPfPO7r0eAhk010v0w5/Bqldv68gUCYBrQ6wAKCRAw5/Bqldv6 8oYqAJ9zXvIQPTznpEndEdPE2Ht/6128KACgo1CHMC/SmJsoqpFkMhE2SgSlehc= =SBrF -----END PGP SIGNATURE----- --ZGiS0Q5IWpPtfppv--