Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp589833pxf; Thu, 11 Mar 2021 10:04:23 -0800 (PST) X-Google-Smtp-Source: ABdhPJxFPXSaNWy5hdVefFbgGhnILFsXhS31blYG6StZ/rretcT5DP9vG/DUMpRWYsEWtIODQtvj X-Received: by 2002:a17:906:ae8d:: with SMTP id md13mr4278173ejb.275.1615485863038; Thu, 11 Mar 2021 10:04:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615485863; cv=none; d=google.com; s=arc-20160816; b=bxshNqXbwEURLi5srbyGHEhYhYBso+44ybLXzbd7PXUl3/pZEklpi+ZB8MAok90azQ AQAMTnyKwDV4NHJlqf7CQ6fzZzg7LboPeRbGYtejKg7ccaZiP8D/TFL+/ZqyrsnWQeQv UHCyNQVB2uT2iqwb3Yw5Qa+P/X6x3+0ZokgPiibMW24xXxA+JbrDukkowdgSjPhQ6BM5 arPr98owZgWY7LcJoe3lgubzGk82oKTCq2c2pu4GzWGPK039F548HMS8vci+cBqFrsSV Lr7hknHvZevW5zlSPOwFdXiQFQj+ry0mqYnyZ49pRCVTVmPM6Uh5Ur2C+KeAgmuxeCe+ UwzQ== 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=RhQWV8SE8BhqwA4KPay7d/JZ4t/dwoZgljHGdBEQeOw=; b=CKZBIYCdbsM2CzFrfiucO0Gah46rzrbd1gvUv3IW4qwnJDAXL5nwDZmD0peTh2NEtg vSHJ1lWv4c6KqRwRtolmm6LeRyNuWNhDARKR9c5nHq/LsanEwppyz3M9HcOXrLufcWs+ mWcrCQxd3SxHdQiNHbDjseqr2UN++kQbr4xZ4JuW2ODdifO49w7znscjPQgBL5MrfTTj bJTvoh5QNDQ39t+77fTHQ64SgkqqesifQ4b3RlEya6pOkncl0EqxI0IJ0LsOVC4RZx7K AZPbDgmUhUJpKXPv0PX0xhosOj1eDx9kL0Zek4YQXIGhIzYPrwQVXOZCPVXT1tEwZlUL k1hQ== 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 e24si2107490ejc.739.2021.03.11.10.03.57; Thu, 11 Mar 2021 10:04:23 -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 S230142AbhCKSC7 (ORCPT + 99 others); Thu, 11 Mar 2021 13:02:59 -0500 Received: from jabberwock.ucw.cz ([46.255.230.98]:55668 "EHLO jabberwock.ucw.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229553AbhCKSC2 (ORCPT ); Thu, 11 Mar 2021 13:02:28 -0500 Received: by jabberwock.ucw.cz (Postfix, from userid 1017) id DF94E1C0B77; Thu, 11 Mar 2021 19:02:25 +0100 (CET) Date: Thu, 11 Mar 2021 19:02:25 +0100 From: Pavel Machek To: Hermes Zhang Cc: Dan Murphy , kernel@axis.com, Hermes Zhang , linux-kernel@vger.kernel.org, linux-leds@vger.kernel.org Subject: Re: [PATCH] leds: leds-dual-gpio: Add dual GPIO LEDs driver Message-ID: <20210311180225.GA11650@duo.ucw.cz> References: <20210311130408.10820-1-chenhui.zhang@axis.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="h31gzZEtNLTqOjlF" Content-Disposition: inline In-Reply-To: <20210311130408.10820-1-chenhui.zhang@axis.com> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --h31gzZEtNLTqOjlF Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi! > + priv =3D devm_kzalloc(dev, sizeof(struct gpio_dual_leds_priv), GFP_KERN= EL); > + if (!priv) > + return -ENOMEM; > + > + priv->low_gpio =3D devm_gpiod_get(dev, "low", GPIOD_OUT_LOW); > + ret =3D PTR_ERR_OR_ZERO(priv->low_gpio); > + if (ret) { > + dev_err(dev, "cannot get low-gpios %d\n", ret); > + return ret; > + } > + > + priv->high_gpio =3D devm_gpiod_get(dev, "high", GPIOD_OUT_LOW); > + ret =3D PTR_ERR_OR_ZERO(priv->high_gpio); > + if (ret) { > + dev_err(dev, "cannot get high-gpios %d\n", ret); > + return ret; > + } Actually... I'd call it led-0 and led-1 or something. Someone may/will come with 4-bit GPIO LED one day, and it would be cool if this could be used with minimal effort. Calling it multi_led in the driver/bindings would bnot be bad, either. Best regards, Pavel --=20 http://www.livejournal.com/~pavelmachek --h31gzZEtNLTqOjlF Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQRPfPO7r0eAhk010v0w5/Bqldv68gUCYEpbMQAKCRAw5/Bqldv6 8jqjAKCWcWAkZNGGAxNOIktK1uCe6A8zRQCgjkpPZ+LbgMY8O6aNtfahC4gUE60= =5aO+ -----END PGP SIGNATURE----- --h31gzZEtNLTqOjlF--