From: Matti Vaittinen <mazziesaccount@gmail.com>
To: Jonathan Cameron <jic23@kernel.org>
Cc: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>,
Lars-Peter Clausen <lars@metafoo.de>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Conor Dooley <conor+dt@kernel.org>,
linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/3] iio: light: bd27008: Support BD27010 RGB
Date: Tue, 20 Jun 2023 11:06:19 +0300 [thread overview]
Message-ID: <ac0ea4f9-1a22-adf9-97a5-4bab4f3d162b@gmail.com> (raw)
In-Reply-To: <20230617205702.29bdd84a@jic23-huawei>
On 6/17/23 22:57, Jonathan Cameron wrote:
> On Tue, 13 Jun 2023 13:20:26 +0300
> Matti Vaittinen <mazziesaccount@gmail.com> wrote:
>
>> The ROHM BU27010 is an RGBC sensor with a flickering detection FIFO. The
>> RGBC+IR sensor functionality is largely similar to what the BU27008 has.
>> There are some notable things though:
>> - gain setting is once again new and exotic. Now, there is 6bit gain
>> setting where 4 of the bits are common to all channels and 2 bits
>> can be configured separately for each channel. The BU27010 has
>> similar "1X on other channels vs 2X on IR when selector is 0x0"
>> gain design as BU27008 had. So, we use same gain setting policy for
>> BU27010 as we did for BU27008 - driver sets same gain selector for all
>> channels but shows the gains separately for all channels so users
>> can (at least in theory) detect this 1X vs 2X madness...
>> - BU27010 has suffled all the control register bitfields to new
>> addresses and bit positions while still keeping the register naming
>> same.
>> - Some more power/reset control is added.
>> - FIFO for "flickering detection" is added.
>>
>> The control register suffling made this slightly nasty. Still, it is
>> easier for maintenance perspective to add the BU27010 support in BU27008
>> driver because - even though the bit positions/addresses were changed -
>> most of the driver structure can be re-used. Writing own driver for
>> BU27010 would mean plenty of duplicate code albeit a tad more clarity.
>>
>> The flickering FIFO is not supported by the driver.
>>
>> Add BU27010 RGBC+IR support to rohm-bu27008 driver.
>>
>> Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com>
>>
>
> Resulting code looks more or less fine, but there is stuff in here that
> belongs in previous patch - so send a v2 with the refactors all done
> there and just support for the new part in here.
Thanks for the review! I appreciate it. And sorry for sending a messy
version. I'll try re-organizing the stuff between these two patches when
re-spinning. A bit busy now as I said when replying to review of PATCH
2/3 - but I'll see when I get a moment to rework this :) Thanks!
Yours,
-- Matti
--
Matti Vaittinen
Linux kernel developer at ROHM Semiconductors
Oulu Finland
~~ When things go utterly wrong vim users can always type :help! ~~
prev parent reply other threads:[~2023-06-20 8:06 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-13 10:04 [PATCH 0/3] Support ROHM BU27010 RGBC sensor Matti Vaittinen
2023-06-13 10:19 ` [PATCH 1/3] dt-bindings: ROHM BU27010 RGBC + flickering sensor Matti Vaittinen
2023-06-13 18:42 ` Krzysztof Kozlowski
2023-06-14 5:32 ` Matti Vaittinen
2023-06-14 6:36 ` Krzysztof Kozlowski
2023-06-13 10:20 ` [PATCH 2/3] iio: light: bu27008: add chip info Matti Vaittinen
2023-06-17 19:48 ` Jonathan Cameron
2023-06-20 8:03 ` Matti Vaittinen
2023-06-13 10:20 ` [PATCH 3/3] iio: light: bd27008: Support BD27010 RGB Matti Vaittinen
2023-06-17 19:57 ` Jonathan Cameron
2023-06-20 8:06 ` Matti Vaittinen [this message]
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=ac0ea4f9-1a22-adf9-97a5-4bab4f3d162b@gmail.com \
--to=mazziesaccount@gmail.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--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=matti.vaittinen@fi.rohmeurope.com \
--cc=robh+dt@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