Skip to contentSkip to conversation

mfd: Add support for Asus Transformer embedded controller

PATCH Superseded Svyatoslav Ryhel 4 participants 24 messages Feb 14 – Feb 17

Subsystems (6)

v3 of 13 Superseded Latest is v13 →

lore
Share & tools
lore
#0 lore raw

v3 cover mfd: Add support for Asus Transformer embedded controller

Add support for embedded controller used in Asus Transformers for managing power and input functions.

---
Changes in v2:
- converted sysfs debug exports into debugfs
- added kernel-doc comments for exposed functions
- fixed minor typos and inconsistencies

Changes in v3:
- dropped DockRAM commits (both schema and driver)
- integrated DockRAM functionality directly into the controller driver
- EC schema moved to embedded controllers folder
- removed all cell descriptions from the schema
- removed all compatibles from the cell drivers
- adjusted naming conventions to better align with the ASUS Transformers
- defined EC variant sets to provide coverage for all known devices
---

Michał Mirosław (6):
mfd: Add driver for ASUS Transformer embedded controller
input: serio: Add driver for ASUS Transformer dock keyboard and
touchpad
input: keyboard: Add driver for ASUS Transformer dock multimedia keys
leds: Add driver for ASUS Transformer LEDs
power: supply: Add driver for ASUS Transformer battery
power: supply: Add charger driver for Asus Transformers

Svyatoslav Ryhel (1):
dt-bindings: embedded-controller: document ASUS Transformer EC

 .../asus,transformer-ec.yaml                  |  98 +++
 drivers/input/keyboard/Kconfig                |  10 +
 drivers/input/keyboard/Makefile               |   1 +
 .../input/keyboard/asus-transformer-ec-keys.c | 272 +++++++
 drivers/input/serio/Kconfig                   |  15 +
 drivers/input/serio/Makefile                  |   1 +
 drivers/input/serio/asus-transformer-ec-kbc.c | 147 ++++
 drivers/leds/Kconfig                          |  11 +
 drivers/leds/Makefile                         |   1 +
 drivers/leds/leds-asus-transformer-ec.c       |  79 ++
 drivers/mfd/Kconfig                           |  14 +
 drivers/mfd/Makefile                          |   1 +
 drivers/mfd/asus-transformer-ec.c             | 763 ++++++++++++++++++
 drivers/power/supply/Kconfig                  |  22 +
 drivers/power/supply/Makefile                 |   2 +
 .../supply/asus-transformer-ec-battery.c      | 272 +++++++
 .../supply/asus-transformer-ec-charger.c      | 193 +++++
 include/linux/mfd/asus-transformer-ec.h       | 162 ++++
 18 files changed, 2064 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/embedded-controller/asus,transformer-ec.yaml
 create mode 100644 drivers/input/keyboard/asus-transformer-ec-keys.c
 create mode 100644 drivers/input/serio/asus-transformer-ec-kbc.c
 create mode 100644 drivers/leds/leds-asus-transformer-ec.c
 create mode 100644 drivers/mfd/asus-transformer-ec.c
 create mode 100644 drivers/power/supply/asus-transformer-ec-battery.c
 create mode 100644 drivers/power/supply/asus-transformer-ec-charger.c
 create mode 100644 include/linux/mfd/asus-transformer-ec.h
Signature · 1 line
2.51.0
#1 lore raw

PATCH v3 1/7 dt-bindings: embedded-controller: document ASUS Transformer EC

Document embedded controller used in ASUS Transformer device series.

---
 .../asus,transformer-ec.yaml                  | 98 +++++++++++++++++++
 1 file changed, 98 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/embedded-controller/asus,transformer-ec.yaml
Documentation/devicetree/bindings/embedded-controller/asus,transformer-ec.yaml new file +98 -0
new file mode 100644
index 000000000000..670c4c2d339d
@@ -0,0 +1,98 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/embedded-controller/asus,transformer-ec.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: ASUS Transformer's Embedded Controller
+
+description:
+  Several Nuvoton based Embedded Controllers attached to an I2C bus,
+  running a custom ASUS firmware, specific to the ASUS Transformer
+  device series.
+
+maintainers:
+  - Svyatoslav Ryhel <[email protected]>
+
+allOf:
+  - $ref: /schemas/power/supply/power-supply.yaml
+
+properties:
+  compatible:
+    oneOf:
+      - enum:
+          - asus,p1801-t-ec-pad
+          - asus,sl101-ec-dock
+          - asus,tf600t-ec-pad
+          - asus,tf701t-ec-pad
+
+      - items:
+          - enum:
+              - asus,tf101-ec-dock
+              - asus,tf101g-ec-dock
+              - asus,tf201-ec-dock
+              - asus,tf300t-ec-dock
+              - asus,tf300tg-ec-dock
+              - asus,tf300tl-ec-dock
+              - asus,tf700t-ec-dock
+          - const: asus,transformer-ec-dock
+
+      - items:
+          - enum:
+              - asus,tf201-ec-pad
+              - asus,tf300t-ec-pad
+              - asus,tf300tg-ec-pad
+              - asus,tf300tl-ec-pad
+              - asus,tf700t-ec-pad
+          - const: asus,transformer-ec-pad
+
+  reg:
+    description:
+      The ASUS Transformer EC has a main I2C address and an associated
+      DockRAM device, which provides power-related functions for the
+      embedded controller. Both addresses are required for operation.
+    minItems: 2
+
+  reg-names:
+    items:
+      - const: ec
+      - const: dockram
+
+  interrupts:
+    maxItems: 1
+
+  request-gpios:
+    maxItems: 1
+
+required:
+  - compatible
+  - reg
+  - reg-names
+  - interrupts
+  - request-gpios
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/gpio/gpio.h>
+    #include <dt-bindings/interrupt-controller/irq.h>
+
+    i2c {
+      #address-cells = <1>;
+      #size-cells = <0>;
+
+      embedded-controller@19 {
+        compatible = "asus,tf201-ec-dock", "asus,transformer-ec-dock";
+        reg = <0x19>, <0x1b>;
+        reg-names = "ec", "dockram";
+
+        interrupt-parent = <&gpio>;
+        interrupts = <151 IRQ_TYPE_LEVEL_LOW>;
+
+        request-gpios = <&gpio 134 GPIO_ACTIVE_LOW>;
+
+        monitored-battery = <&dock_battery>;
+      };
+    };
+...
Signature · 1 line
2.51.0
#2 lore raw

Re: [PATCH v3 1/7] dt-bindings: embedded-controller: document ASUS Transformer EC

Quoted 51 lines · Svyatoslav Ryhel

Document embedded controller used in ASUS Transformer device series.

---
 .../asus,transformer-ec.yaml                  | 98 +++++++++++++++++++
 1 file changed, 98 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/embedded-controller/asus,transformer-ec.yaml
Documentation/devicetree/bindings/embedded-controller/asus,transformer-ec.yaml new file +37 -0
new file mode 100644
index 000000000000..670c4c2d339d
@@ -0,0 +1,98 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/embedded-controller/asus,transformer-ec.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: ASUS Transformer's Embedded Controller
+
+description:
+  Several Nuvoton based Embedded Controllers attached to an I2C bus,
+  running a custom ASUS firmware, specific to the ASUS Transformer
+  device series.
+
+maintainers:
+  - Svyatoslav Ryhel <[email protected]>
+
+allOf:
+  - $ref: /schemas/power/supply/power-supply.yaml
+
+properties:
+  compatible:
+    oneOf:
+      - enum:
+          - asus,p1801-t-ec-pad
+          - asus,sl101-ec-dock
+          - asus,tf600t-ec-pad
+          - asus,tf701t-ec-pad
+
+      - items:
+          - enum:
+              - asus,tf101-ec-dock
+              - asus,tf101g-ec-dock
+              - asus,tf201-ec-dock
+              - asus,tf300t-ec-dock
+              - asus,tf300tg-ec-dock
+              - asus,tf300tl-ec-dock
+              - asus,tf700t-ec-dock

Documentation/devicetree/bindings/embedded-controller/asus,transformer-ec.yaml line 47

Quoted 10 lines
Documentation/devicetree/bindings/embedded-controller/asus,transformer-ec.yaml new file +10 -0
+          - const: asus,transformer-ec-dock
+
+      - items:
+          - enum:
+              - asus,tf201-ec-pad
+              - asus,tf300t-ec-pad
+              - asus,tf300tg-ec-pad
+              - asus,tf300tl-ec-pad
+              - asus,tf700t-ec-pad
+          - const: asus,transformer-ec-pad

Can you explain somewhere here what the "dock" and "pad" devices are and how they differ? For example, I am currently wondering why tf700t has both "dock" and "pad".
Also, why are some of the compatibles permitted standalone? That should be mentioned in your commit message too. Also, other than the sl101, the standalone ones seem to have the same match data in the mfd driver. Why are fallbacks not made use of there?

Since this transformer series seems to have multiple programming models for "ec-pad" devices, it calls into question your use of the generic fallback compatibles is appropriate and makes it seem like you should be using device compatibles as a fallback.

The rest looks okay other than the filename, which doesn't match any of the compatibles that you've got here.

Cheers,
Conor.

Quoted 54 lines
Documentation/devicetree/bindings/embedded-controller/asus,transformer-ec.yaml new file +51 -0
+
+  reg:
+    description:
+      The ASUS Transformer EC has a main I2C address and an associated
+      DockRAM device, which provides power-related functions for the
+      embedded controller. Both addresses are required for operation.
+    minItems: 2
+
+  reg-names:
+    items:
+      - const: ec
+      - const: dockram
+
+  interrupts:
+    maxItems: 1
+
+  request-gpios:
+    maxItems: 1
+
+required:
+  - compatible
+  - reg
+  - reg-names
+  - interrupts
+  - request-gpios
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/gpio/gpio.h>
+    #include <dt-bindings/interrupt-controller/irq.h>
+
+    i2c {
+      #address-cells = <1>;
+      #size-cells = <0>;
+
+      embedded-controller@19 {
+        compatible = "asus,tf201-ec-dock", "asus,transformer-ec-dock";
+        reg = <0x19>, <0x1b>;
+        reg-names = "ec", "dockram";
+
+        interrupt-parent = <&gpio>;
+        interrupts = <151 IRQ_TYPE_LEVEL_LOW>;
+
+        request-gpios = <&gpio 134 GPIO_ACTIVE_LOW>;
+
+        monitored-battery = <&dock_battery>;
+      };
+    };
+...
Signature · 1 line
2.51.0
#3 lore raw

Re: [PATCH v3 1/7] dt-bindings: embedded-controller: document ASUS Transformer EC

пн, 16 лют. 2026 р. о 20:04 Conor Dooley <[email protected]> пише:

Quoted 59 lines · Svyatoslav Ryhel
Quoted 57 lines

Document embedded controller used in ASUS Transformer device series.

---
 .../asus,transformer-ec.yaml                  | 98 +++++++++++++++++++
 1 file changed, 98 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/embedded-controller/asus,transformer-ec.yaml
