Skip to content

i2c: core: Introduce i2c_client_get_device_id helper

Angel Iglesias linux-i2c linux-iio lkml 3 versions – Applied

Status from this message: I merged this branch also into i2c/for-mergewindow.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest2 patches 3 repliesApplied
  2. v22 patches 3 repliesSuperseded
  3. v1 RFC2 patches 10 repliesSuperseded

Changes in v3 from the cover letter

* Update helper function doc comment dropping misleading sentence.

Patches in v3 Applied

#Subject and filesSizeRepliesApplied
1/2i2c: core: Introduce i2c_client_get_device_id helper functiondrivers/i2c/i2c-core-base.c include/linux/i2c.h+15 -03 replies
2/2iio: pressure: bmp280: convert to i2c's .probe_new()drivers/iio/pressure/bmp280-i2c.c+3 -30 replies

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchAndy ShevchenkoJonathan Cameron
1/2R-b R-b
2/2R-b A-b

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

Read the v3 thread

Cover letter [PATCH v3 0/2] i2c: core: Introduce i2c_client_get_device_id helper

Introduces a new i2c helper to query driver match tables and recover the identity of the bound device. This helper should help with the migration of existing drivers to use the new i2c_driver .probe_new callback, which does not provide the device id with the pointer to the driver data as the previous .probe callback.

As part of the patchset, migrated the bmp280 IIO driver to .new_probe callback using the new helper.

Changes from v2 --> v3:
* Update helper function doc comment dropping misleading sentence.

Changes from v1 --> v2:
* Add further clarification that the device queried needs to be bound to the driver.
* Drops extra newline after function return.
* Discard unrelated style changes.

Previous version:
https://lore.kernel.org/all/[email protected]/

Angel Iglesias (2):
i2c: core: Introduce i2c_client_get_device_id helper function
iio: pressure: bmp280: convert to i2c's .probe_new()

 drivers/i2c/i2c-core-base.c       | 14 ++++++++++++++
 drivers/iio/pressure/bmp280-i2c.c |  6 +++---
 include/linux/i2c.h               |  1 +
 3 files changed, 18 insertions(+), 3 deletions(-)

base-commit: 474b4c719c40ded10b0b3450a396c0698e337802

Signature · 1 line
2.38.1