Devicetree
 help / color / mirror / Atom feed
* [PATCH v2 0/2] i2c: slave-eeprom: DT binding and OF match table for module autoload
@ 2026-11-20  4:32 Arun Iyengar via B4 Relay
  2026-11-20  4:32 ` [PATCH v2 1/2] dt-bindings: i2c: Add the slave EEPROM backend Arun Iyengar via B4 Relay
  2026-11-20  4:32 ` [PATCH v2 2/2] i2c: slave-eeprom: Add an OF match table for module autoload Arun Iyengar via B4 Relay
  0 siblings, 2 replies; 4+ messages in thread
From: Arun Iyengar via B4 Relay @ 2026-11-20  4:32 UTC (permalink / raw)
  To: Andi Shyti, Rob Herring, Krzysztof Kozlowski, Conor Dooley
  Cc: Wolfram Sang, Uwe Kleine-König, Björn Ardö,
	linux-i2c, devicetree, linux-kernel, Arun Iyengar

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@axis.com

Signed-off-by: Arun Iyengar <aiyengar1990@gmail.com>
---
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@gmail.com

---
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@gmail.com>



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

end of thread, other threads:[~2026-12-01 20:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-20  4:32 [PATCH v2 0/2] i2c: slave-eeprom: DT binding and OF match table for module autoload Arun Iyengar via B4 Relay
2026-11-20  4:32 ` [PATCH v2 1/2] dt-bindings: i2c: Add the slave EEPROM backend Arun Iyengar via B4 Relay
2026-12-01 20:38   ` Rob Herring
2026-11-20  4:32 ` [PATCH v2 2/2] i2c: slave-eeprom: Add an OF match table for module autoload Arun Iyengar via B4 Relay

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