Loading drivers/extcon/extcon-usb-gpio.c +7 −22 Original line number Diff line number Diff line Loading @@ -117,7 +117,6 @@ static int usb_extcon_probe(struct platform_device *pdev) struct device_node *np = dev->of_node; struct usb_extcon_info *info; int ret; const char *name = NULL; if (!np && !ACPI_HANDLE(dev)) return -EINVAL; Loading Loading @@ -159,25 +158,6 @@ static int usb_extcon_probe(struct platform_device *pdev) return ret; } if (info->trig_gpiod) { ret = of_property_read_string_index(np, "gpio-names", 0, &name); if (ret) { dev_err(dev, "Could not get gpio name\n"); return ret; } ret = gpiod_export(info->trig_gpiod, 0); if (ret) { dev_err(dev, "failed to export gpio\n"); return ret; } ret = gpiod_export_link(dev, name, info->trig_gpiod); if (ret) { dev_err(dev, "failed to export gpio link\n"); return ret; } } if (info->id_gpiod) ret = gpiod_set_debounce(info->id_gpiod, USB_GPIO_DEBOUNCE_MS * 1000); Loading Loading @@ -231,6 +211,11 @@ static int usb_extcon_probe(struct platform_device *pdev) platform_set_drvdata(pdev, info); device_init_wakeup(dev, true); if (info->trig_gpiod) /* Schedule with delay to reset ethernet bridge */ queue_delayed_work(system_power_efficient_wq, &info->wq_detcable, msecs_to_jiffies(1500)); else /* Perform initial detection */ usb_extcon_detect_cable(&info->wq_detcable.work); Loading Loading
drivers/extcon/extcon-usb-gpio.c +7 −22 Original line number Diff line number Diff line Loading @@ -117,7 +117,6 @@ static int usb_extcon_probe(struct platform_device *pdev) struct device_node *np = dev->of_node; struct usb_extcon_info *info; int ret; const char *name = NULL; if (!np && !ACPI_HANDLE(dev)) return -EINVAL; Loading Loading @@ -159,25 +158,6 @@ static int usb_extcon_probe(struct platform_device *pdev) return ret; } if (info->trig_gpiod) { ret = of_property_read_string_index(np, "gpio-names", 0, &name); if (ret) { dev_err(dev, "Could not get gpio name\n"); return ret; } ret = gpiod_export(info->trig_gpiod, 0); if (ret) { dev_err(dev, "failed to export gpio\n"); return ret; } ret = gpiod_export_link(dev, name, info->trig_gpiod); if (ret) { dev_err(dev, "failed to export gpio link\n"); return ret; } } if (info->id_gpiod) ret = gpiod_set_debounce(info->id_gpiod, USB_GPIO_DEBOUNCE_MS * 1000); Loading Loading @@ -231,6 +211,11 @@ static int usb_extcon_probe(struct platform_device *pdev) platform_set_drvdata(pdev, info); device_init_wakeup(dev, true); if (info->trig_gpiod) /* Schedule with delay to reset ethernet bridge */ queue_delayed_work(system_power_efficient_wq, &info->wq_detcable, msecs_to_jiffies(1500)); else /* Perform initial detection */ usb_extcon_detect_cable(&info->wq_detcable.work); Loading