Documentation/devicetree/bindings/embedded-controller/asus,transformer-ec.yaml new file +43 -0
new file mode 100644
index 000000000000..670c4c2d339d
@@ -0,0 +1,98 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/embedded-controller/asus,transformer-ec.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: ASUS Transformer's Embedded Controller
+
+description:
+  Several Nuvoton based Embedded Controllers attached to an I2C bus,
+  running a custom ASUS firmware, specific to the ASUS Transformer
+  device series.
+
+maintainers:
+  - Svyatoslav Ryhel <[email protected]>
+
+allOf:
+  - $ref: /schemas/power/supply/power-supply.yaml
+
+properties:
+  compatible:
+    oneOf:
+      - enum:
+          - asus,p1801-t-ec-pad
+          - asus,sl101-ec-dock
+          - asus,tf600t-ec-pad
+          - asus,tf701t-ec-pad
+
+      - items:
+          - enum:
+              - asus,tf101-ec-dock
+              - asus,tf101g-ec-dock
+              - asus,tf201-ec-dock
+              - asus,tf300t-ec-dock
+              - asus,tf300tg-ec-dock
+              - asus,tf300tl-ec-dock
+              - asus,tf700t-ec-dock
+          - const: asus,transformer-ec-dock
+
+      - items:
+          - enum:
+              - asus,tf201-ec-pad
+              - asus,tf300t-ec-pad
Quoted 8 lines

Documentation/devicetree/bindings/embedded-controller/asus,transformer-ec.yaml line 47

Quoted 4 lines
Documentation/devicetree/bindings/embedded-controller/asus,transformer-ec.yaml new file +4 -0
+              - asus,tf300tg-ec-pad
+              - asus,tf300tl-ec-pad
+              - asus,tf700t-ec-pad
+          - const: asus,transformer-ec-pad

Can you explain somewhere here what the "dock" and "pad" devices are and how they differ? For example, I am currently wondering why tf700t has both "dock" and "pad".

"pad" is used for the controller in the tablet itself in the pad "dock" is used for the controller in the mobile dock keyboard. Seems quite obvious.

Quoted 5 lines

Also, why are some of the compatibles permitted standalone? That should be mentioned in your commit message too. Also, other than the sl101, the standalone ones seem to have the same match data in the mfd driver. Why are fallbacks not made use of there?

Because standalone compatibles describe a unique hw configuration which cannot be grouped into something meaningful. asus,p1801-t-ec-pad is for EC of Tegra30/Intel based p1801-t AIO, asus,sl101-ec-dock is for EC of Tegra20 slider tablet, asus,tf600t-ec-pad is for altered EC in Win8 Tegra30 tablet, asus,tf701t-ec-pad is for Tegra114 tablet. Different generations, different form-factors.

Quoted 4 lines

Since this transformer series seems to have multiple programming models for "ec-pad" devices, it calls into question your use of the generic fallback compatibles is appropriate and makes it seem like you should be using device compatibles as a fallback.

That is redundant.

Quoted 4 lines

The rest looks okay other than the filename, which doesn't match any of the compatibles that you've got here.

How should I call it then?

Quoted 57 lines

Cheers,
Conor.

Quoted 54 lines
Documentation/devicetree/bindings/embedded-controller/asus,transformer-ec.yaml new file +51 -1
+
+  reg:
+    description:
+      The ASUS Transformer EC has a main I2C address and an associated
+      DockRAM device, which provides power-related functions for the
+      embedded controller. Both addresses are required for operation.
+    minItems: 2
+
+  reg-names:
+    items:
+      - const: ec
+      - const: dockram
+
+  interrupts:
+    maxItems: 1
+
+  request-gpios:
+    maxItems: 1
+
+required:
+  - compatible
+  - reg
+  - reg-names
+  - interrupts
+  - request-gpios
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/gpio/gpio.h>
+    #include <dt-bindings/interrupt-controller/irq.h>
+
+    i2c {
+      #address-cells = <1>;
+      #size-cells = <0>;
+
+      embedded-controller@19 {
+        compatible = "asus,tf201-ec-dock", "asus,transformer-ec-dock";
+        reg = <0x19>, <0x1b>;
+        reg-names = "ec", "dockram";
+
+        interrupt-parent = <&gpio>;
+        interrupts = <151 IRQ_TYPE_LEVEL_LOW>;
+
+        request-gpios = <&gpio 134 GPIO_ACTIVE_LOW>;
+
+        monitored-battery = <&dock_battery>;
+      };
+    };
+...
--

2.51.0

#4 lore raw

Re: [PATCH v3 1/7] dt-bindings: embedded-controller: document ASUS Transformer EC

Quoted 69 lines · Svyatoslav Ryhel

пн, 16 лют. 2026 р. о 20:04 Conor Dooley <[email protected]> пише:

Quoted 59 lines · Svyatoslav Ryhel
Quoted 57 lines

Document embedded controller used in ASUS Transformer device series.

---
 .../asus,transformer-ec.yaml                  | 98 +++++++++++++++++++
 1 file changed, 98 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/embedded-controller/asus,transformer-ec.yaml
Documentation/devicetree/bindings/embedded-controller/asus,transformer-ec.yaml new file +43 -0
new file mode 100644
index 000000000000..670c4c2d339d
@@ -0,0 +1,98 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/embedded-controller/asus,transformer-ec.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: ASUS Transformer's Embedded Controller
+
+description:
+  Several Nuvoton based Embedded Controllers attached to an I2C bus,
+  running a custom ASUS firmware, specific to the ASUS Transformer
+  device series.
+
+maintainers:
+  - Svyatoslav Ryhel <[email protected]>
+
+allOf:
+  - $ref: /schemas/power/supply/power-supply.yaml
+
+properties:
+  compatible:
+    oneOf:
+      - enum:
+          - asus,p1801-t-ec-pad
+          - asus,sl101-ec-dock
+          - asus,tf600t-ec-pad
+          - asus,tf701t-ec-pad
+
+      - items:
+          - enum:
+              - asus,tf101-ec-dock
+              - asus,tf101g-ec-dock
+              - asus,tf201-ec-dock
+              - asus,tf300t-ec-dock
+              - asus,tf300tg-ec-dock
+              - asus,tf300tl-ec-dock
+              - asus,tf700t-ec-dock
+          - const: asus,transformer-ec-dock
+
+      - items:
+          - enum:
+              - asus,tf201-ec-pad
+              - asus,tf300t-ec-pad
Quoted 8 lines

Documentation/devicetree/bindings/embedded-controller/asus,transformer-ec.yaml line 47

Quoted 4 lines
Documentation/devicetree/bindings/embedded-controller/asus,transformer-ec.yaml new file +4 -0
+              - asus,tf300tg-ec-pad
+              - asus,tf300tl-ec-pad
+              - asus,tf700t-ec-pad
+          - const: asus,transformer-ec-pad

Can you explain somewhere here what the "dock" and "pad" devices are and how they differ? For example, I am currently wondering why tf700t has both "dock" and "pad".

Quoted 3 lines

"pad" is used for the controller in the tablet itself in the pad "dock" is used for the controller in the mobile dock keyboard. Seems quite obvious.

To someone intimately familiar with the devices maybe. Not to the people you have to justify your patches to. Your response implies that this is some sort of thing that's like a surface, but please put an explicit explanation into the binding somewhere as to what each compatible is for.

Quoted 6 lines
Quoted 5 lines

Also, why are some of the compatibles permitted standalone? That should be mentioned in your commit message too. Also, other than the sl101, the standalone ones seem to have the same match data in the mfd driver. Why are fallbacks not made use of there?

Quoted 6 lines

Because standalone compatibles describe a unique hw configuration which cannot be grouped into something meaningful. asus,p1801-t-ec-pad is for EC of Tegra30/Intel based p1801-t AIO, asus,sl101-ec-dock is for EC of Tegra20 slider tablet, asus,tf600t-ec-pad is for altered EC in Win8 Tegra30 tablet, asus,tf701t-ec-pad is for Tegra114 tablet. Different generations, different form-factors.

I don't see any reasons here that eliminate fallback compatibles.
+ { .compatible = "asus,p1801-t-ec-pad", .data = &asus_ec_pad_charger_data },
+ { .compatible = "asus,tf600t-ec-pad", .data = &asus_ec_pad_charger_data },
+ { .compatible = "asus,tf701t-ec-pad", .data = &asus_ec_pad_charger_data },
+ { }
Three of them use the same match data, so you need to explain why you've made these three standalone when all the others that share a programming model got a generic fallback. Fallback usage is based on programming model, not based on whether the devices are a physically different, so your explanation must reflect this.

Quoted 6 lines
Quoted 4 lines

Since this transformer series seems to have multiple programming models for "ec-pad" devices, it calls into question your use of the generic fallback compatibles is appropriate and makes it seem like you should be using device compatibles as a fallback.

That is redundant.

I don't understand how that is a response to what I said.

Quoted 5 lines
Quoted 3 lines

The rest looks okay other than the filename, which doesn't match any of the compatibles that you've got here.

How should I call it then?

Make it match a compatible, just like any other binding.

#5 lore raw

Re: [PATCH v3 1/7] dt-bindings: embedded-controller: document ASUS Transformer EC

пн, 16 лют. 2026 р. о 20:50 Conor Dooley <[email protected]> пише:

Quoted 75 lines · Svyatoslav Ryhel
Quoted 69 lines

пн, 16 лют. 2026 р. о 20:04 Conor Dooley <[email protected]> пише:

Quoted 59 lines · Svyatoslav Ryhel
Quoted 57 lines

Document embedded controller used in ASUS Transformer device series.

---
 .../asus,transformer-ec.yaml                  | 98 +++++++++++++++++++
 1 file changed, 98 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/embedded-controller/asus,transformer-ec.yaml
Documentation/devicetree/bindings/embedded-controller/asus,transformer-ec.yaml new file +43 -0
new file mode 100644
index 000000000000..670c4c2d339d
@@ -0,0 +1,98 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/embedded-controller/asus,transformer-ec.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: ASUS Transformer's Embedded Controller
+
+description:
+  Several Nuvoton based Embedded Controllers attached to an I2C bus,
+  running a custom ASUS firmware, specific to the ASUS Transformer
+  device series.
+
+maintainers:
+  - Svyatoslav Ryhel <[email protected]>
+
+allOf:
+  - $ref: /schemas/power/supply/power-supply.yaml
+
+properties:
+  compatible:
+    oneOf:
+      - enum:
+          - asus,p1801-t-ec-pad
+          - asus,sl101-ec-dock
+          - asus,tf600t-ec-pad
+          - asus,tf701t-ec-pad
+
+      - items:
+          - enum:
+              - asus,tf101-ec-dock
+              - asus,tf101g-ec-dock
+              - asus,tf201-ec-dock
+              - asus,tf300t-ec-dock
+              - asus,tf300tg-ec-dock
+              - asus,tf300tl-ec-dock
+              - asus,tf700t-ec-dock
+          - const: asus,transformer-ec-dock
+
+      - items:
+          - enum:
+              - asus,tf201-ec-pad
+              - asus,tf300t-ec-pad
Quoted 8 lines

Documentation/devicetree/bindings/embedded-controller/asus,transformer-ec.yaml line 47

Quoted 4 lines
Documentation/devicetree/bindings/embedded-controller/asus,transformer-ec.yaml new file +4 -0
+              - asus,tf300tg-ec-pad
+              - asus,tf300tl-ec-pad
+              - asus,tf700t-ec-pad
+          - const: asus,transformer-ec-pad

Can you explain somewhere here what the "dock" and "pad" devices are and how they differ? For example, I am currently wondering why tf700t has both "dock" and "pad".

Quoted 3 lines

"pad" is used for the controller in the tablet itself in the pad "dock" is used for the controller in the mobile dock keyboard. Seems quite obvious.

Quoted 5 lines

To someone intimately familiar with the devices maybe. Not to the people you have to justify your patches to. Your response implies that this is some sort of thing that's like a surface, but please put an explicit explanation into the binding somewhere as to what each compatible is for.

Ok, fair.

Quoted 25 lines
Quoted 7 lines
Quoted 6 lines

Also, why are some of the compatibles permitted standalone? That should be mentioned in your commit message too. Also, other than the sl101, the standalone ones seem to have the same match data in the mfd driver. Why are fallbacks not made use of there?

Quoted 6 lines

Because standalone compatibles describe a unique hw configuration which cannot be grouped into something meaningful. asus,p1801-t-ec-pad is for EC of Tegra30/Intel based p1801-t AIO, asus,sl101-ec-dock is for EC of Tegra20 slider tablet, asus,tf600t-ec-pad is for altered EC in Win8 Tegra30 tablet, asus,tf701t-ec-pad is for Tegra114 tablet. Different generations, different form-factors.

I don't see any reasons here that eliminate fallback compatibles.

(quoted diff) +4 -0
+       { .compatible = "asus,p1801-t-ec-pad", .data = &asus_ec_pad_charger_data },
+       { .compatible = "asus,tf600t-ec-pad", .data = &asus_ec_pad_charger_data },
+       { .compatible = "asus,tf701t-ec-pad", .data = &asus_ec_pad_charger_data },
+       { }

Three of them use the same match data, so you need to explain why you've made these three standalone when all the others that share a programming model got a generic fallback. Fallback usage is based on programming model, not based on whether the devices are a physically different, so your explanation must reflect this.

Quoted 9 lines
Quoted 6 lines
Quoted 4 lines

Since this transformer series seems to have multiple programming models for "ec-pad" devices, it calls into question your use of the generic fallback compatibles is appropriate and makes it seem like you should be using device compatibles as a fallback.

That is redundant.

I don't understand how that is a response to what I said.

in other words you propose this:

properties:
compatible:
oneOf:
- items:
- enum:
- asus,sl101-ec-dock
- asus,tf101-ec-dock
- asus,tf101g-ec-dock
- asus,tf201-ec-dock
- asus,tf300t-ec-dock
- asus,tf300tg-ec-dock
- asus,tf300tl-ec-dock
- asus,tf700t-ec-dock
- const: asus,transformer-ec-dock

- items:
- enum:
- asus,p1801-t-ec-pad
- asus,tf201-ec-pad
- asus,tf300t-ec-pad
- asus,tf300tg-ec-pad
- asus,tf300tl-ec-pad
- asus,tf700t-ec-pad
- asus,tf600t-ec-pad
- asus,tf701t-ec-pad
- const: asus,transformer-ec-pad

And in the driver add match to every single entry of enums?

Quoted 7 lines
Quoted 5 lines
Quoted 3 lines

The rest looks okay other than the filename, which doesn't match any of the compatibles that you've got here.

How should I call it then?

Make it match a compatible, just like any other binding.

#6 lore raw

Re: [PATCH v3 1/7] dt-bindings: embedded-controller: document ASUS Transformer EC

Quoted 131 lines · Svyatoslav Ryhel

пн, 16 лют. 2026 р. о 20:50 Conor Dooley <[email protected]> пише:

Quoted 91 lines · Svyatoslav Ryhel
Quoted 71 lines

пн, 16 лют. 2026 р. о 20:04 Conor Dooley <[email protected]> пише:

Quoted 60 lines · Svyatoslav Ryhel
Quoted 58 lines

Document embedded controller used in ASUS Transformer device series.

---
 .../asus,transformer-ec.yaml                  | 98 +++++++++++++++++++
 1 file changed, 98 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/embedded-controller/asus,transformer-ec.yaml
Documentation/devicetree/bindings/embedded-controller/asus,transformer-ec.yaml new file +44 -0
new file mode 100644
index 000000000000..670c4c2d339d
@@ -0,0 +1,98 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/embedded-controller/asus,transformer-ec.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: ASUS Transformer's Embedded Controller
+
+description:
+  Several Nuvoton based Embedded Controllers attached to an I2C bus,
+  running a custom ASUS firmware, specific to the ASUS Transformer
+  device series.
+
+maintainers:
+  - Svyatoslav Ryhel <[email protected]>
+
+allOf:
+  - $ref: /schemas/power/supply/power-supply.yaml
+
+properties:
+  compatible:
+    oneOf:
+      - enum:
+          - asus,p1801-t-ec-pad
+          - asus,sl101-ec-dock
+          - asus,tf600t-ec-pad
+          - asus,tf701t-ec-pad
+
+      - items:
+          - enum:
+              - asus,tf101-ec-dock
+              - asus,tf101g-ec-dock
+              - asus,tf201-ec-dock
+              - asus,tf300t-ec-dock
+              - asus,tf300tg-ec-dock
+              - asus,tf300tl-ec-dock
+              - asus,tf700t-ec-dock
+          - const: asus,transformer-ec-dock
+
+      - items:
+          - enum:
+              - asus,tf201-ec-pad
+              - asus,tf300t-ec-pad
+              - asus,tf300tg-ec-pad
Quoted 9 lines

Documentation/devicetree/bindings/embedded-controller/asus,transformer-ec.yaml line 47

Quoted 3 lines
Documentation/devicetree/bindings/embedded-controller/asus,transformer-ec.yaml new file +3 -0
+              - asus,tf300tl-ec-pad
+              - asus,tf700t-ec-pad
+          - const: asus,transformer-ec-pad

Also, why are some of the compatibles permitted standalone? That should be mentioned in your commit message too. Also, other than the sl101, the standalone ones seem to have the same match data in the mfd driver. Why are fallbacks not made use of there?

Quoted 6 lines

Because standalone compatibles describe a unique hw configuration which cannot be grouped into something meaningful. asus,p1801-t-ec-pad is for EC of Tegra30/Intel based p1801-t AIO, asus,sl101-ec-dock is for EC of Tegra20 slider tablet, asus,tf600t-ec-pad is for altered EC in Win8 Tegra30 tablet, asus,tf701t-ec-pad is for Tegra114 tablet. Different generations, different form-factors.

I don't see any reasons here that eliminate fallback compatibles.

(quoted diff) +4 -0
+       { .compatible = "asus,p1801-t-ec-pad", .data = &asus_ec_pad_charger_data },
+       { .compatible = "asus,tf600t-ec-pad", .data = &asus_ec_pad_charger_data },
+       { .compatible = "asus,tf701t-ec-pad", .data = &asus_ec_pad_charger_data },
+       { }

Three of them use the same match data, so you need to explain why you've made these three standalone when all the others that share a programming model got a generic fallback. Fallback usage is based on programming model, not based on whether the devices are a physically different, so your explanation must reflect this.

Quoted 9 lines
Quoted 6 lines
Quoted 4 lines

Since this transformer series seems to have multiple programming models for "ec-pad" devices, it calls into question your use of the generic fallback compatibles is appropriate and makes it seem like you should be using device compatibles as a fallback.

That is redundant.

I don't understand how that is a response to what I said.

in other words you propose this:

properties:
compatible:
oneOf:
- items:
- enum:
- asus,sl101-ec-dock
- asus,tf101-ec-dock
- asus,tf101g-ec-dock
- asus,tf201-ec-dock
- asus,tf300t-ec-dock
- asus,tf300tg-ec-dock
- asus,tf300tl-ec-dock
- asus,tf700t-ec-dock
- const: asus,transformer-ec-dock

- items:
- enum:
- asus,p1801-t-ec-pad
- asus,tf201-ec-pad
- asus,tf300t-ec-pad
- asus,tf300tg-ec-pad
- asus,tf300tl-ec-pad
- asus,tf700t-ec-pad
- asus,tf600t-ec-pad
- asus,tf701t-ec-pad
- const: asus,transformer-ec-pad

Quoted 1 line

And in the driver add match to every single entry of enums?

No, I was talking about removing the generic compatibles entirely, since they are not suitably generic to cover all devices at the point of addition. So like:

items:
- enum:
- asus,tf101-ec-dock
- asus,tf101g-ec-dock
- asus,tf201-ec-dock
- asus,tf300t-ec-dock
- asus,tf300tg-ec-dock
- asus,tf300tl-ec-dock
- const: asus,tf700t-ec-dock

and

items:
- enum:
- asus,p1801-t-ec-pad
- asus,tf600t-ec-pad
- const: asus,tf701t-ec-pad

I dunno about these particular devices, but if there's already two programming models for these devices, what's to stop there being more added if/when a new generation of produces arrives?

#7 lore raw

Re: [PATCH v3 1/7] dt-bindings: embedded-controller: document ASUS Transformer EC

17 лютого 2026 р. 13:05:09 GMT+02:00, Conor Dooley <[email protected]> пише:

Quoted 132 lines · Svyatoslav Ryhel
Quoted 131 lines

пн, 16 лют. 2026 р. о 20:50 Conor Dooley <[email protected]> пише:

Quoted 91 lines · Svyatoslav Ryhel
Quoted 71 lines

пн, 16 лют. 2026 р. о 20:04 Conor Dooley <[email protected]> пише:

Quoted 60 lines · Svyatoslav Ryhel
Quoted 58 lines

Document embedded controller used in ASUS Transformer device series.

---
 .../asus,transformer-ec.yaml                  | 98 +++++++++++++++++++
 1 file changed, 98 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/embedded-controller/asus,transformer-ec.yaml
Documentation/devicetree/bindings/embedded-controller/asus,transformer-ec.yaml new file +44 -0
new file mode 100644
index 000000000000..670c4c2d339d
@@ -0,0 +1,98 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/embedded-controller/asus,transformer-ec.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: ASUS Transformer's Embedded Controller
+
+description:
+  Several Nuvoton based Embedded Controllers attached to an I2C bus,
+  running a custom ASUS firmware, specific to the ASUS Transformer
+  device series.
+
+maintainers:
+  - Svyatoslav Ryhel <[email protected]>
+
+allOf:
+  - $ref: /schemas/power/supply/power-supply.yaml
+
+properties:
+  compatible:
+    oneOf:
+      - enum:
+          - asus,p1801-t-ec-pad
+          - asus,sl101-ec-dock
+          - asus,tf600t-ec-pad
+          - asus,tf701t-ec-pad
+
+      - items:
+          - enum:
+              - asus,tf101-ec-dock
+              - asus,tf101g-ec-dock
+              - asus,tf201-ec-dock
+              - asus,tf300t-ec-dock
+              - asus,tf300tg-ec-dock
+              - asus,tf300tl-ec-dock
+              - asus,tf700t-ec-dock
+          - const: asus,transformer-ec-dock
+
+      - items:
+          - enum:
+              - asus,tf201-ec-pad
+              - asus,tf300t-ec-pad
+              - asus,tf300tg-ec-pad
Quoted 9 lines

