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.
This commit is contained in:
parent
745955110b
commit
d19444bf8a
@ -240,7 +240,7 @@ index 000000000000..111111111111
|
||||
+
|
||||
+ vpd->data_role = vpd_extcon_data_role(vpd);
|
||||
+
|
||||
+ vpd->det_gpio = devm_gpiod_get_optional(dev, "det", GPIOD_OUT_LOW);
|
||||
+ vpd->det_gpio = devm_gpiod_get_optional(dev, "det", GPIOD_ASIS);
|
||||
+ if (IS_ERR(vpd->det_gpio)) {
|
||||
+ ret = PTR_ERR(vpd->det_gpio);
|
||||
+ dev_warn(dev, "failed to get det gpio: %d\n", ret);
|
||||
|
||||
@ -240,7 +240,7 @@ index 000000000000..111111111111
|
||||
+
|
||||
+ vpd->data_role = vpd_extcon_data_role(vpd);
|
||||
+
|
||||
+ vpd->det_gpio = devm_gpiod_get_optional(dev, "det", GPIOD_OUT_LOW);
|
||||
+ vpd->det_gpio = devm_gpiod_get_optional(dev, "det", GPIOD_ASIS);
|
||||
+ if (IS_ERR(vpd->det_gpio)) {
|
||||
+ ret = PTR_ERR(vpd->det_gpio);
|
||||
+ dev_warn(dev, "failed to get det gpio: %d\n", ret);
|
||||
|
||||
@ -240,7 +240,7 @@ index 000000000000..e0713670e33d
|
||||
+
|
||||
+ vpd->data_role = vpd_extcon_data_role(vpd);
|
||||
+
|
||||
+ vpd->det_gpio = devm_gpiod_get_optional(dev, "det", GPIOD_OUT_LOW);
|
||||
+ vpd->det_gpio = devm_gpiod_get_optional(dev, "det", GPIOD_ASIS);
|
||||
+ if (IS_ERR(vpd->det_gpio)) {
|
||||
+ ret = PTR_ERR(vpd->det_gpio);
|
||||
+ dev_warn(dev, "failed to get det gpio: %d\n", ret);
|
||||
|
||||
@ -240,7 +240,7 @@ index 000000000000..e0713670e33d
|
||||
+
|
||||
+ vpd->data_role = vpd_extcon_data_role(vpd);
|
||||
+
|
||||
+ vpd->det_gpio = devm_gpiod_get_optional(dev, "det", GPIOD_OUT_LOW);
|
||||
+ vpd->det_gpio = devm_gpiod_get_optional(dev, "det", GPIOD_ASIS);
|
||||
+ if (IS_ERR(vpd->det_gpio)) {
|
||||
+ ret = PTR_ERR(vpd->det_gpio);
|
||||
+ dev_warn(dev, "failed to get det gpio: %d\n", ret);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user