From: Jonathan Cameron <jic23@kernel.org>
To: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Cc: kernel test robot <lkp@intel.com>,
Lars-Peter Clausen <lars@metafoo.de>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Rishi Gupta <gupt21@gmail.com>,
oe-kbuild-all@lists.linux.dev, linux-iio@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 2/2] iio: light: add support for veml3235
Date: Sat, 26 Oct 2024 19:10:01 +0100 [thread overview]
Message-ID: <20241026191001.10acd773@jic23-huawei> (raw)
In-Reply-To: <19c8e07f-4b9b-4d4b-aa18-f6766b65b33e@gmail.com>
Hi Javier,
> > 222
> > 223 return 0;
> > 224 }
> > 225
> >
>
>
> Unused as there is no processed values anymore. I will drop them for v4.
Given I didn't have any other comments I just fixed these up whilst applying.
Series applied to the togreg branch of iio.git and initially pushed out as
testing for 0-day to take a first look at it.
Thanks,
Jonathan
p.s. Diff was as follows, shout if I mess it up.
diff --git a/drivers/iio/light/veml3235.c b/drivers/iio/light/veml3235.c
index 18ab73f4377c..66361c3012a3 100644
--- a/drivers/iio/light/veml3235.c
+++ b/drivers/iio/light/veml3235.c
@@ -145,7 +145,7 @@ static int veml3235_get_it(struct veml3235_data *data, int *val, int *val2)
static int veml3235_set_it(struct iio_dev *indio_dev, int val, int val2)
{
struct veml3235_data *data = iio_priv(indio_dev);
- int ret, new_it, it_idx;
+ int ret, new_it;
if (val)
return -EINVAL;
@@ -153,23 +153,18 @@ static int veml3235_set_it(struct iio_dev *indio_dev, int val, int val2)
switch (val2) {
case 50000:
new_it = 0x00;
- it_idx = 4;
break;
case 100000:
new_it = 0x01;
- it_idx = 3;
break;
case 200000:
new_it = 0x02;
- it_idx = 2;
break;
case 400000:
new_it = 0x03;
- it_idx = 1;
break;
case 800000:
new_it = 0x04;
- it_idx = 0;
break;
default:
return -EINVAL;
@@ -188,7 +183,7 @@ static int veml3235_set_it(struct iio_dev *indio_dev, int val, int val2)
static int veml3235_set_gain(struct iio_dev *indio_dev, int val, int val2)
{
struct veml3235_data *data = iio_priv(indio_dev);
- int ret, new_gain, gain_idx;
+ int ret, new_gain;
if (val2 != 0)
return -EINVAL;
@@ -196,19 +191,15 @@ static int veml3235_set_gain(struct iio_dev *indio_dev, int val, int val2)
switch (val) {
case 1:
new_gain = 0x00;
- gain_idx = 3;
break;
case 2:
new_gain = 0x01;
- gain_idx = 2;
break;
case 4:
new_gain = 0x03;
- gain_idx = 1;
break;
case 8:
new_gain = 0x07;
- gain_idx = 0;
break;
default:
return -EINVAL;
>
next prev parent reply other threads:[~2024-10-26 18:10 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-23 18:59 [PATCH v3 0/2] iio: light: add support for veml3235 Javier Carrasco
2024-10-23 18:59 ` [PATCH v3 1/2] dt-bindings: iio: light: veml6030: add veml3235 Javier Carrasco
2024-10-23 18:59 ` [PATCH v3 2/2] iio: light: add support for veml3235 Javier Carrasco
2024-10-25 9:01 ` kernel test robot
2024-10-25 9:07 ` Javier Carrasco
2024-10-26 18:10 ` Jonathan Cameron [this message]
2024-10-27 12:23 ` Javier Carrasco
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=20241026191001.10acd773@jic23-huawei \
--to=jic23@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=gupt21@gmail.com \
--cc=javier.carrasco.cruz@gmail.com \
--cc=krzk@kernel.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=robh@kernel.org \
/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