Documentation/devicetree/bindings/embedded-controller/asus,transformer-ec.yaml line 47

Quoted 3 lines
Documentation/devicetree/bindings/embedded-controller/asus,transformer-ec.yaml new file +3 -0
+              - asus,tf300tl-ec-pad
+              - asus,tf700t-ec-pad
+          - const: asus,transformer-ec-pad

Also, why are some of the compatibles permitted standalone? That should be mentioned in your commit message too. Also, other than the sl101, the standalone ones seem to have the same match data in the mfd driver. Why are fallbacks not made use of there?

Quoted 6 lines

Because standalone compatibles describe a unique hw configuration which cannot be grouped into something meaningful. asus,p1801-t-ec-pad is for EC of Tegra30/Intel based p1801-t AIO, asus,sl101-ec-dock is for EC of Tegra20 slider tablet, asus,tf600t-ec-pad is for altered EC in Win8 Tegra30 tablet, asus,tf701t-ec-pad is for Tegra114 tablet. Different generations, different form-factors.

I don't see any reasons here that eliminate fallback compatibles.

(quoted diff) +4 -0
+       { .compatible = "asus,p1801-t-ec-pad", .data = &asus_ec_pad_charger_data },
+       { .compatible = "asus,tf600t-ec-pad", .data = &asus_ec_pad_charger_data },
+       { .compatible = "asus,tf701t-ec-pad", .data = &asus_ec_pad_charger_data },
+       { }

Three of them use the same match data, so you need to explain why you've made these three standalone when all the others that share a programming model got a generic fallback. Fallback usage is based on programming model, not based on whether the devices are a physically different, so your explanation must reflect this.

Quoted 9 lines
Quoted 6 lines
Quoted 4 lines

Since this transformer series seems to have multiple programming models for "ec-pad" devices, it calls into question your use of the generic fallback compatibles is appropriate and makes it seem like you should be using device compatibles as a fallback.

That is redundant.

I don't understand how that is a response to what I said.

in other words you propose this:

properties:
compatible:
oneOf:
- items:
- enum:
- asus,sl101-ec-dock
- asus,tf101-ec-dock
- asus,tf101g-ec-dock
- asus,tf201-ec-dock
- asus,tf300t-ec-dock
- asus,tf300tg-ec-dock
- asus,tf300tl-ec-dock
- asus,tf700t-ec-dock
- const: asus,transformer-ec-dock

- items:
- enum:
- asus,p1801-t-ec-pad
- asus,tf201-ec-pad
- asus,tf300t-ec-pad
- asus,tf300tg-ec-pad
- asus,tf300tl-ec-pad
- asus,tf700t-ec-pad
- asus,tf600t-ec-pad
- asus,tf701t-ec-pad
- const: asus,transformer-ec-pad

Quoted 6 lines
Quoted 1 line

And in the driver add match to every single entry of enums?

No, I was talking about removing the generic compatibles entirely, since they are not suitably generic to cover all devices at the point of addition. So like:

Actually, they all can be grouped under asus,transformer-ec fallback if that is needed, both pad and dock EC have the same core functions just different set of cells. And then in the driver each compatible will get a dedicated matching data. Will this work?

properties:
compatible:
- items:
- enum:
- asus,p1801-t-ec-pad
- asus,sl101-ec-dock
- asus,tf101-ec-dock
- asus,tf101g-ec-dock
- asus,tf201-ec-dock
- asus,tf201-ec-pad
- asus,tf300t-ec-dock
- asus,tf300t-ec-pad
- asus,tf300tg-ec-dock
- asus,tf300tg-ec-pad
- asus,tf300tl-ec-dock
- asus,tf300tl-ec-pad
- asus,tf700t-ec-dock
- asus,tf700t-ec-pad
- asus,tf600t-ec-pad
- asus,tf701t-ec-pad
- const: asus,transformer-ec

And them schema name will match the genetic compatible.

Quoted 18 lines

items:
- enum:
- asus,tf101-ec-dock
- asus,tf101g-ec-dock
- asus,tf201-ec-dock
- asus,tf300t-ec-dock
- asus,tf300tg-ec-dock
- asus,tf300tl-ec-dock
- const: asus,tf700t-ec-dock

and

items:
- enum:
- asus,p1801-t-ec-pad
- asus,tf600t-ec-pad
- const: asus,tf701t-ec-pad

Quoted 3 lines

I dunno about these particular devices, but if there's already two programming models for these devices, what's to stop there being more added if/when a new generation of produces arrives?

There will be no new devices with this EC, last one was around 2013.

#8 lore raw

Re: [PATCH v3 1/7] dt-bindings: embedded-controller: document ASUS Transformer EC

Quoted 29 lines · Svyatoslav Ryhel
Quoted 29 lines
Quoted 29 lines

in other words you propose this:

properties:
compatible:
oneOf:
- items:
- enum:
- asus,sl101-ec-dock
- asus,tf101-ec-dock
- asus,tf101g-ec-dock
- asus,tf201-ec-dock
- asus,tf300t-ec-dock
- asus,tf300tg-ec-dock
- asus,tf300tl-ec-dock
- asus,tf700t-ec-dock
- const: asus,transformer-ec-dock

- items:
- enum:
- asus,p1801-t-ec-pad
- asus,tf201-ec-pad
- asus,tf300t-ec-pad
- asus,tf300tg-ec-pad
- asus,tf300tl-ec-pad
- asus,tf700t-ec-pad
- asus,tf600t-ec-pad
- asus,tf701t-ec-pad
- const: asus,transformer-ec-pad

Quoted 8 lines
Quoted 6 lines
Quoted 1 line

And in the driver add match to every single entry of enums?

No, I was talking about removing the generic compatibles entirely, since they are not suitably generic to cover all devices at the point of addition. So like:

Actually, they all can be grouped under asus,transformer-ec fallback if that is needed, both pad and dock EC have the same core functions just different set of cells. And then in the driver each compatible will get a dedicated matching data. Will this work?

Then what does the generic compatible express if it is not used by the SW.

Wrap your emails to mailing list style.

Quoted 23 lines

properties:
compatible:
- items:
- enum:
- asus,p1801-t-ec-pad
- asus,sl101-ec-dock
- asus,tf101-ec-dock
- asus,tf101g-ec-dock
- asus,tf201-ec-dock
- asus,tf201-ec-pad
- asus,tf300t-ec-dock
- asus,tf300t-ec-pad
- asus,tf300tg-ec-dock
- asus,tf300tg-ec-pad
- asus,tf300tl-ec-dock
- asus,tf300tl-ec-pad
- asus,tf700t-ec-dock
- asus,tf700t-ec-pad
- asus,tf600t-ec-pad
- asus,tf701t-ec-pad
- const: asus,transformer-ec

Quoted 1 line

And them schema name will match the genetic compatible.

Then what does the generic compatible express?

Best regards,
Krzysztof

#9 lore raw

Re: [PATCH v3 1/7] dt-bindings: embedded-controller: document ASUS Transformer EC

17 лютого 2026 р. 13:32:26 GMT+02:00, Krzysztof Kozlowski <[email protected]> пише:

Quoted 66 lines · Svyatoslav Ryhel
Quoted 29 lines
Quoted 29 lines
Quoted 29 lines

in other words you propose this:

properties:
compatible:
oneOf:
- items:
- enum:
- asus,sl101-ec-dock
- asus,tf101-ec-dock
- asus,tf101g-ec-dock
- asus,tf201-ec-dock
- asus,tf300t-ec-dock
- asus,tf300tg-ec-dock
- asus,tf300tl-ec-dock
- asus,tf700t-ec-dock
- const: asus,transformer-ec-dock

- items:
- enum:
- asus,p1801-t-ec-pad
- asus,tf201-ec-pad
- asus,tf300t-ec-pad
- asus,tf300tg-ec-pad
- asus,tf300tl-ec-pad
- asus,tf700t-ec-pad
- asus,tf600t-ec-pad
- asus,tf701t-ec-pad
- const: asus,transformer-ec-pad

Quoted 8 lines
Quoted 6 lines
Quoted 1 line

And in the driver add match to every single entry of enums?

No, I was talking about removing the generic compatibles entirely, since they are not suitably generic to cover all devices at the point of addition. So like:

Actually, they all can be grouped under asus,transformer-ec fallback if that is needed, both pad and dock EC have the same core functions just different set of cells. And then in the driver each compatible will get a dedicated matching data. Will this work?

Then what does the generic compatible express if it is not used by the SW.

Wrap your emails to mailing list style.

Quoted 23 lines

properties:
compatible:
- items:
- enum:
- asus,p1801-t-ec-pad
- asus,sl101-ec-dock
- asus,tf101-ec-dock
- asus,tf101g-ec-dock
- asus,tf201-ec-dock
- asus,tf201-ec-pad
- asus,tf300t-ec-dock
- asus,tf300t-ec-pad
- asus,tf300tg-ec-dock
- asus,tf300tg-ec-pad
- asus,tf300tl-ec-dock
- asus,tf300tl-ec-pad
- asus,tf700t-ec-dock
- asus,tf700t-ec-pad
- asus,tf600t-ec-pad
- asus,tf701t-ec-pad
- const: asus,transformer-ec

Quoted 4 lines
Quoted 1 line

And them schema name will match the genetic compatible.

Then what does the generic compatible express?

Then enum it is

Quoted 3 lines

Best regards,
Krzysztof

#10 lore raw

Re: [PATCH v3 1/7] dt-bindings: embedded-controller: document ASUS Transformer EC

Quoted 69 lines · Svyatoslav Ryhel

17 лютого 2026 р. 13:32:26 GMT+02:00, Krzysztof Kozlowski <[email protected]> пише:

Quoted 66 lines · Svyatoslav Ryhel
Quoted 29 lines
Quoted 29 lines
Quoted 29 lines

in other words you propose this:

properties:
compatible:
oneOf:
- items:
- enum:
- asus,sl101-ec-dock
- asus,tf101-ec-dock
- asus,tf101g-ec-dock
- asus,tf201-ec-dock
- asus,tf300t-ec-dock
- asus,tf300tg-ec-dock
- asus,tf300tl-ec-dock
- asus,tf700t-ec-dock
- const: asus,transformer-ec-dock

- items:
- enum:
- asus,p1801-t-ec-pad
- asus,tf201-ec-pad
- asus,tf300t-ec-pad
- asus,tf300tg-ec-pad
- asus,tf300tl-ec-pad
- asus,tf700t-ec-pad
- asus,tf600t-ec-pad
- asus,tf701t-ec-pad
- const: asus,transformer-ec-pad

Quoted 8 lines
Quoted 6 lines
Quoted 1 line

