Skip to content

Commit a14bf46

Browse files
committed
Merge tag 'i2c-for-6.13-rc1-part3' of git://git.kernel.org/pub/scm/linux/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
2 parents 88862ee + caf4bdb commit a14bf46

File tree

13 files changed

+840
-3
lines changed

13 files changed

+840
-3
lines changed

MAINTAINERS

+8
Original file line numberDiff line numberDiff line change
@@ -10758,6 +10758,14 @@ S: Maintained
1075810758
F: Documentation/devicetree/bindings/i2c/marvell,mv64xxx-i2c.yaml
1075910759
F: drivers/i2c/busses/i2c-mv64xxx.c
1076010760

10761+
I2C OF COMPONENT PROBER
10762+
M: Chen-Yu Tsai <[email protected]>
10763+
10764+
10765+
S: Maintained
10766+
F: drivers/i2c/i2c-core-of-prober.c
10767+
F: include/linux/i2c-of-prober.h
10768+
1076110769
I2C OVER PARALLEL PORT
1076210770
M: Jean Delvare <[email protected]>
1076310771

arch/arm64/boot/dts/mediatek/mt8173-elm-hana.dtsi

+14
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
compatible = "melfas,mip4_ts";
1515
reg = <0x34>;
1616
interrupts-extended = <&pio 88 IRQ_TYPE_LEVEL_LOW>;
17+
status = "fail-needs-probe";
1718
};
1819

1920
/*
@@ -26,6 +27,7 @@
2627
reg = <0x20>;
2728
hid-descr-addr = <0x0020>;
2829
interrupts-extended = <&pio 88 IRQ_TYPE_LEVEL_LOW>;
30+
status = "fail-needs-probe";
2931
};
3032

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

@@ -47,6 +50,8 @@
4750
trackpad2: trackpad@2c {
4851
compatible = "hid-over-i2c";
4952
interrupts-extended = <&pio 117 IRQ_TYPE_LEVEL_LOW>;
53+
pinctrl-names = "default";
54+
pinctrl-0 = <&trackpad_irq>;
5055
reg = <0x2c>;
5156
hid-descr-addr = <0x0020>;
5257
/*
@@ -58,6 +63,7 @@
5863
*/
5964
vdd-supply = <&mt6397_vgp6_reg>;
6065
wakeup-source;
66+
status = "fail-needs-probe";
6167
};
6268
};
6369

@@ -82,3 +88,11 @@
8288
};
8389
};
8490
};
91+
92+
&touchscreen {
93+
status = "fail-needs-probe";
94+
};
95+
96+
&trackpad {
97+
status = "fail-needs-probe";
98+
};

arch/arm64/boot/dts/mediatek/mt8173-elm.dtsi

+2-2
Original file line numberDiff line numberDiff line change
@@ -358,12 +358,12 @@
358358
&i2c4 {
359359
clock-frequency = <400000>;
360360
status = "okay";
361-
pinctrl-names = "default";
362-
pinctrl-0 = <&trackpad_irq>;
363361

364362
trackpad: trackpad@15 {
365363
compatible = "elan,ekth3000";
366364
interrupts-extended = <&pio 117 IRQ_TYPE_LEVEL_LOW>;
365+
pinctrl-names = "default";
366+
pinctrl-0 = <&trackpad_irq>;
367367
reg = <0x15>;
368368
vcc-supply = <&mt6397_vgp6_reg>;
369369
wakeup-source;

drivers/i2c/Makefile

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ i2c-core-y := i2c-core-base.o i2c-core-smbus.o
99
i2c-core-$(CONFIG_ACPI) += i2c-core-acpi.o
1010
i2c-core-$(CONFIG_I2C_SLAVE) += i2c-core-slave.o
1111
i2c-core-$(CONFIG_OF) += i2c-core-of.o
12+
i2c-core-$(CONFIG_OF_DYNAMIC) += i2c-core-of-prober.o
1213

1314
obj-$(CONFIG_I2C_SMBUS) += i2c-smbus.o
1415
obj-$(CONFIG_I2C_CHARDEV) += i2c-dev.o

0 commit comments

Comments
 (0)