[PATCH v2 0/2] i2c: slave-eeprom: DT binding and OF match table for module autoload

From: Arun Iyengar via B4 Relay

Date: Thu Nov 19 2026 - 23:32:32 EST


A slave EEPROM backend described in the device tree binds only when the
driver is built in: the client announces an of: modalias and the module
has only i2c: aliases. Patch 2 adds the OF table.

Patch 1 documents the compatibles. Wolfram Sang asked for a YAML file
when Björn Ardö sent a patch for the same problem in 2021 [1], and on v1
he asked why compatibles without a binding should be added.

The binding keeps the driver's names, without a vendor prefix. Björn's
patch and the old DesignWare binding example (removed in 2020) used
"linux,slave-24c02"; that form binds too, because the I2C core strips
the prefix, but would not autoload with this table. I can switch to it
or list both if preferred.

This series was developed with Claude (Anthropic) as a coding assistant:
it investigated the problem, wrote the code, the binding and the commit
messages. I reviewed it, and it was tested on an Orange Pi Zero2 (H616)
as described in patch 2.

[1] https://lore.kernel.org/r/20210504135209.4757-1-bjorn.ardo@xxxxxxxx

Signed-off-by: Arun Iyengar <aiyengar1990@xxxxxxxxx>
---
Changes in v2:
- New patch 1: DT binding for the compatibles (Wolfram Sang).
- Drop the <linux/mod_devicetable.h> include: <linux/i2c.h> already
provides of_device_id (Uwe Kleine-König).
- Fix a NULL dereference in v1: a node that matches through a fallback
compatible has no i2c id. Take the size and flags from
i2c_get_match_data() and give the OF entries that data.
- Rebase onto i2c/i2c-next, new test results.
- Link to v1: https://patch.msgid.link/20261110-i2c-slave-eeprom-of-match-v1-1-8f762bf06205@xxxxxxxxx

---
Arun Iyengar (2):
dt-bindings: i2c: Add the slave EEPROM backend
i2c: slave-eeprom: Add an OF match table for module autoload

.../devicetree/bindings/i2c/slave-eeprom.yaml | 59 ++++++++++++++++++++++
drivers/i2c/i2c-slave-eeprom.c | 34 +++++++++++--
2 files changed, 89 insertions(+), 4 deletions(-)
---
base-commit: 9c19b1c078541841f6b68f815bb4ba5201ab2b65
change-id: 20261110-i2c-slave-eeprom-of-match-ba9fdb67a830

Best regards,
--
Arun Iyengar <aiyengar1990@xxxxxxxxx>