From: David Lechner <dlechner@baylibre.com>
To: Jonathan Cameron <jic23@kernel.org>
Cc: "Jose A. Perez de Azpillaga" <azpijr@gmail.com>,
linux-iio@vger.kernel.org, "Nuno Sá" <nuno.sa@analog.com>
Subject: Re: [RFC PATCH v2 2/2] iio: light: add support for APDS9999 sensor
Date: Sat, 16 May 2026 13:19:28 -0500 [thread overview]
Message-ID: <1da2847a-275b-4260-9d07-76ebbb2c558c@baylibre.com> (raw)
In-Reply-To: <20260516173904.503259e6@jic23-huawei>
On 5/16/26 11:39 AM, Jonathan Cameron wrote:
> On Sat, 16 May 2026 10:28:47 -0500
> David Lechner <dlechner@baylibre.com> wrote:
>
>> On 5/13/26 3:10 AM, Jose A. Perez de Azpillaga wrote:
>>> Add IIO driver for Broadcom APDS9999 ambient light sensor.
>>>
>>> The APDS9999 is a digital proximity and RGB sensor with ALS
>>> capability. This driver implements the ALS/Lux functionality using
>>> the green channel, which uses optical coating technology to
>>> approximate the human eye spectral response.
>>>
>>> Proximity (PS) and RGB color features are not yet implemented.
>>>
>>
>>
>>
>>> +enum apds9999_gain {
>>> + APDS9999_GAIN_1X = 0,
>>> + APDS9999_GAIN_3X = 1,
>>> + APDS9999_GAIN_6X = 2,
>>> + APDS9999_GAIN_9X = 3,
>>> + APDS9999_GAIN_18X = 4,
>>> +};
>>
>> Giving the natural values of enum explicitly just seems like noise
>> IMHO. I wasted time looking for an anomaly.
>
> I tend to ask for this when they are hardware field values to make
> the point the values matter rather than just being an enum.
> I'm not that fussed though.
>
> Jonathan
In that case, I would just use #define instead of enum.
next prev parent reply other threads:[~2026-05-16 18:19 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-13 8:09 [RFC PATCH v2 0/2] iio: light: add support for Broadcom APDS9999 Jose A. Perez de Azpillaga
2026-05-13 8:10 ` [RFC PATCH v2 1/2] dt-bindings: iio: light: add " Jose A. Perez de Azpillaga
2026-05-16 14:47 ` Jonathan Cameron
2026-05-13 8:10 ` [RFC PATCH v2 2/2] iio: light: add support for APDS9999 sensor Jose A. Perez de Azpillaga
2026-05-16 14:58 ` Jonathan Cameron
2026-05-16 15:28 ` David Lechner
2026-05-16 16:39 ` Jonathan Cameron
2026-05-16 18:19 ` David Lechner [this message]
2026-05-17 11:40 ` Jonathan Cameron
2026-05-16 14:44 ` [RFC PATCH v2 0/2] iio: light: add support for Broadcom APDS9999 Jonathan Cameron
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1da2847a-275b-4260-9d07-76ebbb2c558c@baylibre.com \
--to=dlechner@baylibre.com \
--cc=azpijr@gmail.com \
--cc=jic23@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=nuno.sa@analog.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox