lkml.org 
[lkml]   [2023]   [Aug]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v8 7/7] iio: accel: Add support for Kionix/ROHM KX132-1211 accelerometer
On Wed, Aug 23, 2023 at 11:16:41PM +0200, Mehdi Djait wrote:
> Kionix KX132-1211 is a tri-axis 16-bit accelerometer that can support
> ranges from ±2G to ±16G, digital output through I²C/SPI.
> Add support for basic accelerometer features such as reading acceleration
> via IIO using raw reads, triggered buffer (data-ready), or the WMI IRQ.

...

> help
> - Enable support for the Kionix KX022A digital tri-axis
> - accelerometer connected to I2C interface.
> + Enable support for the Kionix KX022A, KX132-1211 digital tri-axis
> + accelerometers connected to SPI interface.

I know I have given a tag, but since it most likely require a new version,
this can be amended for the better maintenance as

Enable support for the Kionix digital tri-axis accelerometers
connected to SPI interface. Supported devices are:
KX022A, KX132-1211

...

> help
> - Enable support for the Kionix KX022A digital tri-axis
> - accelerometer connected to I2C interface.
> + Enable support for the Kionix KX022A, KX132-1211 digital tri-axis
> + accelerometers connected to I2C interface.

Ditto.

...

> +static const struct regmap_access_table kx132_volatile_regs = {
> + .yes_ranges = &kx132_volatile_ranges[0],


This should be the same as

.yes_ranges = kx132_volatile_ranges,

> + .n_yes_ranges = ARRAY_SIZE(kx132_volatile_ranges),
> +};

Ditto for the following.

> +static const struct regmap_access_table kx132_precious_regs = {
> + .yes_ranges = &kx132_precious_ranges[0],
> + .n_yes_ranges = ARRAY_SIZE(kx132_precious_ranges),
> +};

> +static const struct regmap_access_table kx132_ro_regs = {
> + .no_ranges = &kx132_read_only_ranges[0],
> + .n_no_ranges = ARRAY_SIZE(kx132_read_only_ranges),
> +};

> +static const struct regmap_access_table kx132_wo_regs = {
> + .no_ranges = &kx132_write_only_ranges[0],
> + .n_no_ranges = ARRAY_SIZE(kx132_write_only_ranges),
> +};

> +static const struct regmap_access_table kx132_nir_regs = {
> + .yes_ranges = &kx132_noinc_read_ranges[0],
> + .n_yes_ranges = ARRAY_SIZE(kx132_noinc_read_ranges),
> +};

--
With Best Regards,
Andy Shevchenko


\
 
 \ /
  Last update: 2023-08-24 14:04    [W:0.128 / U:0.408 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site