Skip to contentSkip to conversation

i2c: muxes: Add GPIO-detected hotplug I2C

PATCH RESEND In review Svyatoslav Ryhel 5 participants 17 messages Oct 13, 2025 – Nov 18

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

cover i2c: muxes: Add GPIO-detected hotplug I2C

Implement driver for hot-plugged I2C busses, where some devices on a bus are hot-pluggable and their presence is indicated by GPIO line. This feature is used by the ASUS Transformers family, by the Microsoft Surface RT/2 and maybe more.

ASUS Transformers expose i2c line via proprietary 40 pin plug and wire that line through optional dock accessory. Devices in the dock are connected to this i2c line and docks presence is detected by a dedicted GPIO.

Michał Mirosław (1):
i2c: muxes: Add GPIO-detected hotplug I2C

Svyatoslav Ryhel (1):
dt-bindings: i2c: Document GPIO detected hot-plugged I2C bus

 .../bindings/i2c/i2c-hotplug-gpio.yaml        |  65 +++++
 drivers/i2c/muxes/Kconfig                     |  11 +
 drivers/i2c/muxes/Makefile                    |   1 +
 drivers/i2c/muxes/i2c-hotplug-gpio.c          | 263 ++++++++++++++++++
 4 files changed, 340 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/i2c/i2c-hotplug-gpio.yaml
 create mode 100644 drivers/i2c/muxes/i2c-hotplug-gpio.c
Signature · 1 line
2.48.1
#1 lore raw

PATCH RESEND 1/2 dt-bindings: i2c: Document GPIO detected hot-plugged I2C bus

Schema describes hardware configuration that uses a GPIO signal to determine the bus's presence and state, allowing the system to dynamically configure I2C devices as they are plugged in or removed.

---
 .../bindings/i2c/i2c-hotplug-gpio.yaml        | 65 +++++++++++++++++++
 1 file changed, 65 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/i2c/i2c-hotplug-gpio.yaml
Documentation/devicetree/bindings/i2c/i2c-hotplug-gpio.yaml new file +65 -0
new file mode 100644
index 000000000000..d1d5d830c91b
@@ -0,0 +1,65 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/i2c/i2c-hotplug-gpio.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: GPIO detected hot-plugged I2C bus
+
+maintainers:
+  - Michał Mirosław <[email protected]>
+  - Svyatoslav Ryhel <[email protected]>
+
+description: An I2C bus, where some devices on the bus are hot-pluggable
+  and their presence is indicated by GPIO line.
+
+properties:
+  compatible:
+    const: i2c-hotplug-gpio
+
+  '#address-cells':
+    const: 1
+
+  '#size-cells':
+    const: 0
+
+  interrupts:
+    maxItems: 1
+
+  detect-gpios:
+    description: usually the same GPIO used as an interrupt. In the active
+      state should indicate that detachable devices are plugged in.
+    maxItems: 1
+
+  i2c-parent:
+    maxItems: 1
+
+required:
+  - compatible
+  - '#address-cells'
+  - '#size-cells'
+  - interrupts
+  - detect-gpios
+  - i2c-parent
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/gpio/gpio.h>
+    #include <dt-bindings/interrupt-controller/irq.h>
+
+    i2c-dock {
+        compatible = "i2c-hotplug-gpio";
+
+        interrupt-parent = <&gpio>;
+        interrupts = <164 IRQ_TYPE_EDGE_BOTH>;
+
+        detect-gpios = <&gpio 164 GPIO_ACTIVE_LOW>;
+
+        i2c-parent = <&gen2_i2c>;
+
+        #address-cells = <1>;
+        #size-cells = <0>;
+    };
+...
Signature · 1 line
2.48.1
#2 lore raw

PATCH RESEND 2/2 i2c: muxes: Add GPIO-detected hotplug I2C

In reply to Svyatoslav Ryhel

From: Michał Mirosław <[email protected]>

Add support for hot-plugged I2C busses, where some devices on the bus are hot-pluggable and their presence is indicated by GPIO line.

This feature is used by the ASUS Transformers, Microsoft Surface RT/2 and maybe more.

---
 drivers/i2c/muxes/Kconfig            |  11 ++
 drivers/i2c/muxes/Makefile           |   1 +
 drivers/i2c/muxes/i2c-hotplug-gpio.c | 263 +++++++++++++++++++++++++++
 3 files changed, 275 insertions(+)
 create mode 100644 drivers/i2c/muxes/i2c-hotplug-gpio.c
drivers/i2c/muxes/Kconfig +11 -0
index 6d2f66810cdc..0e410be5ce55 100644
@@ -19,6 +19,17 @@ config I2C_ARB_GPIO_CHALLENGE
 	  This driver can also be built as a module.  If so, the module
 	  will be called i2c-arb-gpio-challenge.
 
+config I2C_HOTPLUG_GPIO
+	tristate "Hot-plugged I2C bus detected by GPIO"
+	depends on GPIOLIB
+	depends on OF
+	help
+	  Say Y here if you want support for hot-plugging I2C devices
+	  with presence detected by GPIO pin value.
+
+	  This driver can also be built as a module. If so, the module
+	  will be called i2c-hotplug-gpio.
+
 config I2C_MUX_GPIO
 	tristate "GPIO-based I2C multiplexer"
 	depends on GPIOLIB
drivers/i2c/muxes/Makefile +1 -0
index 4b24f49515a7..36df41c8cf05 100644
@@ -6,6 +6,7 @@ obj-$(CONFIG_I2C_ARB_GPIO_CHALLENGE)	+= i2c-arb-gpio-challenge.o
 
 obj-$(CONFIG_I2C_DEMUX_PINCTRL)		+= i2c-demux-pinctrl.o
 
+obj-$(CONFIG_I2C_HOTPLUG_GPIO)	+= i2c-hotplug-gpio.o
 obj-$(CONFIG_I2C_MUX_GPIO)	+= i2c-mux-gpio.o
 obj-$(CONFIG_I2C_MUX_GPMUX)	+= i2c-mux-gpmux.o
 obj-$(CONFIG_I2C_MUX_LTC4306)	+= i2c-mux-ltc4306.o
drivers/i2c/muxes/i2c-hotplug-gpio.c new file +263 -0

263 lines not on this page · raw message

Signature · 1 line
2.48.1
maintainer
#3 lore raw
In reply to Svyatoslav Ryhel

Hi,

Quoted 9 lines · Svyatoslav Ryhel

Implement driver for hot-plugged I2C busses, where some devices on a bus are hot-pluggable and their presence is indicated by GPIO line. This feature is used by the ASUS Transformers family, by the Microsoft Surface RT/2 and maybe more.

ASUS Transformers expose i2c line via proprietary 40 pin plug and wire that line through optional dock accessory. Devices in the dock are connected to this i2c line and docks presence is detected by a dedicted GPIO.

This is a resend of the previous series. I want to understand whether this effort can align with what Herve and Luca are working on. I have not looked into the implementation details yet, but I want to avoid overlapping or conflicting patches.

Thanks,
Andi

#4 lore raw

чт, 16 жовт. 2025 р. о 01:50 Andi Shyti <[email protected]> пише:

Quoted 9 lines

Hi,

Quoted 5 lines · Svyatoslav Ryhel

Implement driver for hot-plugged I2C busses, where some devices on a bus are hot-pluggable and their presence is indicated by GPIO line. This feature is used by the ASUS Transformers family, by the Microsoft Surface RT/2 and maybe more.

Quoted 6 lines
Quoted 4 lines

ASUS Transformers expose i2c line via proprietary 40 pin plug and wire that line through optional dock accessory. Devices in the dock are connected to this i2c line and docks presence is detected by a dedicted GPIO.

This is a resend of the previous series.

Yes

Quoted 4 lines

I want to understand
whether this effort can align with what Herve and Luca are working on. I have not looked into the implementation details yet, but I want to avoid overlapping or conflicting patches.

Herve and Luca did not come up with anything meaningful, they provided just a few rough ideas. It will take an inconsiderate amount of time before there will be any consensus between them and schema maintainers, and even more time would be requited to settle this into schemas and implement into drivers. Why should I suffer from this? Why should changes I need be halted due to some incomplete 'ideas'? This driver uses existing i2c mux framework and fits into it just fine.

Quoted 2 lines

Thanks,
Andi

#5 lore raw

Hi Svyatoslav,

Quoted 2 lines

Herve and Luca did not come up with anything meaningful, they provided just a few rough ideas. It will take an inconsiderate amount of time

Well, IIRC they said that your use case can be mapped onto their approach. Which is meaningful in my book.

Quoted 5 lines

before there will be any consensus between them and schema maintainers, and even more time would be requited to settle this into schemas and implement into drivers. Why should I suffer from this? Why should changes I need be halted due to some incomplete 'ideas'? This driver uses existing i2c mux framework and fits into it just fine.

I am sorry to bring you bad news, but you need to suffer because this is how development goes. If I get presented a generic solution (see Herve's mail) and a specific solution (your driver), for this case I as a maintainer will prefer the generic solution. Generic solutions need more time because there are more things to handle, of course. This is typical for development, I would say, it is not Linux or Free Software specific.

I appreciate that you tackled your issue and were open to share it with the community. I see the work being done there. However, there are so many things going on independently that I can't really prevent double development from happening despite it having a high priority for me. As soon as I get aware of people working on similar issues, I connect them. That's what I did here as well.

So, if you want upstream supported I2C hot-plugging, you need to wait for Luca's and Herve's work being accepted. Or provide a superior solution. Or, if you want, join the ride. You already have experience in this field (and hardware plus use case), you would be a very welcome contributor, I would say.

All the best,

Wolfram

maintainer
#6 lore raw

Hi Svyatoslav,

Quoted 26 lines · Wolfram Sang
Quoted 2 lines

Herve and Luca did not come up with anything meaningful, they provided just a few rough ideas. It will take an inconsiderate amount of time

Well, IIRC they said that your use case can be mapped onto their approach. Which is meaningful in my book.

Quoted 5 lines

before there will be any consensus between them and schema maintainers, and even more time would be requited to settle this into schemas and implement into drivers. Why should I suffer from this? Why should changes I need be halted due to some incomplete 'ideas'? This driver uses existing i2c mux framework and fits into it just fine.

I am sorry to bring you bad news, but you need to suffer because this is how development goes. If I get presented a generic solution (see Herve's mail) and a specific solution (your driver), for this case I as a maintainer will prefer the generic solution. Generic solutions need more time because there are more things to handle, of course. This is typical for development, I would say, it is not Linux or Free Software specific.

I appreciate that you tackled your issue and were open to share it with the community. I see the work being done there. However, there are so many things going on independently that I can't really prevent double development from happening despite it having a high priority for me. As soon as I get aware of people working on similar issues, I connect them. That's what I did here as well.

Quoted 5 lines

So, if you want upstream supported I2C hot-plugging, you need to wait for Luca's and Herve's work being accepted. Or provide a superior solution. Or, if you want, join the ride. You already have experience in this field (and hardware plus use case), you would be a very welcome contributor, I would say.

I agree with all what is said above. I just want to add that Herve has provided links to all his work and what I would do is to rebase all my work on top of theirs; make sure their work together with yours work in your system and, perhaps, merge the series.

Please, let me know if this works.

Andi

maintainer
#7 lore raw
In reply to Wolfram Sang
Quoted 28 lines · Wolfram Sang

Hi Svyatoslav,

Quoted 2 lines

Herve and Luca did not come up with anything meaningful, they provided just a few rough ideas. It will take an inconsiderate amount of time

Well, IIRC they said that your use case can be mapped onto their approach. Which is meaningful in my book.

Quoted 5 lines

before there will be any consensus between them and schema maintainers, and even more time would be requited to settle this into schemas and implement into drivers. Why should I suffer from this? Why should changes I need be halted due to some incomplete 'ideas'? This driver uses existing i2c mux framework and fits into it just fine.

I am sorry to bring you bad news, but you need to suffer because this is how development goes. If I get presented a generic solution (see Herve's mail) and a specific solution (your driver), for this case I as a maintainer will prefer the generic solution. Generic solutions need more time because there are more things to handle, of course. This is typical for development, I would say, it is not Linux or Free Software specific.

I appreciate that you tackled your issue and were open to share it with the community. I see the work being done there. However, there are so many things going on independently that I can't really prevent double development from happening despite it having a high priority for me. As soon as I get aware of people working on similar issues, I connect them. That's what I did here as well.

Quoted 5 lines

So, if you want upstream supported I2C hot-plugging, you need to wait for Luca's and Herve's work being accepted. Or provide a superior solution. Or, if you want, join the ride. You already have experience in this field (and hardware plus use case), you would be a very welcome contributor, I would say.

Agreed.

What really slows things down is when there is only 1 user of a new binding. Too many times have I accepted one only for the 2nd user to show up right after accepting it and wanting something different. So now I just require more than 1 user and it is on the submitter(s) to do that. After all, it is their itch, not mine.

Rob

#8 lore raw

вт, 21 жовт. 2025 р. о 16:25 Rob Herring <[email protected]> пише:

Quoted 38 lines · Wolfram Sang
Quoted 28 lines

Hi Svyatoslav,

Quoted 2 lines

Herve and Luca did not come up with anything meaningful, they provided just a few rough ideas. It will take an inconsiderate amount of time

Well, IIRC they said that your use case can be mapped onto their approach. Which is meaningful in my book.

Quoted 5 lines

before there will be any consensus between them and schema maintainers, and even more time would be requited to settle this into schemas and implement into drivers. Why should I suffer from this? Why should changes I need be halted due to some incomplete 'ideas'? This driver uses existing i2c mux framework and fits into it just fine.

I am sorry to bring you bad news, but you need to suffer because this is how development goes. If I get presented a generic solution (see Herve's mail) and a specific solution (your driver), for this case I as a maintainer will prefer the generic solution. Generic solutions need more time because there are more things to handle, of course. This is typical for development, I would say, it is not Linux or Free Software specific.

I appreciate that you tackled your issue and were open to share it with the community. I see the work being done there. However, there are so many things going on independently that I can't really prevent double development from happening despite it having a high priority for me. As soon as I get aware of people working on similar issues, I connect them. That's what I did here as well.

Quoted 5 lines

So, if you want upstream supported I2C hot-plugging, you need to wait for Luca's and Herve's work being accepted. Or provide a superior solution. Or, if you want, join the ride. You already have experience in this field (and hardware plus use case), you would be a very welcome contributor, I would say.

Agreed.

Quoted 7 lines

What really slows things down is when there is only 1 user of a new binding. Too many times have I accepted one only for the 2nd user to show up right after accepting it and wanting something different. So now I just require more than 1 user and it is on the submitter(s) to do that. After all, it is their itch, not mine.

Rob

Hello there!

Were there any advancements with i2c-bus-extension so that I could finally configure and make my tablet work? Could anyone point me in the right direction? Thanks.

#9 lore raw

Hi Svyatoslav,

Quoted 45 lines · On Sat, 17 Oct 2026 20:17:39 +0300 Svyatoslav Ryhel <[email protected]> wrote:

вт, 21 жовт. 2025 р. о 16:25 Rob Herring <[email protected]> пише:

Quoted 44 lines · Wolfram Sang
Quoted 28 lines

Hi Svyatoslav,

Quoted 2 lines

Herve and Luca did not come up with anything meaningful, they provided just a few rough ideas. It will take an inconsiderate amount of time

Well, IIRC they said that your use case can be mapped onto their approach. Which is meaningful in my book.

Quoted 5 lines

before there will be any consensus between them and schema maintainers, and even more time would be requited to settle this into schemas and implement into drivers. Why should I suffer from this? Why should changes I need be halted due to some incomplete 'ideas'? This driver uses existing i2c mux framework and fits into it just fine.

I am sorry to bring you bad news, but you need to suffer because this is how development goes. If I get presented a generic solution (see Herve's mail) and a specific solution (your driver), for this case I as a maintainer will prefer the generic solution. Generic solutions need more time because there are more things to handle, of course. This is typical for development, I would say, it is not Linux or Free Software specific.

I appreciate that you tackled your issue and were open to share it with the community. I see the work being done there. However, there are so many things going on independently that I can't really prevent double development from happening despite it having a high priority for me. As soon as I get aware of people working on similar issues, I connect them. That's what I did here as well.

Quoted 5 lines

So, if you want upstream supported I2C hot-plugging, you need to wait for Luca's and Herve's work being accepted. Or provide a superior solution. Or, if you want, join the ride. You already have experience in this field (and hardware plus use case), you would be a very welcome contributor, I would say.

Agreed.

What really slows things down is when there is only 1 user of a new binding. Too many times have I accepted one only for the 2nd user to show up right after accepting it and wanting something different. So now I just require more than 1 user and it is on the submitter(s) to do that. After all, it is their itch, not mine.

Quoted 7 lines
Quoted 1 line

Rob

Hello there!

Were there any advancements with i2c-bus-extension so that I could finally configure and make my tablet work? Could anyone point me in the right direction? Thanks.

No new advancements. I moved on a prerequisite: Having support for addon format in dtb in order to have support for a list of exported symbols resolution when an dtb is applied on a live devicetree.

Anyway, the v3 series [1] need to be updated and a new iteration need to be sent. Also, same operations need to be done on the SPI version [2].

[1] https://lore.kernel.org/all/[email protected]/
[2] https://lore.kernel.org/all/[email protected]/

Best regards,
Hervé

#10 lore raw

ср, 18 лист. 2026 р. о 10:13 Herve Codina <[email protected]> пише:

Quoted 63 lines

Hi Svyatoslav,

Quoted 45 lines · On Sat, 17 Oct 2026 20:17:39 +0300 Svyatoslav Ryhel <[email protected]> wrote:

вт, 21 жовт. 2025 р. о 16:25 Rob Herring <[email protected]> пише:

Quoted 44 lines · Wolfram Sang
Quoted 28 lines

Hi Svyatoslav,

Quoted 2 lines

Herve and Luca did not come up with anything meaningful, they provided just a few rough ideas. It will take an inconsiderate amount of time

Well, IIRC they said that your use case can be mapped onto their approach. Which is meaningful in my book.

Quoted 5 lines

before there will be any consensus between them and schema maintainers, and even more time would be requited to settle this into schemas and implement into drivers. Why should I suffer from this? Why should changes I need be halted due to some incomplete 'ideas'? This driver uses existing i2c mux framework and fits into it just fine.

I am sorry to bring you bad news, but you need to suffer because this is how development goes. If I get presented a generic solution (see Herve's mail) and a specific solution (your driver), for this case I as a maintainer will prefer the generic solution. Generic solutions need more time because there are more things to handle, of course. This is typical for development, I would say, it is not Linux or Free Software specific.

I appreciate that you tackled your issue and were open to share it with the community. I see the work being done there. However, there are so many things going on independently that I can't really prevent double development from happening despite it having a high priority for me. As soon as I get aware of people working on similar issues, I connect them. That's what I did here as well.

Quoted 5 lines

So, if you want upstream supported I2C hot-plugging, you need to wait for Luca's and Herve's work being accepted. Or provide a superior solution. Or, if you want, join the ride. You already have experience in this field (and hardware plus use case), you would be a very welcome contributor, I would say.

Agreed.

What really slows things down is when there is only 1 user of a new binding. Too many times have I accepted one only for the 2nd user to show up right after accepting it and wanting something different. So now I just require more than 1 user and it is on the submitter(s) to do that. After all, it is their itch, not mine.

Quoted 7 lines
Quoted 1 line

Rob

Hello there!

Were there any advancements with i2c-bus-extension so that I could finally configure and make my tablet work? Could anyone point me in the right direction? Thanks.

No new advancements. I moved on a prerequisite: Having support for addon format in dtb in order to have support for a list of exported symbols resolution when an dtb is applied on a live devicetree.

Quoted 8 lines

Anyway, the v3 series [1] need to be updated and a new iteration need to be sent. Also, same operations need to be done on the SPI version [2].

[1] https://lore.kernel.org/all/[email protected]/
[2] https://lore.kernel.org/all/[email protected]/

Best regards,
Hervé

Thank you, Hervé!

Rob, Wolfram, since the DT Addon framework is not mature yet, may i2c-hotplug-gpio be accepted in some form? Maybe a staging driver or with notes that ABI may be changed and are unstable or maybe as a device specific driver only for transformers like "asus-transformer-dock" etc?

Best regards,
Svyatoslav R.

#11 lore raw

Hi Svyatoslav, and Hervé, and all,

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 5 lines

So, if you want upstream supported I2C hot-plugging, you need to wait for Luca's and Herve's work being accepted. Or provide a superior solution. Or, if you want, join the ride. You already have experience in this field (and hardware plus use case), you would be a very welcome contributor, I would say.

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines

Agreed.

What really slows things down is when there is only 1 user of a new binding. Too many times have I accepted one only for the 2nd user to show up right after accepting it and wanting something different. So now I just require more than 1 user and it is on the submitter(s) to do that. After all, it is their itch, not mine.

For completeness, let me emphasize the above paragraphs again.

Quoted 3 lines
Quoted 3 lines

No new advancements. I moved on a prerequisite: Having support for addon format in dtb in order to have support for a list of exported symbols resolution when an dtb is applied on a live devicetree.

Well, I would consider advancements in prerequisites also advancements.

Quoted 2 lines
Quoted 2 lines

Anyway, the v3 series [1] need to be updated and a new iteration need to be sent. Also, same operations need to be done on the SPI version [2].

Hervé, is that the next planned step or are there prerequisites needed still?

Quoted 2 lines

Rob, Wolfram, since the DT Addon framework is not mature yet, may i2c-hotplug-gpio be accepted in some form? Maybe a staging driver or

I vote against it. Accepting intermediate solutions will slow down the proper solution even more.

Quoted 3 lines

with notes that ABI may be changed and are unstable or maybe as a device specific driver only for transformers like "asus-transformer-dock" etc?

Which kernel are you using? Can't you use your driver downstream instead of upstream unless Herve's work is usable?

Happy hacking,

Wolfram

#12 lore raw

ср, 18 лист. 2026 р. о 13:35 Wolfram Sang
<[email protected]> пише:

Quoted 37 lines

Hi Svyatoslav, and Hervé, and all,

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 5 lines

So, if you want upstream supported I2C hot-plugging, you need to wait for Luca's and Herve's work being accepted. Or provide a superior solution. Or, if you want, join the ride. You already have experience in this field (and hardware plus use case), you would be a very welcome contributor, I would say.

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines

Agreed.

What really slows things down is when there is only 1 user of a new binding. Too many times have I accepted one only for the 2nd user to show up right after accepting it and wanting something different. So now I just require more than 1 user and it is on the submitter(s) to do that. After all, it is their itch, not mine.

For completeness, let me emphasize the above paragraphs again.

Quoted 3 lines
Quoted 3 lines

No new advancements. I moved on a prerequisite: Having support for addon format in dtb in order to have support for a list of exported symbols resolution when an dtb is applied on a live devicetree.

Well, I would consider advancements in prerequisites also advancements.

Quoted 2 lines
Quoted 2 lines

Anyway, the v3 series [1] need to be updated and a new iteration need to be sent. Also, same operations need to be done on the SPI version [2].

Hervé, is that the next planned step or are there prerequisites needed still?

Quoted 2 lines

Rob, Wolfram, since the DT Addon framework is not mature yet, may i2c-hotplug-gpio be accepted in some form? Maybe a staging driver or

I vote against it. Accepting intermediate solutions will slow down the proper solution even more.

Quoted 7 lines
Quoted 3 lines

with notes that ABI may be changed and are unstable or maybe as a device specific driver only for transformers like "asus-transformer-dock" etc?

Which kernel are you using? Can't you use your driver downstream instead of upstream unless Herve's work is usable?

You are very "helpful".

Quoted 4 lines

Happy hacking,

Wolfram

#13 lore raw
Quoted 2 lines

You are very "helpful".

Yes, I am. And I am "honest" and "experienced".

#14 lore raw
Quoted 4 lines · Wolfram Sang
Quoted 2 lines

You are very "helpful".

Yes, I am. And I am "honest" and "experienced".

You might try getting Hans de Goede <[email protected]> in the loop. He is way more experienced in getting support for broken / strangely designed HW into the Linux tree. Maybe he has an idea...

#15 lore raw
In reply to Wolfram Sang
Quoted 22 lines · On Wed, 18 Nov 2026 12:35:15 +0100 Wolfram Sang…

Hi Svyatoslav, and Hervé, and all,

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 5 lines

So, if you want upstream supported I2C hot-plugging, you need to wait for Luca's and Herve's work being accepted. Or provide a superior solution. Or, if you want, join the ride. You already have experience in this field (and hardware plus use case), you would be a very welcome contributor, I would say.

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines

Agreed.

What really slows things down is when there is only 1 user of a new binding. Too many times have I accepted one only for the 2nd user to show up right after accepting it and wanting something different. So now I just require more than 1 user and it is on the submitter(s) to do that. After all, it is their itch, not mine.

For completeness, let me emphasize the above paragraphs again.

Quoted 3 lines
Quoted 3 lines

No new advancements. I moved on a prerequisite: Having support for addon format in dtb in order to have support for a list of exported symbols resolution when an dtb is applied on a live devicetree.

Quoted 7 lines

Well, I would consider advancements in prerequisites also advancements.

Quoted 2 lines
Quoted 2 lines

Anyway, the v3 series [1] need to be updated and a new iteration need to be sent. Also, same operations need to be done on the SPI version [2].

Hervé, is that the next planned step or are there prerequisites needed still?

I think this is a planned step. Is it the next one, I don't know.

Support for addon dtb format is a huge topic and I need to move forward on this topic before switching back to i2c-bus-extension.

Even if we could avoid the need for i2c-bus-extension for I2C with addons, IHMO decoupling things and having devices that belong on a extension board clearly identified in a devicetree is a good thing to keep, i2c-bus-extension provides this decoupling.

On SPI, no way to do without a spi-bus-extension. Chip selects must be translated between chip select numbers provided by a base board SPI bus, wired to the connector and chip select numbers seen from the extension board (i.e. chip select numbers at connector level).

Having extension bus for both I2C and SPI make sense and keep things consistent between both busses.

Working on extension busses can be done without addon dtb feature. I am just too busy to work on both topics in parallel.

Best regards,
Hervé

Quoted 18 lines
Quoted 3 lines

Rob, Wolfram, since the DT Addon framework is not mature yet, may i2c-hotplug-gpio be accepted in some form? Maybe a staging driver or

I vote against it. Accepting intermediate solutions will slow down the proper solution even more.

Quoted 3 lines

with notes that ABI may be changed and are unstable or maybe as a device specific driver only for transformers like "asus-transformer-dock" etc?

Which kernel are you using? Can't you use your driver downstream instead of upstream unless Herve's work is usable?

Happy hacking,

Wolfram

Signature · 3 lines
Hervé Codina, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#16 lore raw
In reply to Andi Shyti

Hi Andy,

+Cc David Gibson

Quoted 13 lines · On Thu, 16 Oct 2025 00:50:47 +0200 Andi Shyti <[email protected]> wrote:

Hi,

Quoted 9 lines · Svyatoslav Ryhel

Implement driver for hot-plugged I2C busses, where some devices on a bus are hot-pluggable and their presence is indicated by GPIO line. This feature is used by the ASUS Transformers family, by the Microsoft Surface RT/2 and maybe more.

ASUS Transformers expose i2c line via proprietary 40 pin plug and wire that line through optional dock accessory. Devices in the dock are connected to this i2c line and docks presence is detected by a dedicted GPIO.

Quoted 5 lines

This is a resend of the previous series. I want to understand whether this effort can align with what Herve and Luca are working on. I have not looked into the implementation details yet, but I want to avoid overlapping or conflicting patches.

Here, in this series, a fake i2c mux is proposed to handle this case.

This can work if only i2c devices are added by the dock on the 40 pin plug. If this 40 pin connector provide other resources or busses usable by the dock, the fake i2c mux will not be enough.

Even if this fake mux is accepted, we will not use it.

Indeed, in our case more resources are provided at the connector and are used by the addon. We have:
- Some gpios used as reset and interrupts on the addon
- One PWM
- Two I2C busses
Described and handled at connector level I2C extension busses.
- ...

With that, different addon can be connected. We detect connection with GPIOs and identify the addon connected thanks to an I2C EEPROM available on the addon.

On our side, we handle this case using:
- A connector driver
This driver handle the connector. Its purpose is:
- Detect insertion an removal of the addon
- Identify the addon
- Load a DT overlay that describes the addon

- A DT overlay describing the addon
This DT overlay has to be board agnostic. I mean from the addon point of view, only the connector is known. The addon DT describes devices connected at the I2C bus available at the connector but it shouldn't have to know if this I2C bus is i2c3 or i2c4 in the base board.

To do that we introduced a first draft of i2c bus extension implementation [1] and its binding [2].

Also we introduce export symbols. This is the main blocking point.

Having the export symbols feature working with device-tree overlay has been a no go from device-tree maintainers Rob Herring and David Gibson (dtc maintainer) and we need the export symbols feature to have the addon described.

Luca did a really clear presentation at ELCE related to our issue and explained the purpose of i2c bus extension and export symbols feature. His slides [3] and the video of the talk [4] are available.

Discussion is ongoing related to the export symbols feature [5] and depending on the conclusion of the discussion, the binding and the implementation of i2c bus extension could change. This is the reason why I didn't send a new iteration of the I2C bus extension binding and its related implementation.

IHMO, export symbols feature is the key to unlock the situation and move forward.

That's said, if you want a more up to date i2c bus extension binding and implementation, I can send a new iterations but you have to be prepare for changes in the future. Again, depending of the conclusion of export symbols feature discussion, the current proposal for i2c bus extension binding and implementation could be obsolete.

Feel free to ask for more details if needed.

Best regards,
Hervé

[1] https://lore.kernel.org/all/[email protected]/
[2] https://lore.kernel.org/all/[email protected]/
[3] https://bootlin.com/pub/conferences/2025/elce/ceresoli-hotplug-status.pdf
[4] https://www.youtube.com/watch?v=C8dEQ4OzMnc
[5] https://lore.kernel.org/all/20250902105710.00512c6d@booty/