Message ID | c39f9c67b3c07a27d7a13109c7b69cff9cfd2b9b.1720176341.git.mazziesaccount@gmail.com (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
Series | ROHM BU27034NUC to ROHM BU27034ANUC | expand |
On Fri, 5 Jul 2024 13:54:12 +0300 Matti Vaittinen <mazziesaccount@gmail.com> wrote: > The BU27034NUC was cancelled before it entered mass production. It was > replaced by a new variant BU27034ANUC (note, added 'A'). The new > variant gained a few significant changes, like removal of the 3.rd data > channel and dropping some of the gain settings. This means that, from > software point of view these ICs are incompatible. Lux calculation based > on the data from the sensors needs to be done differently, and on the > BU27034ANUC the channel 3 data is missing. Also, the gain setting > differencies matter. > > Unfortunately, the identification register was not changed so there is no > safe way for the software to distinguish the variants. > > According to the ROHM HQ engineers, the old BU27034NUC should not be > encountered in the wild. Hence it makes sense to remove the support for > the old BU27034NUC and add support for the new BU27034ANUC. Change the > compatible in order to not load the incompatible old driver for new sensor > (or, if someone had the old sensor, the new driver for it). > > Drop the compatible for old sensor which should not be in the wild and > add a new compatible for the new model with accurate model suffix > 'anuc'. > > Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com> Rename indeed makes sense. One minor, 'whilst you are here' comment inline. > > --- > A patch renaming the file according to the new compatible will follow. > If renaming is not needed or appropriate, that patch can be dropped. > > Revision history: > v2: New patch > --- > .../devicetree/bindings/iio/light/rohm,bu27034.yaml | 9 ++++----- > 1 file changed, 4 insertions(+), 5 deletions(-) > > diff --git a/Documentation/devicetree/bindings/iio/light/rohm,bu27034.yaml b/Documentation/devicetree/bindings/iio/light/rohm,bu27034.yaml > index 30a109a1bf3b..535bd18348ac 100644 > --- a/Documentation/devicetree/bindings/iio/light/rohm,bu27034.yaml > +++ b/Documentation/devicetree/bindings/iio/light/rohm,bu27034.yaml > @@ -4,20 +4,19 @@ > $id: http://devicetree.org/schemas/iio/light/rohm,bu27034.yaml# > $schema: http://devicetree.org/meta-schemas/core.yaml# > > -title: ROHM BU27034 ambient light sensor > +title: ROHM BU27034ANUC ambient light sensor > > maintainers: > - Matti Vaittinen <mazziesaccount@gmail.com> > > description: | > - ROHM BU27034 is an ambient light sesnor with 3 channels and 3 photo diodes > + ROHM BU27034ANUC is an ambient light sesnor with 2 channels and 2 photo diodes sensor > capable of detecting a very wide range of illuminance. Typical application > is adjusting LCD and backlight power of TVs and mobile phones. > - https://fscdn.rohm.com/en/products/databook/datasheet/ic/sensor/light/bu27034nuc-e.pdf > > properties: > compatible: > - const: rohm,bu27034 > + const: rohm,bu27034anuc > > reg: > maxItems: 1 > @@ -37,7 +36,7 @@ examples: > #size-cells = <0>; > > light-sensor@38 { > - compatible = "rohm,bu27034"; > + compatible = "rohm,bu27034anuc"; > reg = <0x38>; > vdd-supply = <&vdd>; > };
On 7/7/24 16:05, Jonathan Cameron wrote: > On Fri, 5 Jul 2024 13:54:12 +0300 > Matti Vaittinen <mazziesaccount@gmail.com> wrote: > >> The BU27034NUC was cancelled before it entered mass production. It was >> replaced by a new variant BU27034ANUC (note, added 'A'). The new >> variant gained a few significant changes, like removal of the 3.rd data >> channel and dropping some of the gain settings. This means that, from >> software point of view these ICs are incompatible. Lux calculation based >> on the data from the sensors needs to be done differently, and on the >> BU27034ANUC the channel 3 data is missing. Also, the gain setting >> differencies matter. >> >> Unfortunately, the identification register was not changed so there is no >> safe way for the software to distinguish the variants. >> >> According to the ROHM HQ engineers, the old BU27034NUC should not be >> encountered in the wild. Hence it makes sense to remove the support for >> the old BU27034NUC and add support for the new BU27034ANUC. Change the >> compatible in order to not load the incompatible old driver for new sensor >> (or, if someone had the old sensor, the new driver for it). >> >> Drop the compatible for old sensor which should not be in the wild and >> add a new compatible for the new model with accurate model suffix >> 'anuc'. >> >> Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com> > Rename indeed makes sense. One minor, 'whilst you are here' comment inline. > >> >> --- >> A patch renaming the file according to the new compatible will follow. >> If renaming is not needed or appropriate, that patch can be dropped. >> >> Revision history: >> v2: New patch >> --- >> .../devicetree/bindings/iio/light/rohm,bu27034.yaml | 9 ++++----- >> 1 file changed, 4 insertions(+), 5 deletions(-) >> >> diff --git a/Documentation/devicetree/bindings/iio/light/rohm,bu27034.yaml b/Documentation/devicetree/bindings/iio/light/rohm,bu27034.yaml >> index 30a109a1bf3b..535bd18348ac 100644 >> --- a/Documentation/devicetree/bindings/iio/light/rohm,bu27034.yaml >> +++ b/Documentation/devicetree/bindings/iio/light/rohm,bu27034.yaml >> @@ -4,20 +4,19 @@ >> $id: http://devicetree.org/schemas/iio/light/rohm,bu27034.yaml# >> $schema: http://devicetree.org/meta-schemas/core.yaml# >> >> -title: ROHM BU27034 ambient light sensor >> +title: ROHM BU27034ANUC ambient light sensor >> >> maintainers: >> - Matti Vaittinen <mazziesaccount@gmail.com> >> >> description: | >> - ROHM BU27034 is an ambient light sesnor with 3 channels and 3 photo diodes >> + ROHM BU27034ANUC is an ambient light sesnor with 2 channels and 2 photo diodes > > sensor Thanks Jonathan! I won't re-spin this unless you ask me to because you wrote you can fix it whilist applying... Please, let me know if you wish me to fix and re-spin :)
On Fri, Jul 05, 2024 at 01:54:12PM +0300, Matti Vaittinen wrote: > The BU27034NUC was cancelled before it entered mass production. It was > replaced by a new variant BU27034ANUC (note, added 'A'). The new > variant gained a few significant changes, like removal of the 3.rd data > channel and dropping some of the gain settings. This means that, from > software point of view these ICs are incompatible. Lux calculation based > on the data from the sensors needs to be done differently, and on the > BU27034ANUC the channel 3 data is missing. Also, the gain setting > differencies matter. > > Unfortunately, the identification register was not changed so there is no > safe way for the software to distinguish the variants. > > According to the ROHM HQ engineers, the old BU27034NUC should not be > encountered in the wild. Hence it makes sense to remove the support for > the old BU27034NUC and add support for the new BU27034ANUC. Change the > compatible in order to not load the incompatible old driver for new sensor > (or, if someone had the old sensor, the new driver for it). > > Drop the compatible for old sensor which should not be in the wild and > add a new compatible for the new model with accurate model suffix > 'anuc'. Since you say that the "old" device should never be encountered "in the wild", this change seems fine. If it turns out that it is in the wild, the new compatible means we could resurrect the old driver etc. Acked-by: Conor Dooley <conor.dooley@microchip.com> Cheers, Conor.
diff --git a/Documentation/devicetree/bindings/iio/light/rohm,bu27034.yaml b/Documentation/devicetree/bindings/iio/light/rohm,bu27034.yaml index 30a109a1bf3b..535bd18348ac 100644 --- a/Documentation/devicetree/bindings/iio/light/rohm,bu27034.yaml +++ b/Documentation/devicetree/bindings/iio/light/rohm,bu27034.yaml @@ -4,20 +4,19 @@ $id: http://devicetree.org/schemas/iio/light/rohm,bu27034.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# -title: ROHM BU27034 ambient light sensor +title: ROHM BU27034ANUC ambient light sensor maintainers: - Matti Vaittinen <mazziesaccount@gmail.com> description: | - ROHM BU27034 is an ambient light sesnor with 3 channels and 3 photo diodes + ROHM BU27034ANUC is an ambient light sesnor with 2 channels and 2 photo diodes capable of detecting a very wide range of illuminance. Typical application is adjusting LCD and backlight power of TVs and mobile phones. - https://fscdn.rohm.com/en/products/databook/datasheet/ic/sensor/light/bu27034nuc-e.pdf properties: compatible: - const: rohm,bu27034 + const: rohm,bu27034anuc reg: maxItems: 1 @@ -37,7 +36,7 @@ examples: #size-cells = <0>; light-sensor@38 { - compatible = "rohm,bu27034"; + compatible = "rohm,bu27034anuc"; reg = <0x38>; vdd-supply = <&vdd>; };
The BU27034NUC was cancelled before it entered mass production. It was replaced by a new variant BU27034ANUC (note, added 'A'). The new variant gained a few significant changes, like removal of the 3.rd data channel and dropping some of the gain settings. This means that, from software point of view these ICs are incompatible. Lux calculation based on the data from the sensors needs to be done differently, and on the BU27034ANUC the channel 3 data is missing. Also, the gain setting differencies matter. Unfortunately, the identification register was not changed so there is no safe way for the software to distinguish the variants. According to the ROHM HQ engineers, the old BU27034NUC should not be encountered in the wild. Hence it makes sense to remove the support for the old BU27034NUC and add support for the new BU27034ANUC. Change the compatible in order to not load the incompatible old driver for new sensor (or, if someone had the old sensor, the new driver for it). Drop the compatible for old sensor which should not be in the wild and add a new compatible for the new model with accurate model suffix 'anuc'. Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com> --- A patch renaming the file according to the new compatible will follow. If renaming is not needed or appropriate, that patch can be dropped. Revision history: v2: New patch --- .../devicetree/bindings/iio/light/rohm,bu27034.yaml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)