Received: by 2002:ac0:aa62:0:0:0:0:0 with SMTP id w31-v6csp3826689ima; Tue, 23 Oct 2018 11:55:58 -0700 (PDT) X-Google-Smtp-Source: AJdET5dEh7sAez4pfZQKv6c5R3LiAJrEEvdtTp7o3wcJVwbFH+VhaNU5T6VZnCBbIH9EBMlyidGg X-Received: by 2002:a17:902:930a:: with SMTP id bc10-v6mr5015902plb.17.1540320958404; Tue, 23 Oct 2018 11:55:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540320958; cv=none; d=google.com; s=arc-20160816; b=I+Hd3UotoWoQGP/+1YZq1mT4YD3XgU/1APqYKiTWP1XeiBsKIkLYLBonICLXwe6iUV 56ToffOopOnXP8QsO4t2HQ+fa0eERR9TUkALr5cLiSo7Mhn9Ed9TQ9xkaujPBG9xpT8e +Ro6mQ9qZeEOCFxXFuQzrp7L2HWBZmeJzc/d3okfJVSySDwwaxj6IiZRRfGfdHp014yx N96hnDPwEIK0PW377Xgsw8aLhhtju+QvjSAIXtHFP6ogBfV1kQgcwb1httouFoYw2RR/ uFUkC00cvPHN/roNYD4U/or1fz/Ez9PQBabl1ju+VXBj9McmurVPUvpuwRTJlv7NPfSe gC1w== 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-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=BZrtyjRl/OsvhUFBs8KSOmZyqlIhhEAYQ5QKwZd0yw8=; b=mzOSSHneu9gNU/xrAnoMaBUci6lc7F2OewEW40CgiGdaLALLi5iame8cxUjkQDlo+8 q3S9lR2BPGHrT3qfVzdg9W99SCF3PjLJThNnaFiV0ElZHTFBOqAEkWVCn4cfMf6NzgYo uQTN9kJpGWHeI2mWcuIf0EnhSO5km7jDv4xicpj8u5XMoD6MeFoImV3RTOIglAzEaTgL KWWQhJpc5AegjN9unppB6NVS2IMZf+8KgnxtgSGReEjIotybMko+UXJpFvyOvAGtlVJT sTCYmo3Z9hbCl30oZfXIwU8f+HKOoWq3WXWXklVXkwUZCGvOuWTfXR3hG/xd/SyKhJnP AZiw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g198-v6si1560402pfb.165.2018.10.23.11.55.43; Tue, 23 Oct 2018 11:55:58 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729181AbeJXDTe (ORCPT + 99 others); Tue, 23 Oct 2018 23:19:34 -0400 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:57690 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728864AbeJXDTe (ORCPT ); Tue, 23 Oct 2018 23:19:34 -0400 Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 512) id C1B63806CF; Tue, 23 Oct 2018 20:54:52 +0200 (CEST) Date: Tue, 23 Oct 2018 20:54:53 +0200 From: Pavel Machek To: Jacek Anaszewski Cc: Dan O'Donovan , linux-kernel@vger.kernel.org, Andy Shevchenko , Mika Westerberg , Heikki Krogerus , Lee Jones , Linus Walleij , linux-gpio@vger.kernel.org, linux-leds@vger.kernel.org, Carlos Iglesias , Javier Arteaga Subject: Re: [PATCH v2 2/3] leds: upboard: Add LED support Message-ID: <20181023185453.GA27397@amd> References: <20180421085009.28773-1-javier@emutex.com> <1539969334-24577-1-git-send-email-dan@emutex.com> <1539969334-24577-3-git-send-email-dan@emutex.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="jRHKVT23PllUwdXP" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --jRHKVT23PllUwdXP Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi! > > + led->field =3D devm_regmap_field_alloc(dev, regmap, conf); > > + if (IS_ERR(led->field)) > > + return PTR_ERR(led->field); > > + > > + led->cdev.max_brightness =3D 1; >=20 > s/1/LED_ON/ Actually, I prefer constant 1 here, as it makes it immediately obvious this supports just 0/1. Yes, LED_ON is also 1, but I had to grep the header files for that... (I thought it was 255). Best regards, Pavel --=20 (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blo= g.html --jRHKVT23PllUwdXP Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlvPbn0ACgkQMOfwapXb+vKJ0wCgs05bYwEDzqTvqEaSr6m7/qay y7YAn2yT6+0M45hzqiLsckrjnAXtEXAA =Q3b8 -----END PGP SIGNATURE----- --jRHKVT23PllUwdXP--