Skip to content

iio: use regmap to retrieve struct device

Alison Schofield linux-arm-kernel linux-iio linux-samsung-soc lkml 2 versions – Applied

Status from this message: Applied to the togreg branch of iio.git

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest5 patches 14 repliesApplied
  2. v19 patches 8 repliesSuperseded

Changes in v2 from the cover letter

This set is updated following reviews teaching me that not all regmaps in global data will be of that device. Discards and keepers are noted below. No actual code changes just a remake of the patchset.

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/5iio: accel: bmc150: use regmap to retrieve struct devicedrivers/iio/accel/bmc150-accel-core.c+54 -454 replies
2/5iio: accel: mxc4005: use regmap to retrieve struct devicedrivers/iio/accel/mxc4005.c+15 -111 reply
3/5iio: health: afe4403: use regmap to retrieve struct devicedrivers/iio/health/afe4403.c+17 -191 reply
4/5iio: health: afe4404: use regmap to retrieve struct devicedrivers/iio/health/afe4404.c+19 -195 replies
5/5iio: gyro: bmg160: use regmap to retrieve struct devicedrivers/iio/gyro/bmg160_core.c+44 -423 replies

Reviews trailers per patch

2 of 5 patches have a Reviewed-by or Acked-by.

PatchIrina TirdeaSrinivas Pandruvada
1/5R-b R-b
2/5
3/5
4/5
5/5R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/5] iio: use regmap to retrieve struct device

These drivers include both struct regmap and struct device in their global data. Remove the redundant copy by deleting struct device from the drivers global data and using regmap API to retrieve when needed.

This patchset removes all such redundancies in drivers/iio/.

Patches created using Coccinelle plus hand edits for whitespace.

Changes v1->v2:
This set is updated following reviews teaching me that not all regmaps in global data will be of that device. Discards and keepers are noted below. No actual code changes just a remake of the patchset.

Jonathan - I saw you want to let it simmer, just want to let it simmer cleaner ;)

accel: mma7455
Removing: Joachim ack'd, Jonathan took v1

adc: exynos_adc
Discard: regmap is of PMU parent

adc: qcom-spmi-iadc
adc: qcom-spmi-vadc
Discard: first line of _probe gets regmap from parent

accel: bmc150
gyro: bmg160
Keep: regmap passed into _probe from i2c,spi_probe where it was initialized for this device

accel: mxc4005
health: afe4403
health: afe4404
Keep: regmap initialized in _probe for this device

Alison Schofield (5):
iio: accel: bmc150: use regmap to retrieve struct device
iio: accel: mxc4005: use regmap to retrieve struct device
iio: health: afe4403: use regmap to retrieve struct device
iio: health: afe4404: use regmap to retrieve struct device
iio: gyro: bmg160: use regmap to retrieve struct device

 drivers/iio/accel/bmc150-accel-core.c | 99 +++++++++++++++++++----------------
 drivers/iio/accel/mxc4005.c           | 26 +++++----
 drivers/iio/gyro/bmg160_core.c        | 86 +++++++++++++++---------------
 drivers/iio/health/afe4403.c          | 36 ++++++-------
 drivers/iio/health/afe4404.c          | 38 +++++++-------
 5 files changed, 149 insertions(+), 136 deletions(-)
Signature · 1 line
2.1.4