Skip to content

Commit

Permalink
Merge tag 'i2c-for-6.13-rc1-part3' of git://git.kernel.org/pub/scm/li…
Browse files Browse the repository at this point in the history
…nux/kernel/git/wsa/linux

Pull i2c component probing support from Wolfram Sang:
 "Add OF component probing.

  Some devices are designed and manufactured with some components having
  multiple drop-in replacement options. These components are often
  connected to the mainboard via ribbon cables, having the same signals
  and pin assignments across all options. These may include the display
  panel and touchscreen on laptops and tablets, and the trackpad on
  laptops. Sometimes which component option is used in a particular
  device can be detected by some firmware provided identifier, other
  times that information is not available, and the kernel has to try to
  probe each device.

  Instead of a delicate dance between drivers and device tree quirks,
  this change introduces a simple I2C component probe function. For a
  given class of devices on the same I2C bus, it will go through all of
  them, doing a simple I2C read transfer and see which one of them
  responds. It will then enable the device that responds"

* tag 'i2c-for-6.13-rc1-part3' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
  MAINTAINERS: fix typo in I2C OF COMPONENT PROBER
  of: base: Document prefix argument for of_get_next_child_with_prefix()
  i2c: Fix whitespace style issue
  arm64: dts: mediatek: mt8173-elm-hana: Mark touchscreens and trackpads as fail
  platform/chrome: Introduce device tree hardware prober
  i2c: of-prober: Add GPIO support to simple helpers
  i2c: of-prober: Add simple helpers for regulator support
  i2c: Introduce OF component probe function
  of: base: Add for_each_child_of_node_with_prefix()
  of: dynamic: Add of_changeset_update_prop_string
  • Loading branch information
torvalds committed Dec 1, 2024
2 parents 88862ee + caf4bdb commit a14bf46
Show file tree
Hide file tree
Showing 13 changed files with 840 additions and 3 deletions.
8 changes: 8 additions & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -10758,6 +10758,14 @@ S: Maintained
F: Documentation/devicetree/bindings/i2c/marvell,mv64xxx-i2c.yaml
F: drivers/i2c/busses/i2c-mv64xxx.c

I2C OF COMPONENT PROBER
M: Chen-Yu Tsai <[email protected]>
L: [email protected]
L: [email protected]
S: Maintained
F: drivers/i2c/i2c-core-of-prober.c
F: include/linux/i2c-of-prober.h

I2C OVER PARALLEL PORT
M: Jean Delvare <[email protected]>
L: [email protected]
Expand Down
14 changes: 14 additions & 0 deletions arch/arm64/boot/dts/mediatek/mt8173-elm-hana.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
compatible = "melfas,mip4_ts";
reg = <0x34>;
interrupts-extended = <&pio 88 IRQ_TYPE_LEVEL_LOW>;
status = "fail-needs-probe";
};

/*
Expand All @@ -26,6 +27,7 @@
reg = <0x20>;
hid-descr-addr = <0x0020>;
interrupts-extended = <&pio 88 IRQ_TYPE_LEVEL_LOW>;
status = "fail-needs-probe";
};

/* Lenovo Ideapad C330 uses G2Touch touchscreen as a 2nd source touchscreen */
Expand All @@ -35,6 +37,7 @@
hid-descr-addr = <0x0001>;
interrupt-parent = <&pio>;
interrupts = <88 IRQ_TYPE_LEVEL_LOW>;
status = "fail-needs-probe";
};
};

Expand All @@ -47,6 +50,8 @@
trackpad2: trackpad@2c {
compatible = "hid-over-i2c";
interrupts-extended = <&pio 117 IRQ_TYPE_LEVEL_LOW>;
pinctrl-names = "default";
pinctrl-0 = <&trackpad_irq>;
reg = <0x2c>;
hid-descr-addr = <0x0020>;
/*
Expand All @@ -58,6 +63,7 @@
*/
vdd-supply = <&mt6397_vgp6_reg>;
wakeup-source;
status = "fail-needs-probe";
};
};

Expand All @@ -82,3 +88,11 @@
};
};
};

&touchscreen {
status = "fail-needs-probe";
};

&trackpad {
status = "fail-needs-probe";
};
4 changes: 2 additions & 2 deletions arch/arm64/boot/dts/mediatek/mt8173-elm.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -358,12 +358,12 @@
&i2c4 {
clock-frequency = <400000>;
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&trackpad_irq>;

trackpad: trackpad@15 {
compatible = "elan,ekth3000";
interrupts-extended = <&pio 117 IRQ_TYPE_LEVEL_LOW>;
pinctrl-names = "default";
pinctrl-0 = <&trackpad_irq>;
reg = <0x15>;
vcc-supply = <&mt6397_vgp6_reg>;
wakeup-source;
Expand Down
1 change: 1 addition & 0 deletions drivers/i2c/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ i2c-core-y := i2c-core-base.o i2c-core-smbus.o
i2c-core-$(CONFIG_ACPI) += i2c-core-acpi.o
i2c-core-$(CONFIG_I2C_SLAVE) += i2c-core-slave.o
i2c-core-$(CONFIG_OF) += i2c-core-of.o
i2c-core-$(CONFIG_OF_DYNAMIC) += i2c-core-of-prober.o

obj-$(CONFIG_I2C_SMBUS) += i2c-smbus.o
obj-$(CONFIG_I2C_CHARDEV) += i2c-dev.o
Expand Down
Loading

0 comments on commit a14bf46

Please sign in to comment.