mbox series

[0/7] iio:st_sensors: make use of regmap API

Message ID 20190617234943.10669-1-denis.ciocca@st.com (mailing list archive)
Headers show
Series iio:st_sensors: make use of regmap API | expand

Message

Denis CIOCCA June 17, 2019, 11:49 p.m. UTC
This series is meant to replace I2C/SPI APIs and make use of regmap
to reduce redundancy.

Denis Ciocca (7):
  iio:common:st_sensors: add st_sensors_get_settings_index() helper
    function
  iio:accel: introduce st_accel_multiread_bit() function
  iio:magn: introduce st_magn_multiread_bit() function
  iio:gyro: introduce st_gyro_multiread_bit() function
  iio:pressure: introduce st_pressure_multiread_bit() function
  iio: make st_sensors driver use regmap
  iio:common: make st_sensors_write_data_with_mask() inline

 drivers/iio/accel/st_accel.h                  |   1 +
 drivers/iio/accel/st_accel_core.c             |  19 +++-
 drivers/iio/accel/st_accel_i2c.c              |   7 +-
 drivers/iio/accel/st_accel_spi.c              |   6 +-
 .../iio/common/st_sensors/st_sensors_buffer.c |  10 +-
 .../iio/common/st_sensors/st_sensors_core.c   |  90 ++++++++-------
 .../iio/common/st_sensors/st_sensors_i2c.c    |  65 +++++------
 .../iio/common/st_sensors/st_sensors_spi.c    | 103 +++++-------------
 .../common/st_sensors/st_sensors_trigger.c    |  10 +-
 drivers/iio/gyro/st_gyro.h                    |   1 +
 drivers/iio/gyro/st_gyro_core.c               |  19 +++-
 drivers/iio/gyro/st_gyro_i2c.c                |   5 +-
 drivers/iio/gyro/st_gyro_spi.c                |   6 +-
 drivers/iio/magnetometer/st_magn.h            |   1 +
 drivers/iio/magnetometer/st_magn_core.c       |  19 +++-
 drivers/iio/magnetometer/st_magn_i2c.c        |   5 +-
 drivers/iio/magnetometer/st_magn_spi.c        |   6 +-
 drivers/iio/pressure/st_pressure.h            |   1 +
 drivers/iio/pressure/st_pressure_core.c       |  19 +++-
 drivers/iio/pressure/st_pressure_i2c.c        |   5 +-
 drivers/iio/pressure/st_pressure_spi.c        |   6 +-
 include/linux/iio/common/st_sensors.h         |  41 +------
 include/linux/iio/common/st_sensors_i2c.h     |   5 +-
 include/linux/iio/common/st_sensors_spi.h     |   5 +-
 24 files changed, 230 insertions(+), 225 deletions(-)

Comments

Jonathan Cameron June 22, 2019, 10:27 a.m. UTC | #1
On Mon, 17 Jun 2019 16:49:36 -0700
Denis Ciocca <denis.ciocca@st.com> wrote:

> This series is meant to replace I2C/SPI APIs and make use of regmap
> to reduce redundancy.
Huh. Not a great deal of redundancy reduction given the
stats, but potentially makes sense for a whole load of other reasons and for
future development!

> 
> Denis Ciocca (7):
>   iio:common:st_sensors: add st_sensors_get_settings_index() helper
>     function
>   iio:accel: introduce st_accel_multiread_bit() function
>   iio:magn: introduce st_magn_multiread_bit() function
>   iio:gyro: introduce st_gyro_multiread_bit() function
>   iio:pressure: introduce st_pressure_multiread_bit() function
>   iio: make st_sensors driver use regmap
>   iio:common: make st_sensors_write_data_with_mask() inline
> 
>  drivers/iio/accel/st_accel.h                  |   1 +
>  drivers/iio/accel/st_accel_core.c             |  19 +++-
>  drivers/iio/accel/st_accel_i2c.c              |   7 +-
>  drivers/iio/accel/st_accel_spi.c              |   6 +-
>  .../iio/common/st_sensors/st_sensors_buffer.c |  10 +-
>  .../iio/common/st_sensors/st_sensors_core.c   |  90 ++++++++-------
>  .../iio/common/st_sensors/st_sensors_i2c.c    |  65 +++++------
>  .../iio/common/st_sensors/st_sensors_spi.c    | 103 +++++-------------
>  .../common/st_sensors/st_sensors_trigger.c    |  10 +-
>  drivers/iio/gyro/st_gyro.h                    |   1 +
>  drivers/iio/gyro/st_gyro_core.c               |  19 +++-
>  drivers/iio/gyro/st_gyro_i2c.c                |   5 +-
>  drivers/iio/gyro/st_gyro_spi.c                |   6 +-
>  drivers/iio/magnetometer/st_magn.h            |   1 +
>  drivers/iio/magnetometer/st_magn_core.c       |  19 +++-
>  drivers/iio/magnetometer/st_magn_i2c.c        |   5 +-
>  drivers/iio/magnetometer/st_magn_spi.c        |   6 +-
>  drivers/iio/pressure/st_pressure.h            |   1 +
>  drivers/iio/pressure/st_pressure_core.c       |  19 +++-
>  drivers/iio/pressure/st_pressure_i2c.c        |   5 +-
>  drivers/iio/pressure/st_pressure_spi.c        |   6 +-
>  include/linux/iio/common/st_sensors.h         |  41 +------
>  include/linux/iio/common/st_sensors_i2c.h     |   5 +-
>  include/linux/iio/common/st_sensors_spi.h     |   5 +-
>  24 files changed, 230 insertions(+), 225 deletions(-)
>