And in the driver add match to every single entry of enums?

No, I was talking about removing the generic compatibles entirely, since they are not suitably generic to cover all devices at the point of addition. So like:

Actually, they all can be grouped under asus,transformer-ec fallback if that is needed, both pad and dock EC have the same core functions just different set of cells. And then in the driver each compatible will get a dedicated matching data. Will this work?

Then what does the generic compatible express if it is not used by the SW.

Wrap your emails to mailing list style.

Quoted 23 lines

properties:
compatible:
- items:
- enum:
- asus,p1801-t-ec-pad
- asus,sl101-ec-dock
- asus,tf101-ec-dock
- asus,tf101g-ec-dock
- asus,tf201-ec-dock
- asus,tf201-ec-pad
- asus,tf300t-ec-dock
- asus,tf300t-ec-pad
- asus,tf300tg-ec-dock
- asus,tf300tg-ec-pad
- asus,tf300tl-ec-dock
- asus,tf300tl-ec-pad
- asus,tf700t-ec-dock
- asus,tf700t-ec-pad
- asus,tf600t-ec-pad
- asus,tf701t-ec-pad
- const: asus,transformer-ec

Quoted 6 lines
Quoted 4 lines
Quoted 1 line

And them schema name will match the genetic compatible.

Then what does the generic compatible express?

Then enum it is

Why would you do that, instead of what I posted earlier in the thread? If you send a flat enum with all devices listed, I'm gonna just be there telling you to consolidate into one device-specific fallback compatible per programming model.

#11 lore raw

Re: [PATCH v3 1/7] dt-bindings: embedded-controller: document ASUS Transformer EC

вт, 17 лют. 2026 р. о 16:03 Conor Dooley <[email protected]> пише:

Quoted 76 lines · Svyatoslav Ryhel
Quoted 74 lines

17 лютого 2026 р. 13:32:26 GMT+02:00, Krzysztof Kozlowski <[email protected]> пише:

Quoted 70 lines · Svyatoslav Ryhel
Quoted 29 lines
Quoted 29 lines
Quoted 29 lines

in other words you propose this:

properties:
compatible:
oneOf:
- items:
- enum:
- asus,sl101-ec-dock
- asus,tf101-ec-dock
- asus,tf101g-ec-dock
- asus,tf201-ec-dock
- asus,tf300t-ec-dock
- asus,tf300tg-ec-dock
- asus,tf300tl-ec-dock
- asus,tf700t-ec-dock
- const: asus,transformer-ec-dock

- items:
- enum:
- asus,p1801-t-ec-pad
- asus,tf201-ec-pad
- asus,tf300t-ec-pad
- asus,tf300tg-ec-pad
- asus,tf300tl-ec-pad
- asus,tf700t-ec-pad
- asus,tf600t-ec-pad
- asus,tf701t-ec-pad
- const: asus,transformer-ec-pad

Quoted 8 lines
Quoted 6 lines
Quoted 1 line

And in the driver add match to every single entry of enums?

No, I was talking about removing the generic compatibles entirely, since they are not suitably generic to cover all devices at the point of addition. So like:

Actually, they all can be grouped under asus,transformer-ec fallback if that is needed, both pad and dock EC have the same core functions just different set of cells. And then in the driver each compatible will get a dedicated matching data. Will this work?

Then what does the generic compatible express if it is not used by the SW.

Wrap your emails to mailing list style.

Quoted 23 lines

properties:
compatible:
- items:
- enum:
- asus,p1801-t-ec-pad
- asus,sl101-ec-dock
- asus,tf101-ec-dock
- asus,tf101g-ec-dock
- asus,tf201-ec-dock
- asus,tf201-ec-pad
- asus,tf300t-ec-dock
- asus,tf300t-ec-pad
- asus,tf300tg-ec-dock
- asus,tf300tg-ec-pad
- asus,tf300tl-ec-dock
- asus,tf300tl-ec-pad
- asus,tf700t-ec-dock
- asus,tf700t-ec-pad
- asus,tf600t-ec-pad
- asus,tf701t-ec-pad
- const: asus,transformer-ec

Quoted 1 line

And them schema name will match the genetic compatible.

Then what does the generic compatible express?

Quoted 7 lines
Quoted 1 line

Then enum it is

Why would you do that, instead of what I posted earlier in the thread? If you send a flat enum with all devices listed, I'm gonna just be there telling you to consolidate into one device-specific fallback compatible per programming model.

There is no one device-specific fallback compatible! Schema describes HARDWARE not drivers no? I will not use random device compatible from the list as a fallback compatible for a different random unrelated device, that is plain wrong. Discuss this with Krzysztof and come up with something meaningful please.

#12 lore raw

Re: [PATCH v3 1/7] dt-bindings: embedded-controller: document ASUS Transformer EC

Quoted 30 lines · Svyatoslav Ryhel
Quoted 30 lines
Quoted 28 lines
Quoted 22 lines
Quoted 22 lines

properties:
compatible:
- items:
- enum:
- asus,p1801-t-ec-pad
- asus,sl101-ec-dock
- asus,tf101-ec-dock
- asus,tf101g-ec-dock
- asus,tf201-ec-dock
- asus,tf201-ec-pad
- asus,tf300t-ec-dock
- asus,tf300t-ec-pad
- asus,tf300tg-ec-dock
- asus,tf300tg-ec-pad
- asus,tf300tl-ec-dock
- asus,tf300tl-ec-pad
- asus,tf700t-ec-dock
- asus,tf700t-ec-pad
- asus,tf600t-ec-pad
- asus,tf701t-ec-pad
- const: asus,transformer-ec

Quoted 4 lines
Quoted 1 line

And them schema name will match the genetic compatible.

Then what does the generic compatible express?

Then enum it is

Quoted 7 lines
Quoted 4 lines

Why would you do that, instead of what I posted earlier in the thread? If you send a flat enum with all devices listed, I'm gonna just be there telling you to consolidate into one device-specific fallback compatible per programming model.

There is no one device-specific fallback compatible! Schema describes HARDWARE not drivers no? I will not use random device compatible from

You came with "asus,transformer-ec" as fallback which is same random choice, so how one random device is okay, but other not? We asked to use some meaningful device as fallback, to the best of current knowledge.

Quoted 3 lines

the list as a fallback compatible for a different random unrelated device, that is plain wrong. Discuss this with Krzysztof and come up with something meaningful please.

It is not pleasant to review your patches. This happened in the past [1] and recently is not getting better. In multiple threads. Receiving half-baked responses to actual review questions means you do not value our time. I think you somehow annoyed, offended or wasted time of all three DT maintainers.

Well, sure, happens.

Just understand there might be a reason when your patches do not receive attention or reviews.

[1]
https://lore.kernel.org/r/CAPVz0n09ZP1i2tasdTvnt8RvjhALvUYjv9u_EGRtnXPOYQtuqQ@mail.gmail.com/

Best regards,
Krzysztof

#13 lore raw

Re: [PATCH v3 1/7] dt-bindings: embedded-controller: document ASUS Transformer EC

In reply to Svyatoslav Ryhel
Quoted 39 lines · Svyatoslav Ryhel

вт, 17 лют. 2026 р. о 16:03 Conor Dooley <[email protected]> пише:

Quoted 30 lines · Svyatoslav Ryhel
Quoted 29 lines

17 лютого 2026 р. 13:32:26 GMT+02:00, Krzysztof Kozlowski <[email protected]> пише:

Quoted 26 lines
Quoted 22 lines

properties:
compatible:
- items:
- enum:
- asus,p1801-t-ec-pad
- asus,sl101-ec-dock
- asus,tf101-ec-dock
- asus,tf101g-ec-dock
- asus,tf201-ec-dock
- asus,tf201-ec-pad
- asus,tf300t-ec-dock
- asus,tf300t-ec-pad
- asus,tf300tg-ec-dock
- asus,tf300tg-ec-pad
- asus,tf300tl-ec-dock
- asus,tf300tl-ec-pad
- asus,tf700t-ec-dock
- asus,tf700t-ec-pad
- asus,tf600t-ec-pad
- asus,tf701t-ec-pad
- const: asus,transformer-ec

Quoted 1 line

And them schema name will match the genetic compatible.

Then what does the generic compatible express?

Quoted 7 lines
Quoted 1 line

Then enum it is

Why would you do that, instead of what I posted earlier in the thread? If you send a flat enum with all devices listed, I'm gonna just be there telling you to consolidate into one device-specific fallback compatible per programming model.

Quoted 4 lines

There is no one device-specific fallback compatible! Schema describes HARDWARE not drivers no? I will not use random device compatible from the list as a fallback compatible for a different random unrelated device, that is plain wrong.

Which is why I am not mentioning drivers at all, and instead talking about programming models. Fallback compatibles represent similarities in programming model, even if the laptop that these devices are contained in are different, so whatever device compatible you pick might be random (but going chronologically is usually my recommendation) but it won't be unrelated.

Quoted 1 line

Discuss this with Krzysztof and come up with something meaningful please.

If you don't consider my reviews to be meaningful, you're welcome to carry a Nacked-by: Conor Dooley <[email protected]> with a link to this discussion instead.

Thanks,
Conor.

#14 lore raw

Re: [PATCH v3 1/7] dt-bindings: embedded-controller: document ASUS Transformer EC

In reply to Svyatoslav Ryhel
Quoted 186 lines · Svyatoslav Ryhel

17 лютого 2026 р. 13:05:09 GMT+02:00, Conor Dooley <[email protected]> пише:

Quoted 132 lines · Svyatoslav Ryhel
Quoted 131 lines

пн, 16 лют. 2026 р. о 20:50 Conor Dooley <[email protected]> пише:

Quoted 91 lines · Svyatoslav Ryhel
Quoted 71 lines

пн, 16 лют. 2026 р. о 20:04 Conor Dooley <[email protected]> пише:

Quoted 60 lines · Svyatoslav Ryhel
Quoted 58 lines

Document embedded controller used in ASUS Transformer device series.

---
 .../asus,transformer-ec.yaml                  | 98 +++++++++++++++++++
 1 file changed, 98 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/embedded-controller/asus,transformer-ec.yaml
Documentation/devicetree/bindings/embedded-controller/asus,transformer-ec.yaml new file +44 -0
new file mode 100644
index 000000000000..670c4c2d339d
@@ -0,0 +1,98 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/embedded-controller/asus,transformer-ec.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: ASUS Transformer's Embedded Controller
+
+description:
+  Several Nuvoton based Embedded Controllers attached to an I2C bus,
+  running a custom ASUS firmware, specific to the ASUS Transformer
+  device series.
+
+maintainers:
+  - Svyatoslav Ryhel <[email protected]>
+
+allOf:
+  - $ref: /schemas/power/supply/power-supply.yaml
+
+properties:
+  compatible:
+    oneOf:
+      - enum:
+          - asus,p1801-t-ec-pad
+          - asus,sl101-ec-dock
+          - asus,tf600t-ec-pad
+          - asus,tf701t-ec-pad
+
+      - items:
+          - enum:
+              - asus,tf101-ec-dock
+              - asus,tf101g-ec-dock
+              - asus,tf201-ec-dock
+              - asus,tf300t-ec-dock
+              - asus,tf300tg-ec-dock
+              - asus,tf300tl-ec-dock
+              - asus,tf700t-ec-dock
+          - const: asus,transformer-ec-dock
+
+      - items:
+          - enum:
+              - asus,tf201-ec-pad
+              - asus,tf300t-ec-pad
+              - asus,tf300tg-ec-pad
Quoted 9 lines

Documentation/devicetree/bindings/embedded-controller/asus,transformer-ec.yaml line 47

Quoted 3 lines
Documentation/devicetree/bindings/embedded-controller/asus,transformer-ec.yaml new file +3 -0
+              - asus,tf300tl-ec-pad
+              - asus,tf700t-ec-pad
+          - const: asus,transformer-ec-pad

Also, why are some of the compatibles permitted standalone? That should be mentioned in your commit message too. Also, other than the sl101, the standalone ones seem to have the same match data in the mfd driver. Why are fallbacks not made use of there?

Quoted 6 lines

Because standalone compatibles describe a unique hw configuration which cannot be grouped into something meaningful. asus,p1801-t-ec-pad is for EC of Tegra30/Intel based p1801-t AIO, asus,sl101-ec-dock is for EC of Tegra20 slider tablet, asus,tf600t-ec-pad is for altered EC in Win8 Tegra30 tablet, asus,tf701t-ec-pad is for Tegra114 tablet. Different generations, different form-factors.

I don't see any reasons here that eliminate fallback compatibles.

(quoted diff) +4 -0
+       { .compatible = "asus,p1801-t-ec-pad", .data = &asus_ec_pad_charger_data },
+       { .compatible = "asus,tf600t-ec-pad", .data = &asus_ec_pad_charger_data },
+       { .compatible = "asus,tf701t-ec-pad", .data = &asus_ec_pad_charger_data },
+       { }

Three of them use the same match data, so you need to explain why you've made these three standalone when all the others that share a programming model got a generic fallback. Fallback usage is based on programming model, not based on whether the devices are a physically different, so your explanation must reflect this.

Quoted 9 lines
Quoted 6 lines
Quoted 4 lines

Since this transformer series seems to have multiple programming models for "ec-pad" devices, it calls into question your use of the generic fallback compatibles is appropriate and makes it seem like you should be using device compatibles as a fallback.

That is redundant.

I don't understand how that is a response to what I said.

in other words you propose this:

properties:
compatible:
oneOf:
- items:
- enum:
- asus,sl101-ec-dock
- asus,tf101-ec-dock
- asus,tf101g-ec-dock
- asus,tf201-ec-dock
- asus,tf300t-ec-dock
- asus,tf300tg-ec-dock
- asus,tf300tl-ec-dock
- asus,tf700t-ec-dock
- const: asus,transformer-ec-dock

- items:
- enum:
- asus,p1801-t-ec-pad
- asus,tf201-ec-pad
- asus,tf300t-ec-pad
- asus,tf300tg-ec-pad
- asus,tf300tl-ec-pad
- asus,tf700t-ec-pad
- asus,tf600t-ec-pad
- asus,tf701t-ec-pad
- const: asus,transformer-ec-pad

Quoted 6 lines
Quoted 1 line

And in the driver add match to every single entry of enums?

No, I was talking about removing the generic compatibles entirely, since they are not suitably generic to cover all devices at the point of addition. So like:

Actually, they all can be grouped under asus,transformer-ec fallback if that is needed, both pad and dock EC have the same core functions just different set of cells. And then in the driver each compatible will get a dedicated matching data. Will this work?

properties:
compatible:
- items:
- enum:
- asus,p1801-t-ec-pad
- asus,sl101-ec-dock
- asus,tf101-ec-dock
- asus,tf101g-ec-dock
- asus,tf201-ec-dock
- asus,tf201-ec-pad
- asus,tf300t-ec-dock
- asus,tf300t-ec-pad
- asus,tf300tg-ec-dock
- asus,tf300tg-ec-pad
- asus,tf300tl-ec-dock
- asus,tf300tl-ec-pad
- asus,tf700t-ec-dock
- asus,tf700t-ec-pad
- asus,tf600t-ec-pad
- asus,tf701t-ec-pad
- const: asus,transformer-ec

And them schema name will match the genetic compatible.

Quoted 18 lines

items:
- enum:
- asus,tf101-ec-dock
- asus,tf101g-ec-dock
- asus,tf201-ec-dock
- asus,tf300t-ec-dock
- asus,tf300tg-ec-dock
- asus,tf300tl-ec-dock
- const: asus,tf700t-ec-dock

and

items:
- enum:
- asus,p1801-t-ec-pad
- asus,tf600t-ec-pad
- const: asus,tf701t-ec-pad

Quoted 5 lines
Quoted 3 lines

I dunno about these particular devices, but if there's already two programming models for these devices, what's to stop there being more added if/when a new generation of produces arrives?

There will be no new devices with this EC, last one was around 2013.

And what is to stop the next device in 2027 or w/e having a different programming model (so a third)? That's my point, I wasn't talking about there being more devices with two programming models evidenced here.

#15 lore raw

Re: [PATCH v3 1/7] dt-bindings: embedded-controller: document ASUS Transformer EC

In reply to Conor Dooley
Quoted 132 lines · Conor Dooley
Quoted 131 lines · Svyatoslav Ryhel

пн, 16 лют. 2026 р. о 20:50 Conor Dooley <[email protected]> пише:

Quoted 91 lines · Svyatoslav Ryhel
Quoted 71 lines

пн, 16 лют. 2026 р. о 20:04 Conor Dooley <[email protected]> пише:

Quoted 60 lines · Svyatoslav Ryhel
Quoted 58 lines

Document embedded controller used in ASUS Transformer device series.

---
 .../asus,transformer-ec.yaml                  | 98 +++++++++++++++++++
 1 file changed, 98 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/embedded-controller/asus,transformer-ec.yaml
Documentation/devicetree/bindings/embedded-controller/asus,transformer-ec.yaml new file +44 -0
new file mode 100644
index 000000000000..670c4c2d339d
@@ -0,0 +1,98 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/embedded-controller/asus,transformer-ec.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: ASUS Transformer's Embedded Controller
+
+description:
+  Several Nuvoton based Embedded Controllers attached to an I2C bus,
+  running a custom ASUS firmware, specific to the ASUS Transformer
+  device series.
+
+maintainers:
+  - Svyatoslav Ryhel <[email protected]>
+
+allOf:
+  - $ref: /schemas/power/supply/power-supply.yaml
+
+properties:
+  compatible:
+    oneOf:
+      - enum:
+          - asus,p1801-t-ec-pad
+          - asus,sl101-ec-dock
+          - asus,tf600t-ec-pad
+          - asus,tf701t-ec-pad
+
+      - items:
+          - enum:
+              - asus,tf101-ec-dock
+              - asus,tf101g-ec-dock
+              - asus,tf201-ec-dock
+              - asus,tf300t-ec-dock
+              - asus,tf300tg-ec-dock
+              - asus,tf300tl-ec-dock
+              - asus,tf700t-ec-dock
+          - const: asus,transformer-ec-dock
+
+      - items:
+          - enum:
+              - asus,tf201-ec-pad
+              - asus,tf300t-ec-pad
+              - asus,tf300tg-ec-pad
Quoted 9 lines

Documentation/devicetree/bindings/embedded-controller/asus,transformer-ec.yaml line 47

Quoted 3 lines
Documentation/devicetree/bindings/embedded-controller/asus,transformer-ec.yaml new file +3 -0
+              - asus,tf300tl-ec-pad
+              - asus,tf700t-ec-pad
+          - const: asus,transformer-ec-pad

Also, why are some of the compatibles permitted standalone? That should be mentioned in your commit message too. Also, other than the sl101, the standalone ones seem to have the same match data in the mfd driver. Why are fallbacks not made use of there?

Quoted 6 lines

Because standalone compatibles describe a unique hw configuration which cannot be grouped into something meaningful. asus,p1801-t-ec-pad is for EC of Tegra30/Intel based p1801-t AIO, asus,sl101-ec-dock is for EC of Tegra20 slider tablet, asus,tf600t-ec-pad is for altered EC in Win8 Tegra30 tablet, asus,tf701t-ec-pad is for Tegra114 tablet. Different generations, different form-factors.

I don't see any reasons here that eliminate fallback compatibles.

(quoted diff) +4 -0
+       { .compatible = "asus,p1801-t-ec-pad", .data = &asus_ec_pad_charger_data },
+       { .compatible = "asus,tf600t-ec-pad", .data = &asus_ec_pad_charger_data },
+       { .compatible = "asus,tf701t-ec-pad", .data = &asus_ec_pad_charger_data },
+       { }

Three of them use the same match data, so you need to explain why you've made these three standalone when all the others that share a programming model got a generic fallback. Fallback usage is based on programming model, not based on whether the devices are a physically different, so your explanation must reflect this.

Quoted 9 lines
Quoted 6 lines
Quoted 4 lines

Since this transformer series seems to have multiple programming models for "ec-pad" devices, it calls into question your use of the generic fallback compatibles is appropriate and makes it seem like you should be using device compatibles as a fallback.

That is redundant.

I don't understand how that is a response to what I said.

in other words you propose this:

properties:
compatible:
oneOf:
- items:
- enum:
- asus,sl101-ec-dock
- asus,tf101-ec-dock
- asus,tf101g-ec-dock
- asus,tf201-ec-dock
- asus,tf300t-ec-dock
- asus,tf300tg-ec-dock
- asus,tf300tl-ec-dock
- asus,tf700t-ec-dock
- const: asus,transformer-ec-dock

- items:
- enum:
- asus,p1801-t-ec-pad
- asus,tf201-ec-pad
- asus,tf300t-ec-pad
- asus,tf300tg-ec-pad
- asus,tf300tl-ec-pad
- asus,tf700t-ec-pad
- asus,tf600t-ec-pad
- asus,tf701t-ec-pad
- const: asus,transformer-ec-pad

Quoted 5 lines
Quoted 1 line

And in the driver add match to every single entry of enums?

No, I was talking about removing the generic compatibles entirely, since they are not suitably generic to cover all devices at the point of addition. So like:

Yep. Generic compatible has hardly a meaning if you already know it is not generic enough - some devices are not compatible with it.

Each SoC/platform which pushed to these generic compatible, hit a wall after some months/years. Apple is a nice example now.

Best regards,
Krzysztof

#16 lore raw

PATCH v3 2/7 mfd: Add driver for ASUS Transformer embedded controller

In reply to Svyatoslav Ryhel

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

Support Nuvoton NPCE795-based ECs as used in Asus Transformer TF201, TF300T, TF300TG, TF300TL and TF700T pad and dock, as well as TF101 dock and TF600T, P1801-T and TF701T pad. This is a glue driver handling detection and common operations for EC's functions.

