mbox series

[v1,0/2] i2c: Reduce use of i2c_of_match_device()

Message ID 20250212165012.2413079-1-andriy.shevchenko@linux.intel.com
Headers show
Series i2c: Reduce use of i2c_of_match_device() | expand

Message

Andy Shevchenko Feb. 12, 2025, 4:46 p.m. UTC
The i2c_of_match_device() was developed as internal API and was exported just
in case well before we get an idea of the generic helper for getting driver
data for the matched device. For all the times of i2c_of_match_device() being
exported there were _only_ three users, two of which had been already converted
to better API. For preventing the use of i2c_of_match_device(), make it private
to I²C subsystem.

This is assumed to go via I²C tree, but can be done differently taking into
account the immutable tag or branch for involved subsystems.

Please, review and ack.

Andy Shevchenko (2):
  power: ip5xxx_power: Make use of i2c_get_match_data()
  i2c: Unexport i2c_of_match_device()

 drivers/i2c/i2c-core-of.c           |  1 -
 drivers/i2c/i2c-core.h              |  9 +++++++++
 drivers/power/supply/ip5xxx_power.c |  6 ++----
 include/linux/i2c.h                 | 11 -----------
 4 files changed, 11 insertions(+), 16 deletions(-)