On Mon, 10 Jun 2024 13:01:23 +0300
Matti Vaittinen <mazziesaccount@xxxxxxxxx> wrote:
The ROHM BU27034NUC was cancelled and BU27034ANUC is replacing this
sensor. Use the BU27034NUC driver to support the new BU27034ANUC.
According to ROHM, the BU27034NUC was never mass-produced. Hence dropping
the BU27034NUC support and using this driver to support BU27034ANUC
should not be a problem to users.
Signed-off-by: Matti Vaittinen <mazziesaccount@xxxxxxxxx>
Fixes: e52afbd61039 ("iio: light: ROHM BU27034 Ambient Light Sensor")
This is an odd case. I don't think a fixes tag is appropriate
don't think we can use the original compatible.
I don't mind breaking
support for the non existent port going forwards and indeed dropping
all indication it ever existed, but the old kernel's are out there and
even getting this into stable is far from a guarantee there won't be
a kernel run on a board that has this compatible but has the old
driver.
It's also too big really to be stable material.
So I think the path forwards is a new compatible and drop the old
one from the dt bindings and driver. Thus any new dts for a board
that actually has this device will use the new compatible and avoid
any risk of encountering the old driver.
Maybe we can be more relaxed - what actually happens if you use the
existing driver with the new part?
I'm trusting you copied the maths right for the computed
channels (that take too long to review!)
So everything inline is
formatting type stuff.
/*
* The BU27034 DATA0 and DATA1 channels are both on the visible light
* area (mostly). The data0 sensitivity peaks at 500nm, DATA1 at 600nm.
- * These wave lengths are pretty much on the border of colours making
- * these a poor candidates for R/G/B standardization. Hence they're both
- * marked as clear channels
+ * These wave lengths are cyan(ish) and orange(ish), making these
+ * sub-optiomal candidates for R/G/B standardization. Hence they're
+ * both marked as clear channels.
I think just indexing them and not giving a modifier is probably better than
claiming they are clear. Leave it more vague basically.
*/
- BU27034_CHAN_DATA(DATA0, IIO_MOD_LIGHT_CLEAR),
- BU27034_CHAN_DATA(DATA1, IIO_MOD_LIGHT_CLEAR),
- BU27034_CHAN_DATA(DATA2, IIO_MOD_LIGHT_IR),
+ BU27034_CHAN_DATA(DATA0),
+ BU27034_CHAN_DATA(DATA1),
IIO_CHAN_SOFT_TIMESTAMP(4),
};