[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6grkkioyfqvjy37ztevbs7lbkhc4yfvvomwk7jx5qjmrsdihir@mlluicav2cvs>
Date: Wed, 12 Jun 2024 10:09:15 +0200
From: Uwe Kleine-König <u.kleine-koenig@...libre.com>
To: Trevor Gamblin <tgamblin@...libre.com>
Cc: Lucas Stankus <lucas.p.stankus@...il.com>,
Lars-Peter Clausen <lars@...afoo.de>, Michael Hennerich <Michael.Hennerich@...log.com>,
Jonathan Cameron <jic23@...nel.org>, Dmitry Rokosov <ddrokosov@...rdevices.ru>,
Cosmin Tanislav <cosmin.tanislav@...log.com>, Chen-Yu Tsai <wens@...e.org>,
Hans de Goede <hdegoede@...hat.com>, Ray Jui <rjui@...adcom.com>,
Scott Branden <sbranden@...adcom.com>,
Broadcom internal kernel review list <bcm-kernel-feedback-list@...adcom.com>, Shawn Guo <shawnguo@...nel.org>,
Sascha Hauer <s.hauer@...gutronix.de>, Pengutronix Kernel Team <kernel@...gutronix.de>,
Fabio Estevam <festevam@...il.com>, Neil Armstrong <neil.armstrong@...aro.org>,
Kevin Hilman <khilman@...libre.com>, Jerome Brunet <jbrunet@...libre.com>,
Martin Blumenstingl <martin.blumenstingl@...glemail.com>, Saravanan Sekar <sravanhome@...il.com>,
Orson Zhai <orsonzhai@...il.com>, Baolin Wang <baolin.wang@...ux.alibaba.com>,
Chunyan Zhang <zhang.lyra@...il.com>, Maxime Coquelin <mcoquelin.stm32@...il.com>,
Alexandre Torgue <alexandre.torgue@...s.st.com>, Nuno Sá <nuno.sa@...log.com>,
Linus Walleij <linus.walleij@...aro.org>, Jean-Baptiste Maneyrol <jmaneyrol@...ensense.com>,
Crt Mori <cmo@...exis.com>, linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, imx@...ts.linux.dev, linux-amlogic@...ts.infradead.org,
linux-arm-msm@...r.kernel.org, linux-stm32@...md-mailman.stormreply.com
Subject: Re: [RESEND][PATCH] iio: simplify with regmap_set_bits(),
regmap_clear_bits()
Hi Trevor,
On Tue, Jun 11, 2024 at 12:52:06PM -0400, Trevor Gamblin wrote:
> Simplify the way regmap is accessed in iio drivers.
>
> Instead of using regmap_update_bits() and passing the mask twice, use
> regmap_set_bits().
>
> Instead of using regmap_update_bits() and passing val = 0, use
> regmap_clear_bits().
>
> Suggested-by: Uwe Kleine-König <u.kleine-koenig@...libre.com>
> Signed-off-by: Trevor Gamblin <tgamblin@...libre.com>
> ---
> CC list got suppressed on first submission, so resending. Sorry about
> that.
>
> drivers/iio/accel/adxl313_core.c | 4 +-
> drivers/iio/accel/adxl313_spi.c | 4 +-
> drivers/iio/accel/fxls8962af-core.c | 18 ++--
> drivers/iio/accel/kxsd9.c | 6 +-
> drivers/iio/accel/msa311.c | 6 +-
> drivers/iio/adc/ad4130.c | 4 +-
> drivers/iio/adc/axp20x_adc.c | 5 +-
> drivers/iio/adc/axp288_adc.c | 4 +-
> drivers/iio/adc/bcm_iproc_adc.c | 8 +-
> drivers/iio/adc/berlin2-adc.c | 24 ++---
> drivers/iio/adc/cpcap-adc.c | 44 +++-----
> drivers/iio/adc/fsl-imx25-gcq.c | 16 ++-
> drivers/iio/adc/ina2xx-adc.c | 3 +-
> drivers/iio/adc/intel_mrfld_adc.c | 4 +-
> drivers/iio/adc/meson_saradc.c | 101 ++++++++----------
> drivers/iio/adc/mp2629_adc.c | 19 ++--
> drivers/iio/adc/qcom-spmi-rradc.c | 50 +++++----
> drivers/iio/adc/rn5t618-adc.c | 5 +-
> drivers/iio/adc/sc27xx_adc.c | 41 ++++---
> drivers/iio/adc/stm32-dfsdm-adc.c | 29 +++--
> drivers/iio/dac/ltc2688.c | 5 +-
> drivers/iio/dac/stm32-dac-core.c | 5 +-
> drivers/iio/gyro/bmg160_core.c | 4 +-
> drivers/iio/gyro/mpu3050-core.c | 33 +++---
> drivers/iio/health/afe4403.c | 9 +-
> drivers/iio/health/afe4404.c | 9 +-
> drivers/iio/health/max30100.c | 5 +-
> drivers/iio/health/max30102.c | 5 +-
> .../imu/inv_icm42600/inv_icm42600_buffer.c | 14 ++-
> .../iio/imu/inv_icm42600/inv_icm42600_core.c | 9 +-
> .../iio/imu/inv_icm42600/inv_icm42600_i2c.c | 4 +-
> .../iio/imu/inv_icm42600/inv_icm42600_spi.c | 4 +-
> drivers/iio/light/adux1020.c | 13 ++-
> drivers/iio/light/iqs621-als.c | 4 +-
> drivers/iio/light/isl29018.c | 6 +-
> drivers/iio/light/st_uvis25_core.c | 4 +-
> drivers/iio/light/veml6030.c | 4 +-
> drivers/iio/magnetometer/ak8974.c | 11 +-
> drivers/iio/magnetometer/mmc35240.c | 8 +-
> drivers/iio/pressure/bmp280-core.c | 4 +-
> drivers/iio/proximity/sx9324.c | 5 +-
> drivers/iio/proximity/sx9360.c | 5 +-
> drivers/iio/proximity/sx9500.c | 12 +--
> drivers/iio/proximity/sx_common.c | 9 +-
> drivers/iio/temperature/mlx90632.c | 4 +-
> drivers/iio/trigger/stm32-timer-trigger.c | 34 +++---
> 46 files changed, 273 insertions(+), 351 deletions(-)
I found five more drivers below drivers/iio that could benefit from such
a conversion:
drivers/iio/adc/ad7173.c | 2 +-
drivers/iio/adc/ti-ads1298.c | 13 ++++++-------
drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c | 4 ++--
drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c | 8 ++++----
drivers/iio/light/veml6075.c | 4 ++--
5 files changed, 15 insertions(+), 16 deletions(-)
But even without addressing these:
Acked-by: Uwe Kleine-König <u.kleine-koenig@...libre.com>
Thanks for picking up my suggestion,
Uwe
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists