Skip to content

Commit d19444b

Browse files
retro98boyigorpecovnik
authored andcommitted
rockchip64: fix wrong GPIO direction in DP virtual extcon driver
The extcon-usbc-virtual-pd driver requests the detection GPIO with the flag GPIOD_OUT_LOW, which leads to a failure in gpiod_to_irq and consequently causes the driver loading to fail. This issue can be fixed by changing GPIOD_OUT_LOW to either GPIOD_IN or GPIOD_ASIS. This patch opts to change GPIOD_OUT_LOW to GPIOD_ASIS, as this is a less invasive approach. For devices intending to use this driver, it's also necessary to set the pinctrl property of the detection GPIO to input mode in the dts file.
1 parent 7459551 commit d19444b

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

patch/kernel/archive/rockchip64-6.12/general-add-miniDP-virtual-extcon.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ index 000000000000..111111111111
240240
+
241241
+ vpd->data_role = vpd_extcon_data_role(vpd);
242242
+
243-
+ vpd->det_gpio = devm_gpiod_get_optional(dev, "det", GPIOD_OUT_LOW);
243+
+ vpd->det_gpio = devm_gpiod_get_optional(dev, "det", GPIOD_ASIS);
244244
+ if (IS_ERR(vpd->det_gpio)) {
245245
+ ret = PTR_ERR(vpd->det_gpio);
246246
+ dev_warn(dev, "failed to get det gpio: %d\n", ret);

patch/kernel/archive/rockchip64-6.13/general-add-miniDP-virtual-extcon.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ index 000000000000..111111111111
240240
+
241241
+ vpd->data_role = vpd_extcon_data_role(vpd);
242242
+
243-
+ vpd->det_gpio = devm_gpiod_get_optional(dev, "det", GPIOD_OUT_LOW);
243+
+ vpd->det_gpio = devm_gpiod_get_optional(dev, "det", GPIOD_ASIS);
244244
+ if (IS_ERR(vpd->det_gpio)) {
245245
+ ret = PTR_ERR(vpd->det_gpio);
246246
+ dev_warn(dev, "failed to get det gpio: %d\n", ret);

patch/kernel/archive/rockchip64-6.6/general-add-miniDP-virtual-extcon.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ index 000000000000..e0713670e33d
240240
+
241241
+ vpd->data_role = vpd_extcon_data_role(vpd);
242242
+
243-
+ vpd->det_gpio = devm_gpiod_get_optional(dev, "det", GPIOD_OUT_LOW);
243+
+ vpd->det_gpio = devm_gpiod_get_optional(dev, "det", GPIOD_ASIS);
244244
+ if (IS_ERR(vpd->det_gpio)) {
245245
+ ret = PTR_ERR(vpd->det_gpio);
246246
+ dev_warn(dev, "failed to get det gpio: %d\n", ret);

patch/kernel/archive/rockchip64-6.9/general-add-miniDP-virtual-extcon.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ index 000000000000..e0713670e33d
240240
+
241241
+ vpd->data_role = vpd_extcon_data_role(vpd);
242242
+
243-
+ vpd->det_gpio = devm_gpiod_get_optional(dev, "det", GPIOD_OUT_LOW);
243+
+ vpd->det_gpio = devm_gpiod_get_optional(dev, "det", GPIOD_ASIS);
244244
+ if (IS_ERR(vpd->det_gpio)) {
245245
+ ret = PTR_ERR(vpd->det_gpio);
246246
+ dev_warn(dev, "failed to get det gpio: %d\n", ret);

0 commit comments

Comments
 (0)