Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1004679pxf; Thu, 11 Mar 2021 22:35:42 -0800 (PST) X-Google-Smtp-Source: ABdhPJwMQi9GP/xju5nGrR/IMjGQp2kLW6D74GPEHt+HCF9xqBMxm1Cp6MO9aqZXIRRsEqoBElYE X-Received: by 2002:a17:906:7f84:: with SMTP id f4mr6639543ejr.525.1615530942412; Thu, 11 Mar 2021 22:35:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615530942; cv=none; d=google.com; s=arc-20160816; b=Qn1PzZ5og+NueCIPYv/tJRM6z/OjkrZaRScG/PMvjRIAZ/UMkp9QlqMuF4eydQAyLr BC49Ts8BL5rMhNIP4i8xE/jAUSGFUe56HzCnrsi6QmHHKHZFGVe4KY0VoG3BDuk8K1iN QdYgpuEDAobWK6HC6cx2xwGyI9RkBQoK59Fbfl18cMsTFd5rft78BLkzvcJ/1rrTZCZi emV2HFzqw5NQfcspKnnXSkWus4jSwaF5YGxbP+LYDYKtkEPiQOLBgDYrcjRa5zBefrX4 KVNYsKT0W50BIus1aIHre9wFXn3ZnBXA2jF9mUa3tQXdKwYbgWvdIW5PxF1d+sU29bSD C+qg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:dkim-signature; bh=rF0+CeiqNT/JL8EaOzph1Uz1foa3kNRnCcYH1amvbB8=; b=iOkrtpl9qZAJ6+v8AcbyYrLpCSP8NuTSibLeU2X01IdJUy7TUTg/JP6r8rfzQ9A8o3 +KF5MxAiXxTHwRoAFYLYwhdoxV7rvj1iuqp5dt0rI1yfO4vMh4xi/r4zxJ6KtBTx3eoM GHn0Tlz6KtF1OakCPRYva0gT853BEiElShqG+P8nTfwO9xaMq2oeMgeM8IZo5i/oru9n RH1rS5ieSDHHPbWDqefoYx+VsAyWuqc6mRoe7XOnjBsGW0pAWs65VHnzfgzanMMg1NRb Ej9nmnFiUFLBgu/3fEvpqBA9s9dufPKOZXSGA4Ak0OMIOooZsfZVd/itxJoB/j6AleT/ b+ng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@axis.com header.s=axis-central1 header.b=JAmXyeQQ; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=axis.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ji4si3411861ejc.235.2021.03.11.22.35.17; Thu, 11 Mar 2021 22:35:42 -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; dkim=pass (test mode) header.i=@axis.com header.s=axis-central1 header.b=JAmXyeQQ; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=axis.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231865AbhCLEs5 (ORCPT + 99 others); Thu, 11 Mar 2021 23:48:57 -0500 Received: from smtp2.axis.com ([195.60.68.18]:6934 "EHLO smtp2.axis.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231912AbhCLEsy (ORCPT ); Thu, 11 Mar 2021 23:48:54 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axis.com; q=dns/txt; s=axis-central1; t=1615524534; x=1647060534; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=rF0+CeiqNT/JL8EaOzph1Uz1foa3kNRnCcYH1amvbB8=; b=JAmXyeQQk1/4h0tHzAMP4b53IcIudRNHw5VZTiDPEeBGlC69YOtOzgdf 9ZEMQsYtkIra6XlKCRS8OTSZ9ySKWs/UpiXPjRzVyXiOi1fcQGA+9QtVQ 3LlleO4Avzcs6USpWniEv4xQiFQAILgdlxSb1u9lgpdMSgkuiaAIXY2PN utSuoa6Kr0cf5M4XVo/iVoreEbbyJDbCfsINYKP3p2GjPgSAvdxrqcFsC JhpyMn9kN49Dl+IVKBL/+w4FzfDiT4WzntkwSYBoE0TDPQDWj1rOBofLE dPGUusZr5KUO7FNe9A2hXju0Is1UcRg6OsCkyBCS7OkplJnW7+fI5ie7g g==; From: Hermes Zhang To: Marek Behun CC: Pavel Machek , Dan Murphy , kernel , "linux-kernel@vger.kernel.org" , "linux-leds@vger.kernel.org" Subject: RE: [PATCH] leds: leds-dual-gpio: Add dual GPIO LEDs driver Thread-Topic: [PATCH] leds: leds-dual-gpio: Add dual GPIO LEDs driver Thread-Index: AQHXFnc53ECqmB4gek68ETSLZV586Kp+22cAgAAAc4CAANwtQA== Date: Fri, 12 Mar 2021 04:48:52 +0000 Message-ID: <161920e0746e4c0daff7f83163b71677@XBOX03.axis.com> References: <20210311130408.10820-1-chenhui.zhang@axis.com> <20210311163814.74c1885f@nic.cz> <20210311163951.0046fb5c@nic.cz> In-Reply-To: <20210311163951.0046fb5c@nic.cz> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.0.5.60] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >=20 > Sorry, leds-regulator has only a binary state LED. >=20 > Maybe you could extend leds-regulator to be able to use all regulator sta= tes? >=20 > Or you can extend leds-gpio driver to support N states via log N gpios, > instead of adding new driver. It seems a good idea to extend leds-gpio, so in my case, I should have such= dts: 63 leds { 64 compatible =3D "gpio-leds"; 65=20 66 recording_front { 67 label =3D "recording_front:red"; 68 gpios =3D <&gpio 130 GPIO_ACTIVE_HIGH>, <&gpio = 129 GPIO_ACTIVE_HIGH>; 69 default-state =3D "off"; 70 }; 71 }; For my case, two leds is enough, but it sill easy to extend the support num= ber bigger than two. And the length of gpios array is not fixed, so it coul= d compatible with exist "gpio-leds" dts, right?=20 If this idea work, should I create a new commit or still in this track (V2)= ? Best Regards, Hermes=20 >=20 > Marek