Skip to content

Convert i2c adapters from class devices to bus devices

Jean Delvare linux-i2c 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4Add support for compatibility classesdrivers/base/class.c include/linux/device.h+95 -00 replies
2/4i2c: Convert i2c clients to a device typedrivers/i2c/i2c-core.c+47 -200 replies
3/4i2c: Convert i2c adapters to bus devicesdrivers/i2c/i2c-core.c+40 -350 replies
4/4i2c: Provide compatibility links for i2c adaptersdrivers/i2c/Kconfig drivers/i2c/i2c-core.c+40 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/4] Convert i2c adapters from class devices to bus devices

As Kay Sievers explained that i2c adapters should be bus devices rather than class devices, convert them.

[PATCH 1/4] Add support for compatibility classes [PATCH 2/4] i2c: Convert i2c clients to a device type [PATCH 3/4] i2c: Convert i2c adapters to bus devices [PATCH 4/4] i2c: Provide compatibility links for i2c adapters

 drivers/base/class.c   |   87 +++++++++++++++++++++++++
 drivers/i2c/Kconfig    |    8 ++
 drivers/i2c/i2c-core.c |  165 +++++++++++++++++++++++++++++++++----------------
 include/linux/device.h |    8 ++
 4 files changed, 217 insertions(+), 51 deletions(-)

Care has been taken to not break user-space compatibility. I have also updated libsensors and sensors-detect already to look for i2c adapters in /sys/bus/i2c/devices rather than /sys/class/i2c-adapter. I am not aware of other user-space applications or libraries using /sys/class/i2c-adapter, but if you do please tell me.

Improvements are possible on the power management side, but I did not have the time to deal with this now, so this is left for later.

Signature · 1 line
Jean Delvare