---
 drivers/mfd/Kconfig                     |  14 +
 drivers/mfd/Makefile                    |   1 +
 drivers/mfd/asus-transformer-ec.c       | 763 ++++++++++++++++++++++++
 include/linux/mfd/asus-transformer-ec.h | 162 +++++
 4 files changed, 940 insertions(+)
 create mode 100644 drivers/mfd/asus-transformer-ec.c
 create mode 100644 include/linux/mfd/asus-transformer-ec.h
drivers/mfd/Kconfig +14 -0
index 7192c9d1d268..5aa4facfd2df 100644
@@ -137,6 +137,20 @@ config MFD_AAT2870_CORE
 	  additional drivers must be enabled in order to use the
 	  functionality of the device.
 
+config MFD_ASUS_TRANSFORMER_EC
+	tristate "ASUS Transformer's embedded controller"
+	depends on I2C && OF
+	help
+	  Support ECs found in ASUS Transformer's Pad and Mobile Dock.
+
+	  This provides shared glue for functional part drivers:
+	    asus-transformer-ec-kbc, asus-transformer-ec-keys,
+	    leds-asus-transformer-ec, asus-transformer-ec-battery
+	    and asus-transformer-ec-charger.
+
+	  This driver can also be built as a module. If so, the module
+	  will be called asus-transformer-ec.
+
 config MFD_AT91_USART
 	tristate "AT91 USART Driver"
 	select MFD_CORE
drivers/mfd/Makefile +1 -0
index e75e8045c28a..fd80088d8a9a 100644
@@ -10,6 +10,7 @@ obj-$(CONFIG_MFD_88PM805)	+= 88pm805.o 88pm80x.o
 obj-$(CONFIG_MFD_88PM886_PMIC)	+= 88pm886.o
 obj-$(CONFIG_MFD_ACT8945A)	+= act8945a.o
 obj-$(CONFIG_MFD_SM501)		+= sm501.o
+obj-$(CONFIG_MFD_ASUS_TRANSFORMER_EC)	+= asus-transformer-ec.o
 obj-$(CONFIG_ARCH_BCM2835)	+= bcm2835-pm.o
 obj-$(CONFIG_MFD_BCM590XX)	+= bcm590xx.o
 obj-$(CONFIG_MFD_BD9571MWV)	+= bd9571mwv.o
drivers/mfd/asus-transformer-ec.c new file +763 -0

763 lines not on this page · raw message

include/linux/mfd/asus-transformer-ec.h new file +162 -0

162 lines not on this page · raw message

Signature · 1 line
2.51.0
#17 lore raw

Re: [PATCH v3 2/7] mfd: Add driver for ASUS Transformer embedded controller

kernel test robot noticed the following build warnings:

Hi Svyatoslav,

kernel test robot noticed the following build warnings:

