Message ID | d677b957164930c3d2fee900117795b25b85c3fa.1679009443.git.mehdi.djait.k@gmail.com (mailing list archive) |
---|---|
State | Changes Requested |
Headers | show |
Series | iio: accel: Add support for Kionix/ROHM KX132 accelerometer | expand |
On Fri, 17 Mar 2023 00:48:35 +0100 Mehdi Djait <mehdi.djait.k@gmail.com> wrote: > Extend the kionix,kx022a.yaml file to support the > kx132 device > > Signed-off-by: Mehdi Djait <mehdi.djait.k@gmail.com> Pins and power supplies etc all look the same to me so indeed seems that you have covered all that is needed. One small comment inline and I think Matti's point about more specific compatibles probably needs to be taken into account if there are known variants. Kionix has done this for a long time. I remember that fun with the kxsd9 lots of years back - that had lots of subtle variants. > --- > .../bindings/iio/accel/kionix,kx022a.yaml | 13 ++++++++----- > 1 file changed, 8 insertions(+), 5 deletions(-) > > diff --git a/Documentation/devicetree/bindings/iio/accel/kionix,kx022a.yaml b/Documentation/devicetree/bindings/iio/accel/kionix,kx022a.yaml > index 986df1a6ff0a..ac1e27402d5e 100644 > --- a/Documentation/devicetree/bindings/iio/accel/kionix,kx022a.yaml > +++ b/Documentation/devicetree/bindings/iio/accel/kionix,kx022a.yaml > @@ -4,19 +4,22 @@ > $id: http://devicetree.org/schemas/iio/accel/kionix,kx022a.yaml# > $schema: http://devicetree.org/meta-schemas/core.yaml# > > -title: ROHM/Kionix KX022A Accelerometer > +title: ROHM/Kionix KX022A and KX132 Accelerometers > > maintainers: > - Matti Vaittinen <mazziesaccount@gmail.com> > > description: | > - KX022A is a 3-axis accelerometer supporting +/- 2G, 4G, 8G and 16G ranges, > - output data-rates from 0.78Hz to 1600Hz and a hardware-fifo buffering. > - KX022A can be accessed either via I2C or SPI. > + KX022A and KX132 are 3-axis accelerometers supporting +/- 2G, 4G, 8G and > + 16G ranges, output data-rates from 0.78Hz to 1600Hz and a hardware-fifo This may be one of those 'there are many versions' of the chip issues, but the random datasheet I got via digikey (kionix website was slow and I'm impatient) has max as 25600Hz for the KX132-1211. No particular reason the sampling rates need to be in this description so if they are different I'd just remove the mention or just say "variable output data-rates" > + buffering. > + KX022A and KX132 can be accessed either via I2C or SPI. > > properties: > compatible: > - const: kionix,kx022a > + enum: > + - kionix,kx022a > + - kionix,kx132 > > reg: > maxItems: 1
Hello Jonathan, On Sun, Mar 19, 2023 at 03:54:51PM +0000, Jonathan Cameron wrote: > On Fri, 17 Mar 2023 00:48:35 +0100 > Mehdi Djait <mehdi.djait.k@gmail.com> wrote: > > > Extend the kionix,kx022a.yaml file to support the > > kx132 device > > > > Signed-off-by: Mehdi Djait <mehdi.djait.k@gmail.com> > > Pins and power supplies etc all look the same to me so indeed seems that > you have covered all that is needed. One small comment inline > and I think Matti's point about more specific compatibles probably > needs to be taken into account if there are known variants. > > Kionix has done this for a long time. I remember that fun with the > kxsd9 lots of years back - that had lots of subtle variants. > > > --- > > .../bindings/iio/accel/kionix,kx022a.yaml | 13 ++++++++----- > > 1 file changed, 8 insertions(+), 5 deletions(-) > > > > diff --git a/Documentation/devicetree/bindings/iio/accel/kionix,kx022a.yaml b/Documentation/devicetree/bindings/iio/accel/kionix,kx022a.yaml > > index 986df1a6ff0a..ac1e27402d5e 100644 > > --- a/Documentation/devicetree/bindings/iio/accel/kionix,kx022a.yaml > > +++ b/Documentation/devicetree/bindings/iio/accel/kionix,kx022a.yaml > > @@ -4,19 +4,22 @@ > > $id: http://devicetree.org/schemas/iio/accel/kionix,kx022a.yaml# > > $schema: http://devicetree.org/meta-schemas/core.yaml# > > > > -title: ROHM/Kionix KX022A Accelerometer > > +title: ROHM/Kionix KX022A and KX132 Accelerometers > > > > maintainers: > > - Matti Vaittinen <mazziesaccount@gmail.com> > > > > description: | > > - KX022A is a 3-axis accelerometer supporting +/- 2G, 4G, 8G and 16G ranges, > > - output data-rates from 0.78Hz to 1600Hz and a hardware-fifo buffering. > > - KX022A can be accessed either via I2C or SPI. > > + KX022A and KX132 are 3-axis accelerometers supporting +/- 2G, 4G, 8G and > > + 16G ranges, output data-rates from 0.78Hz to 1600Hz and a hardware-fifo > > This may be one of those 'there are many versions' of the chip issues, but > the random datasheet I got via digikey (kionix website was slow and I'm > impatient) has max as 25600Hz for the KX132-1211. > > No particular reason the sampling rates need to be in this description so > if they are different I'd just remove the mention or just say > "variable output data-rates" Yes indeed, the max frequency is different and the max frequency supported in the driver is 200Hz anyway. Removing the values of samling rates is best here. I will change it in v2. -- Kind Regards Mehdi Djait
diff --git a/Documentation/devicetree/bindings/iio/accel/kionix,kx022a.yaml b/Documentation/devicetree/bindings/iio/accel/kionix,kx022a.yaml index 986df1a6ff0a..ac1e27402d5e 100644 --- a/Documentation/devicetree/bindings/iio/accel/kionix,kx022a.yaml +++ b/Documentation/devicetree/bindings/iio/accel/kionix,kx022a.yaml @@ -4,19 +4,22 @@ $id: http://devicetree.org/schemas/iio/accel/kionix,kx022a.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# -title: ROHM/Kionix KX022A Accelerometer +title: ROHM/Kionix KX022A and KX132 Accelerometers maintainers: - Matti Vaittinen <mazziesaccount@gmail.com> description: | - KX022A is a 3-axis accelerometer supporting +/- 2G, 4G, 8G and 16G ranges, - output data-rates from 0.78Hz to 1600Hz and a hardware-fifo buffering. - KX022A can be accessed either via I2C or SPI. + KX022A and KX132 are 3-axis accelerometers supporting +/- 2G, 4G, 8G and + 16G ranges, output data-rates from 0.78Hz to 1600Hz and a hardware-fifo + buffering. + KX022A and KX132 can be accessed either via I2C or SPI. properties: compatible: - const: kionix,kx022a + enum: + - kionix,kx022a + - kionix,kx132 reg: maxItems: 1
Extend the kionix,kx022a.yaml file to support the kx132 device Signed-off-by: Mehdi Djait <mehdi.djait.k@gmail.com> --- .../bindings/iio/accel/kionix,kx022a.yaml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-)