From: Subhajit Ghosh <subhajit.ghosh@tweaklogic.com>
To: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Cc: andriy.shevchenko@linux.intel.com, anshulusr@gmail.com,
conor+dt@kernel.org, devicetree@vger.kernel.org,
javier.carrasco.cruz@gmail.com, jic23@kernel.org,
krzysztof.kozlowski+dt@linaro.org, lars@metafoo.de,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
marex@denx.de, matt@ranostay.sg, mazziesaccount@gmail.com,
robh+dt@kernel.org, stefan.windfeldt-prytz@axis.com
Subject: Re: [PATCH v5 3/3] iio: light: Add support for APDS9306 Light Sensor
Date: Mon, 22 Jan 2024 22:09:19 +1030 [thread overview]
Message-ID: <05727e6f-3355-4572-96e4-0b2ac4d8dca7@tweaklogic.com> (raw)
In-Reply-To: <8a7f03b6-caca-4fbb-8093-0ba87bd2e850@wanadoo.fr>
On 21/1/24 19:52, Christophe JAILLET wrote:
> Le 21/01/2024 à 06:17, Subhajit Ghosh a écrit :
>> Driver support for Avago (Broadcom) APDS9306 Ambient Light Sensor.
>> It has two channels - ALS and CLEAR. The ALS (Ambient Light Sensor)
>> channel approximates the response of the human-eye providing direct
>> read out where the output count is proportional to ambient light levels.
>> It is internally temperature compensated and rejects 50Hz and 60Hz flicker
>> caused by artificial light sources. Hardware interrupt configuration is
>> optional. It is a low power device with 20 bit resolution and has
>> configurable adaptive interrupt mode and interrupt persistence mode.
>> The device also features inbuilt hardware gain, multiple integration time
>> selection options and sampling frequency selection options.
>>
>> This driver also uses the IIO GTS (Gain Time Scale) Helpers Namespace for
>> Scales, Gains and Integration time implementation.
>>
>> Signed-off-by: Subhajit Ghosh <subhajit.ghosh-ojZBjWEdjYKukZHgTAicrQ@public.gmane.org>
>> ---
>
> Hi,
>
> a few nits and a few real comment/question below.
>
> Just my 2c.
>
> CJ
> ...
>> +
>> +static int apds9306_read_event(struct iio_dev *indio_dev,
>> + const struct iio_chan_spec *chan,
>> + enum iio_event_type type,
>> + enum iio_event_direction dir,
>> + enum iio_event_info info,
>> + int *val, int *val2)
>> +{
>> + struct apds9306_data *data = iio_priv(indio_dev);
>> + int ret;
>
> Other functions below that look really similar have a:
> guard(mutex)(&data->mutex);
>
> Is it needed here?
You are right, don't think so. Regmap lock is being used.
I will review the locking mechanism. Acknowledging all other comments.
Thanks for the review.
Regards,
Subhajit Ghosh
next prev parent reply other threads:[~2024-01-22 11:39 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-21 5:17 [PATCH v5 0/3] Support for Avago APDS9306 Ambient Light Sensor Subhajit Ghosh
2024-01-21 5:17 ` [PATCH v5 1/3] dt-bindings: iio: light: Squash APDS9300 and APDS9960 schemas Subhajit Ghosh
2024-01-21 15:27 ` Jonathan Cameron
2024-01-22 10:11 ` Subhajit Ghosh
2024-01-22 9:50 ` Krzysztof Kozlowski
2024-01-22 10:23 ` Subhajit Ghosh
2024-01-21 5:17 ` [PATCH v5 2/3] dt-bindings: iio: light: Avago APDS9306 Subhajit Ghosh
2024-01-21 15:36 ` Jonathan Cameron
2024-01-22 10:03 ` Subhajit Ghosh
2024-01-22 9:51 ` Krzysztof Kozlowski
2024-01-22 10:07 ` Subhajit Ghosh
2024-01-22 12:30 ` Krzysztof Kozlowski
2024-01-21 5:17 ` [PATCH v5 3/3] iio: light: Add support for APDS9306 Light Sensor Subhajit Ghosh
2024-01-21 9:22 ` Christophe JAILLET
2024-01-21 12:52 ` Andy Shevchenko
2024-01-22 11:42 ` Subhajit Ghosh
2024-01-22 11:39 ` Subhajit Ghosh [this message]
2024-01-21 15:23 ` Jonathan Cameron
2024-01-22 10:56 ` Subhajit Ghosh
2024-01-22 11:04 ` Jonathan Cameron
2024-01-22 11:48 ` Subhajit Ghosh
2024-02-04 11:23 ` Subhajit Ghosh
2024-02-04 13:40 ` Jonathan Cameron
2024-02-04 14:13 ` Subhajit Ghosh
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=05727e6f-3355-4572-96e4-0b2ac4d8dca7@tweaklogic.com \
--to=subhajit.ghosh@tweaklogic.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=anshulusr@gmail.com \
--cc=christophe.jaillet@wanadoo.fr \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=javier.carrasco.cruz@gmail.com \
--cc=jic23@kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marex@denx.de \
--cc=matt@ranostay.sg \
--cc=mazziesaccount@gmail.com \
--cc=robh+dt@kernel.org \
--cc=stefan.windfeldt-prytz@axis.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;
as well as URLs for NNTP newsgroup(s).