[auto build test WARNING on next-20260213]
[also build test WARNING on linus/master v6.19]
[cannot apply to dtor-input/next dtor-input/for-linus sre-power-supply/for-next robh/for-next v6.19 v6.19-rc8 v6.19-rc7] [If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Svyatoslav-Ryhel/dt-bindings-embedded-controller-document-ASUS-Transformer-EC/20260215-021406
base:   next-20260213
patch link:    https://lore.kernel.org/r/20260214180959.30714-3-clamor95%40gmail.com
patch subject: [PATCH v3 2/7] mfd: Add driver for ASUS Transformer embedded controller
config: riscv-allyesconfig (https://download.01.org/0day-ci/archive/20260216/[email protected]/config)
compiler: clang version 16.0.6 (https://github.com/llvm/llvm-project 7cbf1a2591520c2491aa35339f227775f4d3adf6)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260216/[email protected]/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

All warnings (new ones prefixed by >>):

>> drivers/mfd/asus-transformer-ec.c:234:40: warning: field width should have type 'int', but argument has type 'unsigned long' [-Wformat]
           dev_dbg(&priv->self->dev, "EC read: %*ph, ret = %d%s\n",
                                               ~~^
   include/linux/dev_printk.h:165:31: note: expanded from macro 'dev_dbg'
           dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
                                        ^~~     ~~~~~~~~~~~
   include/linux/dev_printk.h:19:22: note: expanded from macro 'dev_fmt'
   #define dev_fmt(fmt) fmt
                        ^~~
   include/linux/dynamic_debug.h:285:12: note: expanded from macro 'dynamic_dev_dbg'
                              dev, fmt, ##__VA_ARGS__)
                                   ^~~    ~~~~~~~~~~~
   include/linux/dynamic_debug.h:261:59: note: expanded from macro '_dynamic_func_call'
           _dynamic_func_call_cls(_DPRINTK_CLASS_DFLT, fmt, func, ##__VA_ARGS__)
                                                                    ^~~~~~~~~~~
   include/linux/dynamic_debug.h:259:65: note: expanded from macro '_dynamic_func_call_cls'
           __dynamic_func_call_cls(__UNIQUE_ID(ddebug), cls, fmt, func, ##__VA_ARGS__)
                                                                          ^~~~~~~~~~~
   include/linux/dynamic_debug.h:231:15: note: expanded from macro '__dynamic_func_call_cls'
                   func(&id, ##__VA_ARGS__);                       \
                               ^~~~~~~~~~~

1 warning generated.

vim +234 drivers/mfd/asus-transformer-ec.c

227
228 static int asus_ec_read(struct asus_ec_data *priv, bool in_irq)
229 {
230 int ret = i2c_smbus_read_i2c_block_data(priv->self, ASUSEC_READ_BUF,
231 sizeof(priv->ec_data),
232 priv->ec_data);
233

 > 234		dev_dbg(&priv->self->dev, "EC read: %*ph, ret = %d%s\n",

235 sizeof(priv->ec_data), priv->ec_data,
236 ret, in_irq ? "; in irq" : "");
237
238 return ret;
239 }
240

Signature · 2 lines
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
#18 lore raw

Re: [PATCH v3 2/7] mfd: Add driver for ASUS Transformer embedded controller

In reply to Svyatoslav Ryhel
kernel test robot noticed the following build warnings:

Hi Svyatoslav,

kernel test robot noticed the following build warnings:

[auto build test WARNING on next-20260213]
[also build test WARNING on linus/master v6.19]
[cannot apply to dtor-input/next dtor-input/for-linus sre-power-supply/for-next robh/for-next v6.19 v6.19-rc8 v6.19-rc7] [If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Svyatoslav-Ryhel/dt-bindings-embedded-controller-document-ASUS-Transformer-EC/20260215-021406
base:   next-20260213
patch link:    https://lore.kernel.org/r/20260214180959.30714-3-clamor95%40gmail.com
patch subject: [PATCH v3 2/7] mfd: Add driver for ASUS Transformer embedded controller
config: sparc64-allmodconfig (https://download.01.org/0day-ci/archive/20260216/[email protected]/config)
compiler: clang version 22.0.0git (https://github.com/llvm/llvm-project 9b8addffa70cee5b2acc5454712d9cf78ce45710)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260216/[email protected]/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

All warnings (new ones prefixed by >>):

>> drivers/mfd/asus-transformer-ec.c:234:40: warning: field width should have type 'int', but argument has type '__size_t' (aka 'unsigned long') [-Wformat]
     234 |         dev_dbg(&priv->self->dev, "EC read: %*ph, ret = %d%s\n",
         |                                             ~~^
     235 |                 sizeof(priv->ec_data), priv->ec_data,
         |                 ~~~~~~~~~~~~~~~~~~~~~
   include/linux/dev_printk.h:165:31: note: expanded from macro 'dev_dbg'
     165 |         dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
         |                                      ^~~     ~~~~~~~~~~~
   include/linux/dev_printk.h:19:22: note: expanded from macro 'dev_fmt'
      19 | #define dev_fmt(fmt) fmt
         |                      ^~~
   include/linux/dynamic_debug.h:285:12: note: expanded from macro 'dynamic_dev_dbg'
     285 |                            dev, fmt, ##__VA_ARGS__)
         |                                 ^~~    ~~~~~~~~~~~
   include/linux/dynamic_debug.h:261:59: note: expanded from macro '_dynamic_func_call'
     261 |         _dynamic_func_call_cls(_DPRINTK_CLASS_DFLT, fmt, func, ##__VA_ARGS__)
         |                                                                  ^~~~~~~~~~~
   include/linux/dynamic_debug.h:259:65: note: expanded from macro '_dynamic_func_call_cls'
     259 |         __dynamic_func_call_cls(__UNIQUE_ID(ddebug), cls, fmt, func, ##__VA_ARGS__)
         |                                                                        ^~~~~~~~~~~
   include/linux/dynamic_debug.h:231:15: note: expanded from macro '__dynamic_func_call_cls'
     231 |                 func(&id, ##__VA_ARGS__);                       \
         |                             ^~~~~~~~~~~

1 warning generated.

vim +234 drivers/mfd/asus-transformer-ec.c

227
228 static int asus_ec_read(struct asus_ec_data *priv, bool in_irq)
229 {
230 int ret = i2c_smbus_read_i2c_block_data(priv->self, ASUSEC_READ_BUF,
231 sizeof(priv->ec_data),
232 priv->ec_data);
233

 > 234		dev_dbg(&priv->self->dev, "EC read: %*ph, ret = %d%s\n",

235 sizeof(priv->ec_data), priv->ec_data,
236 ret, in_irq ? "; in irq" : "");
237
238 return ret;
239 }
240

Signature · 2 lines
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
#19 lore raw

PATCH v3 3/7 input: serio: Add driver for ASUS Transformer dock keyboard and touchpad

In reply to Svyatoslav Ryhel

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

Add input driver for ASUS Transformer dock keyboard and touchpad.

Some keys in ASUS Dock report keycodes that don't make sense according to their position, this patch modifies the incoming data that is sent to serio to send proper scancodes.

---
 drivers/input/serio/Kconfig                   |  15 ++
 drivers/input/serio/Makefile                  |   1 +
 drivers/input/serio/asus-transformer-ec-kbc.c | 147 ++++++++++++++++++
 3 files changed, 163 insertions(+)
 create mode 100644 drivers/input/serio/asus-transformer-ec-kbc.c
drivers/input/serio/Kconfig +15 -0
index c7ef347a4dff..1ca17ba632cc 100644
@@ -97,6 +97,21 @@ config SERIO_RPCKBD
 	  To compile this driver as a module, choose M here: the
 	  module will be called rpckbd.
 
+config SERIO_ASUS_TRANSFORMER_EC
+	tristate "Asus Transformer's Dock keyboard and touchpad controller"
+	depends on MFD_ASUS_TRANSFORMER_EC
+	help
+	  Say Y here if you want to use the keyboard and/or touchpad on
+	  Asus Transformed's Mobile Dock.
+
+	  For keyboard support you also need atkbd driver.
+
+	  For touchpad support you also need psmouse driver with Elantech
+	  touchpad option enabled.
+
+	  To compile this driver as a module, choose M here: the module will
+	  be called asus-transformer-ec-kbc.
+
 config SERIO_AMBAKMI
 	tristate "AMBA KMI keyboard controller"
 	depends on ARM_AMBA
drivers/input/serio/Makefile +1 -0
index 6d97bad7b844..9ecf0d011863 100644
@@ -13,6 +13,7 @@ obj-$(CONFIG_SERIO_CT82C710)	+= ct82c710.o
 obj-$(CONFIG_SERIO_RPCKBD)	+= rpckbd.o
 obj-$(CONFIG_SERIO_SA1111)	+= sa1111ps2.o
 obj-$(CONFIG_SERIO_AMBAKMI)	+= ambakmi.o
+obj-$(CONFIG_SERIO_ASUS_TRANSFORMER_EC)	+= asus-transformer-ec-kbc.o
 obj-$(CONFIG_SERIO_Q40KBD)	+= q40kbd.o
 obj-$(CONFIG_SERIO_GSCPS2)	+= gscps2.o
 obj-$(CONFIG_HP_SDC)		+= hp_sdc.o
drivers/input/serio/asus-transformer-ec-kbc.c new file +147 -0

147 lines not on this page · raw message

Signature · 1 line
2.51.0
#20 lore raw

PATCH v3 4/7 input: keyboard: Add driver for ASUS Transformer dock multimedia keys

In reply to Svyatoslav Ryhel

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

Add support for multimedia top button row of ASUS Transformer's Mobile Dock keyboard. Driver is made that function keys (F1-F12) are used by default which suits average Linux use better and with pressing ScreenLock + AltGr function keys layout is switched to multimedia keys. Since this only modifies codes sent by asus-ec-keys it doesn't affect normal keyboards at all.

---
 drivers/input/keyboard/Kconfig                |  10 +
 drivers/input/keyboard/Makefile               |   1 +
 .../input/keyboard/asus-transformer-ec-keys.c | 272 ++++++++++++++++++
 3 files changed, 283 insertions(+)
 create mode 100644 drivers/input/keyboard/asus-transformer-ec-keys.c
drivers/input/keyboard/Kconfig +10 -0
index 2ff4fef322c2..4e577e5cf216 100644
@@ -89,6 +89,16 @@ config KEYBOARD_APPLESPI
 	  To compile this driver as a module, choose M here: the
 	  module will be called applespi.
 
+config KEYBOARD_ASUS_TRANSFORMER_EC
+	tristate "Asus Transformer's Mobile Dock multimedia keys"
+	depends on MFD_ASUS_TRANSFORMER_EC
+	help
+	  Say Y here if you want to use multimedia keys present on Asus
+	  Transformer's Mobile Dock.
+
+	  To compile this driver as a module, choose M here: the
+	  module will be called asus-transformer-ec-keys.
+
 config KEYBOARD_ATARI
 	tristate "Atari keyboard"
 	depends on ATARI
drivers/input/keyboard/Makefile +1 -0
index 2d906e14f3e2..575edb0e8eb4 100644
@@ -11,6 +11,7 @@ obj-$(CONFIG_KEYBOARD_ADP5585)		+= adp5585-keys.o
 obj-$(CONFIG_KEYBOARD_ADP5588)		+= adp5588-keys.o
 obj-$(CONFIG_KEYBOARD_AMIGA)		+= amikbd.o
 obj-$(CONFIG_KEYBOARD_APPLESPI)		+= applespi.o
+obj-$(CONFIG_KEYBOARD_ASUS_TRANSFORMER_EC)	+= asus-transformer-ec-keys.o
 obj-$(CONFIG_KEYBOARD_ATARI)		+= atakbd.o
 obj-$(CONFIG_KEYBOARD_ATKBD)		+= atkbd.o
 obj-$(CONFIG_KEYBOARD_BCM)		+= bcm-keypad.o
drivers/input/keyboard/asus-transformer-ec-keys.c new file +272 -0

272 lines not on this page · raw message

Signature · 1 line
2.51.0
#21 lore raw

PATCH v3 5/7 leds: Add driver for ASUS Transformer LEDs

In reply to Svyatoslav Ryhel

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

ASUS Transformer tablets have a green and an amber LED on both the Pad and the Dock. If both LEDs are enabled simultaneously, the emitted light will be yellow.

---
 drivers/leds/Kconfig                    | 11 ++++
 drivers/leds/Makefile                   |  1 +
 drivers/leds/leds-asus-transformer-ec.c | 79 +++++++++++++++++++++++++
 3 files changed, 91 insertions(+)
 create mode 100644 drivers/leds/leds-asus-transformer-ec.c
drivers/leds/Kconfig +11 -0
index 597d7a79c988..bda06dc145d7 100644
@@ -120,6 +120,17 @@ config LEDS_OSRAM_AMS_AS3668
 	  To compile this driver as a module, choose M here: the module
 	  will be called leds-as3668.
 
+config LEDS_ASUS_TRANSFORMER_EC
+	tristate "LED Support for Asus Transformer charging LED"
+	depends on LEDS_CLASS
+	depends on MFD_ASUS_TRANSFORMER_EC
+	help
+	  This option enables support for charging indicator on
+	  Asus Transformer's Pad and it's Dock.
+
+	  To compile this driver as a module, choose M here: the module
+	  will be called leds-asus-transformer-ec.
+
 config LEDS_AW200XX
 	tristate "LED support for Awinic AW20036/AW20054/AW20072/AW20108"
 	depends on LEDS_CLASS
drivers/leds/Makefile +1 -0
index 8fdb45d5b439..d5395c3f1124 100644
@@ -16,6 +16,7 @@ obj-$(CONFIG_LEDS_AN30259A)		+= leds-an30259a.o
 obj-$(CONFIG_LEDS_APU)			+= leds-apu.o
 obj-$(CONFIG_LEDS_ARIEL)		+= leds-ariel.o
 obj-$(CONFIG_LEDS_AS3668)		+= leds-as3668.o
+obj-$(CONFIG_LEDS_ASUS_TRANSFORMER_EC)	+= leds-asus-transformer-ec.o
 obj-$(CONFIG_LEDS_AW200XX)		+= leds-aw200xx.o
 obj-$(CONFIG_LEDS_AW2013)		+= leds-aw2013.o
 obj-$(CONFIG_LEDS_BCM6328)		+= leds-bcm6328.o
drivers/leds/leds-asus-transformer-ec.c new file +79 -0

79 lines not on this page · raw message

Signature · 1 line
2.51.0
#22 lore raw

PATCH v3 6/7 power: supply: Add driver for ASUS Transformer battery

In reply to Svyatoslav Ryhel

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

Driver implements one battery cell per EC controller and supports reading of battery status for ASUS Transformer's pad and mobile dock.

---
 drivers/power/supply/Kconfig                  |  11 +
 drivers/power/supply/Makefile                 |   1 +
 .../supply/asus-transformer-ec-battery.c      | 272 ++++++++++++++++++
 3 files changed, 284 insertions(+)
 create mode 100644 drivers/power/supply/asus-transformer-ec-battery.c
drivers/power/supply/Kconfig +11 -0
index 81fadb0695a9..3c46b412632d 100644
@@ -122,6 +122,17 @@ config BATTERY_CHAGALL
 	  This driver can also be built as a module. If so, the module will be
 	  called chagall-battery.
 
+config BATTERY_ASUS_TRANSFORMER_EC
+	tristate "Asus Transformer's battery driver"
+	depends on MFD_ASUS_TRANSFORMER_EC
+	help
+	  Say Y here to enable support APM status emulation using
+	  battery class devices.
+
+	  This sub-driver supports battery cells found in Asus Transformer
+	  tablets and mobile docks and controlled by special embedded
+	  controller.
+
 config BATTERY_CPCAP
 	tristate "Motorola CPCAP PMIC battery driver"
 	depends on MFD_CPCAP && IIO
drivers/power/supply/Makefile +1 -0
index 41c400bbf022..aa5e6b05b018 100644
@@ -22,6 +22,7 @@ obj-$(CONFIG_TEST_POWER)	+= test_power.o
 obj-$(CONFIG_BATTERY_88PM860X)	+= 88pm860x_battery.o
 obj-$(CONFIG_CHARGER_ADP5061)	+= adp5061.o
 obj-$(CONFIG_BATTERY_ACT8945A)	+= act8945a_charger.o
+obj-$(CONFIG_BATTERY_ASUS_TRANSFORMER_EC)	+= asus-transformer-ec-battery.o
 obj-$(CONFIG_BATTERY_AXP20X)	+= axp20x_battery.o
 obj-$(CONFIG_CHARGER_AXP20X)	+= axp20x_ac_power.o
 obj-$(CONFIG_BATTERY_CHAGALL)	+= chagall-battery.o
drivers/power/supply/asus-transformer-ec-battery.c new file +272 -0

272 lines not on this page · raw message

Signature · 1 line
2.51.0
#23 lore raw

PATCH v3 7/7 power: supply: Add charger driver for Asus Transformers

In reply to Svyatoslav Ryhel

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

Add support for charger detection capabilities found in the embedded controller of ASUS Transformer devices.

---
 drivers/power/supply/Kconfig                  |  11 +
 drivers/power/supply/Makefile                 |   1 +
 .../supply/asus-transformer-ec-charger.c      | 193 ++++++++++++++++++
 3 files changed, 205 insertions(+)
 create mode 100644 drivers/power/supply/asus-transformer-ec-charger.c
drivers/power/supply/Kconfig +11 -0
index 3c46b412632d..56800aab82f9 100644
@@ -497,6 +497,17 @@ config CHARGER_88PM860X
 	help
 	  Say Y here to enable charger for Marvell 88PM860x chip.
 
+config CHARGER_ASUS_TRANSFORMER_EC
+	tristate "Asus Transformer's charger driver"
+	depends on MFD_ASUS_TRANSFORMER_EC
+	help
+	  Say Y here to enable support AC plug detection on Asus Transformer
+	  Dock.
+
+	  This sub-driver supports charger detection mechanism found in Asus
+	  Transformer tablets and mobile docks and controlled by special
+	  embedded controller.
+
 config CHARGER_PF1550
 	tristate "NXP PF1550 battery charger driver"
 	depends on MFD_PF1550
drivers/power/supply/Makefile +1 -0
index aa5e6b05b018..24679f09bb61 100644
@@ -68,6 +68,7 @@ obj-$(CONFIG_CHARGER_RT9471)	+= rt9471.o
 obj-$(CONFIG_CHARGER_RT9756)	+= rt9756.o
 obj-$(CONFIG_BATTERY_TWL4030_MADC)	+= twl4030_madc_battery.o
 obj-$(CONFIG_CHARGER_88PM860X)	+= 88pm860x_charger.o
+obj-$(CONFIG_CHARGER_ASUS_TRANSFORMER_EC)	+= asus-transformer-ec-charger.o
 obj-$(CONFIG_CHARGER_PF1550)	+= pf1550-charger.o
 obj-$(CONFIG_BATTERY_RX51)	+= rx51_battery.o
 obj-$(CONFIG_AB8500_BM)		+= ab8500_bmdata.o ab8500_charger.o ab8500_fg.o ab8500_btemp.o ab8500_chargalg.o
drivers/power/supply/asus-transformer-ec-charger.c new file +193 -0

193 lines not on this page · raw message

Signature · 1 line
2.51.0