public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/2] i2c: core: Introduce i2c_client_get_device_id helper
@ 2022-11-13 17:45 Angel Iglesias
  2022-11-13 17:46 ` [PATCH v3 1/2] i2c: core: Introduce i2c_client_get_device_id helper function Angel Iglesias
  2022-11-13 17:54 ` [PATCH v3 2/2] iio: pressure: bmp280: convert to i2c's .probe_new() Angel Iglesias
  0 siblings, 2 replies; 6+ messages in thread
From: Angel Iglesias @ 2022-11-13 17:45 UTC (permalink / raw)
  To: linux-iio
  Cc: Uwe Kleine-König, linux-kernel, Angel Iglesias, Wolfram Sang,
	linux-i2c

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/cover.1667750698.git.ang.iglesiasg@gmail.com/

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
-- 
2.38.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-11-14 20:29 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-13 17:45 [PATCH v3 0/2] i2c: core: Introduce i2c_client_get_device_id helper Angel Iglesias
2022-11-13 17:46 ` [PATCH v3 1/2] i2c: core: Introduce i2c_client_get_device_id helper function Angel Iglesias
2022-11-14 19:53   ` Wolfram Sang
2022-11-14 20:41     ` Jonathan Cameron
2022-11-14 19:55   ` Jonathan Cameron
2022-11-13 17:54 ` [PATCH v3 2/2] iio: pressure: bmp280: convert to i2c's .probe_new() Angel Iglesias

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox