Skip to content

i2c: Relax mandatory I2C ID table passing

Lee Jones acpica-devel linux-acpi linux-arm-kernel linux-devicetree linux-i2c lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest7 patches 30 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7ACPICA: Only include ACPI asm files if ACPI is enabledinclude/acpi/platform/aclinux.h+3 -29 replies
2/7i2c: Add pointer dereference protection to i2c_match_id()drivers/i2c/i2c-core.c+7 -50 replies
3/7i2c: Add the ability to match device to compatible string without an of_nodedrivers/i2c/i2c-core.c include/linux/i2c.h+35 -05 replies
4/7i2c: Match using traditional OF methods, then by vendor-less compatible stringsdrivers/i2c/i2c-core.c include/linux/i2c.h+22 -00 replies
5/7i2c: Make I2C ID tables non-mandatory for DT'ed and/or ACPI'ed devicesdrivers/i2c/i2c-core.c+13 -21 reply
6/7of/device: Allow I2C devices to OF match without supplying an OF nodedrivers/of/device.c+15 -10 replies
7/7OF/ACPI/I2C: Add generic match function for the aforementioned systemsinclude/linux/match.h+40 -015 replies

Reviews trailers per patch

1 of 7 patches has a Reviewed-by or Acked-by.

PatchGrant Likely
1/7
2/7
3/7
4/7
5/7A-b
6/7
7/7

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

Read the v1 thread

Cover letter [PATCH 0/7] i2c: Relax mandatory I2C ID table passing

Hi Wolfram,

As previously discussed I believe it should be okay for an I2C device driver _not_ supply an I2C ID table to match to. The I2C subsystem should be able to match via other means, such as via OF and/or ACPI tables. The blocking factor during our previous conversation was to keep registering via sysfs up and running. This set does that.

After thinking more deeply about the problem, it occurred to me that any I2C device driver which issues an {of,acpi}_match)_device() would also fail their probe(). Bolted on to this set is a new, more generic way for these devices to match against any of the tables which are present in the kernel today i.e. OF, ACPI and I2C.

NB: ACPI is not fully supported, but OF is.

I hope this ticks all of your boxes.

Kind regards,
Lee

 drivers/i2c/i2c-core.c          | 65 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-------
 drivers/of/device.c             | 16 +++++++++++++++-
 include/acpi/platform/aclinux.h |  5 +++--
 include/linux/i2c.h             | 19 +++++++++++++++++++
 include/linux/match.h           | 40 ++++++++++++++++++++++++++++++++++++++++
 5 files changed, 135 insertions(+), 10 deletions(-)