[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20181023185453.GA27397@amd>
Date: Tue, 23 Oct 2018 20:54:53 +0200
From: Pavel Machek <pavel@....cz>
To: Jacek Anaszewski <jacek.anaszewski@...il.com>
Cc: Dan O'Donovan <dan@...tex.com>, linux-kernel@...r.kernel.org,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Mika Westerberg <mika.westerberg@...ux.intel.com>,
Heikki Krogerus <heikki.krogerus@...ux.intel.com>,
Lee Jones <lee.jones@...aro.org>,
Linus Walleij <linus.walleij@...aro.org>,
linux-gpio@...r.kernel.org, linux-leds@...r.kernel.org,
Carlos Iglesias <carlos.iglesias@...tex.com>,
Javier Arteaga <javier@...tex.com>
Subject: Re: [PATCH v2 2/3] leds: upboard: Add LED support
Hi!
> > + led->field = devm_regmap_field_alloc(dev, regmap, conf);
> > + if (IS_ERR(led->field))
> > + return PTR_ERR(led->field);
> > +
> > + led->cdev.max_brightness = 1;
>
> 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
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Download attachment "signature.asc" of type "application/pgp-signature" (182 bytes)
Powered by blists - more mailing lists