}
platform_set_drvdata(pdev, info);
+ device_set_wakeup_capable(&pdev->dev, true);
/* Perform initial detection */
usb_conn_queue_dwork(info, 0);
{
struct usb_conn_info *info = dev_get_drvdata(dev);
+ if (device_may_wakeup(dev)) {
+ if (info->id_gpiod)
+ enable_irq_wake(info->id_irq);
+ if (info->vbus_gpiod)
+ enable_irq_wake(info->vbus_irq);
+ return 0;
+ }
+
if (info->id_gpiod)
disable_irq(info->id_irq);
if (info->vbus_gpiod)
{
struct usb_conn_info *info = dev_get_drvdata(dev);
+ if (device_may_wakeup(dev)) {
+ if (info->id_gpiod)
+ disable_irq_wake(info->id_irq);
+ if (info->vbus_gpiod)
+ disable_irq_wake(info->vbus_irq);
+ return 0;
+ }
+
pinctrl_pm_select_default_state(dev);
if (info->id_gpiod)