Skip to content

Support ROHM BU27010 RGBC sensor

Matti Vaittinen linux-devicetree linux-iio lkml 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest3 patches 1 replyIn review
  2. v23 patches 4 repliesSuperseded
  3. v13 patches 7 repliesSuperseded

Changes in v3 from the cover letter

- minor styling and added comment
- rebased on iio-fixes-for-6.5a which contains prerequisite patches

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3dt-bindings: iio: ROHM BU27010 RGBC + flickering sensorDocumentation/devicetree/bindings/iio/light/rohm,bu27010.yaml+49 -00 replies
2/3iio: light: bu27008: add chip infodrivers/iio/light/rohm-bu27008.c+207 -1140 replies
3/3iio: light: bd27008: Support BD27010 RGBdrivers/iio/light/rohm-bu27008.c+311 -20 replies

Reviews trailers per patch

1 of 3 patches has a Reviewed-by or Acked-by.

PatchKrzysztof Kozlowski
1/3R-b
2/3
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 0/3] Support ROHM BU27010 RGBC sensor

Support ROHM BU27010 RGBC + flickering sensor.

Following description copied from commit log:

Quoted 17 lines

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.

Quoted 5 lines

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.

Revision history:

v2 => v3:
- minor styling and added comment
- rebased on iio-fixes-for-6.5a which contains prerequisite patches
v1 => v2:
- make vdd-supply required binding.
- Some re-ordering for struct member init.
- Some re-ordering for code to get rid of function declarations.
- Tidy up the mess from patch 2/3.
- Refactor parts from 3/3 to 2/3.
- Clean-up commented out code and tidy things in general.

---

Matti Vaittinen (3):
dt-bindings: iio: ROHM BU27010 RGBC + flickering sensor
iio: light: bu27008: add chip info
iio: light: bd27008: Support BD27010 RGB

 .../bindings/iio/light/rohm,bu27010.yaml      |  49 ++
 drivers/iio/light/rohm-bu27008.c              | 630 ++++++++++++++----
 2 files changed, 565 insertions(+), 114 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/iio/light/rohm,bu27010.yaml

base-commit: 8a4629055ef55177b5b63dab1ecce676bd8cccdd

Signature · 14 lines
2.40.1


-- 
Matti Vaittinen, Linux device drivers
ROHM Semiconductors, Finland SWDC
Kiviharjunlenkki 1E
90220 OULU
FINLAND

~~~ "I don't think so," said Rene Descartes. Just then he vanished ~~~
Simon says - in Latin please.
~~~ "non cogito me" dixit Rene Descarte, deinde evanescavit ~~~
Thanks to Simon Glass for the translation =]