From 662c738d9946de521dcece2b146dced335242389 Mon Sep 17 00:00:00 2001 From: Heiko Stübner Date: Wed, 29 Feb 2012 23:03:11 +0100 Subject: usb: otg: gpio_vbus: Add otg transceiver events and notifiers Commit 9ad63986c606 (pda_power: Add support for using otg transceiver events) converted the pda-power driver to use otg events to determine the status of the power supply. As gpio-vbus didn't use otg events until now, this change breaks setups of pda-power with a gpio-vbus transceiver. This patch adds the necessary otg events and notifiers to gpio-vbus. Signed-off-by: Heiko Stuebner Reviewed-by: Dima Zavin Signed-off-by: Felipe Balbi --- drivers/usb/otg/gpio_vbus.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'drivers/usb/otg/gpio_vbus.c') diff --git a/drivers/usb/otg/gpio_vbus.c b/drivers/usb/otg/gpio_vbus.c index 3ece43a2e4c1..a0a2178974fe 100644 --- a/drivers/usb/otg/gpio_vbus.c +++ b/drivers/usb/otg/gpio_vbus.c @@ -96,7 +96,7 @@ static void gpio_vbus_work(struct work_struct *work) struct gpio_vbus_data *gpio_vbus = container_of(work, struct gpio_vbus_data, work); struct gpio_vbus_mach_info *pdata = gpio_vbus->dev->platform_data; - int gpio; + int gpio, status; if (!gpio_vbus->phy.otg->gadget) return; @@ -108,7 +108,9 @@ static void gpio_vbus_work(struct work_struct *work) */ gpio = pdata->gpio_pullup; if (is_vbus_powered(pdata)) { + status = USB_EVENT_VBUS; gpio_vbus->phy.state = OTG_STATE_B_PERIPHERAL; + gpio_vbus->phy.last_event = status; usb_gadget_vbus_connect(gpio_vbus->phy.otg->gadget); /* drawing a "unit load" is *always* OK, except for OTG */ @@ -117,6 +119,9 @@ static void gpio_vbus_work(struct work_struct *work) /* optionally enable D+ pullup */ if (gpio_is_valid(gpio)) gpio_set_value(gpio, !pdata->gpio_pullup_inverted); + + atomic_notifier_call_chain(&gpio_vbus->phy.notifier, + status, gpio_vbus->phy.otg->gadget); } else { /* optionally disable D+ pullup */ if (gpio_is_valid(gpio)) @@ -125,7 +130,12 @@ static void gpio_vbus_work(struct work_struct *work) set_vbus_draw(gpio_vbus, 0); usb_gadget_vbus_disconnect(gpio_vbus->phy.otg->gadget); + status = USB_EVENT_NONE; gpio_vbus->phy.state = OTG_STATE_B_IDLE; + gpio_vbus->phy.last_event = status; + + atomic_notifier_call_chain(&gpio_vbus->phy.notifier, + status, gpio_vbus->phy.otg->gadget); } } @@ -287,6 +297,9 @@ static int __init gpio_vbus_probe(struct platform_device *pdev) irq, err); goto err_irq; } + + ATOMIC_INIT_NOTIFIER_HEAD(&gpio_vbus->phy.notifier); + INIT_WORK(&gpio_vbus->work, gpio_vbus_work); gpio_vbus->vbus_draw = regulator_get(&pdev->dev, "vbus_draw"); -- cgit v1.2.3-59-g8ed1b From 0d13eebcab76ff8f2b5e479747f66ffbf6c78b57 Mon Sep 17 00:00:00 2001 From: Shinya Kuribayashi Date: Thu, 10 May 2012 10:31:51 +0900 Subject: USB: gpio_vbus: fix inconsistent 'dev_id' parameters at free_irq() 'dev_id' has to be the same with the one passed to request_irq(). Signed-off-by: Shinya Kuribayashi Signed-off-by: Greg Kroah-Hartman --- drivers/usb/otg/gpio_vbus.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/usb/otg/gpio_vbus.c') diff --git a/drivers/usb/otg/gpio_vbus.c b/drivers/usb/otg/gpio_vbus.c index a0a2178974fe..5a13657ef077 100644 --- a/drivers/usb/otg/gpio_vbus.c +++ b/drivers/usb/otg/gpio_vbus.c @@ -319,7 +319,7 @@ static int __init gpio_vbus_probe(struct platform_device *pdev) return 0; err_otg: - free_irq(irq, &pdev->dev); + free_irq(irq, pdev); err_irq: if (gpio_is_valid(pdata->gpio_pullup)) gpio_free(pdata->gpio_pullup); @@ -341,7 +341,7 @@ static int __exit gpio_vbus_remove(struct platform_device *pdev) usb_set_transceiver(NULL); - free_irq(gpio_to_irq(gpio), &pdev->dev); + free_irq(gpio_to_irq(gpio), pdev); if (gpio_is_valid(pdata->gpio_pullup)) gpio_free(pdata->gpio_pullup); gpio_free(gpio); -- cgit v1.2.3-59-g8ed1b From 934ccec4da14dc0586dfe08b36166364bdd2181b Mon Sep 17 00:00:00 2001 From: Shinya Kuribayashi Date: Thu, 10 May 2012 10:31:21 +0900 Subject: USB: gpio_vbus: provide an appropriate debounce interval In commit c2344f13b59e007d782a3e591ebc551bc583a8b7 (USB: gpio_vbus: add delayed vbus_session calls, 2009-01-24), usb_gadget_vbus_connect() and ...disconnect() were extracted from the interrupt handler, so to allow vbus_session handlers to deal with msleep() calls. This patch takes the approach one step further. USB2.0 specification (7.1.7.3 Connect and Disconnect Signaling) says that the USB system software (shall) provide a debounce interval with a minimum duration of 100 ms, which ensures that the electrical and mechanical connection is stable before software attempts to reset the attached device. Signed-off-by: Shinya Kuribayashi Signed-off-by: Greg Kroah-Hartman --- drivers/usb/otg/gpio_vbus.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'drivers/usb/otg/gpio_vbus.c') diff --git a/drivers/usb/otg/gpio_vbus.c b/drivers/usb/otg/gpio_vbus.c index 5a13657ef077..66af743ec598 100644 --- a/drivers/usb/otg/gpio_vbus.c +++ b/drivers/usb/otg/gpio_vbus.c @@ -37,7 +37,7 @@ struct gpio_vbus_data { struct regulator *vbus_draw; int vbus_draw_enabled; unsigned mA; - struct work_struct work; + struct delayed_work work; }; @@ -94,7 +94,7 @@ static int is_vbus_powered(struct gpio_vbus_mach_info *pdata) static void gpio_vbus_work(struct work_struct *work) { struct gpio_vbus_data *gpio_vbus = - container_of(work, struct gpio_vbus_data, work); + container_of(work, struct gpio_vbus_data, work.work); struct gpio_vbus_mach_info *pdata = gpio_vbus->dev->platform_data; int gpio, status; @@ -152,7 +152,7 @@ static irqreturn_t gpio_vbus_irq(int irq, void *data) otg->gadget ? otg->gadget->name : "none"); if (otg->gadget) - schedule_work(&gpio_vbus->work); + schedule_delayed_work(&gpio_vbus->work, msecs_to_jiffies(100)); return IRQ_HANDLED; } @@ -300,7 +300,7 @@ static int __init gpio_vbus_probe(struct platform_device *pdev) ATOMIC_INIT_NOTIFIER_HEAD(&gpio_vbus->phy.notifier); - INIT_WORK(&gpio_vbus->work, gpio_vbus_work); + INIT_DELAYED_WORK(&gpio_vbus->work, gpio_vbus_work); gpio_vbus->vbus_draw = regulator_get(&pdev->dev, "vbus_draw"); if (IS_ERR(gpio_vbus->vbus_draw)) { -- cgit v1.2.3-59-g8ed1b From a6dc9cf76b9c39ccffe083f09f995ce2502f5773 Mon Sep 17 00:00:00 2001 From: Shinya Kuribayashi Date: Thu, 10 May 2012 10:32:14 +0900 Subject: USB: gpio_vbus: put a missing regulator_put() on error Note that regulator_put() doesn't care about whether ->vbus_draw is valid or not. Signed-off-by: Shinya Kuribayashi Signed-off-by: Greg Kroah-Hartman --- drivers/usb/otg/gpio_vbus.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/usb/otg/gpio_vbus.c') diff --git a/drivers/usb/otg/gpio_vbus.c b/drivers/usb/otg/gpio_vbus.c index 66af743ec598..ac962acfbb18 100644 --- a/drivers/usb/otg/gpio_vbus.c +++ b/drivers/usb/otg/gpio_vbus.c @@ -319,6 +319,7 @@ static int __init gpio_vbus_probe(struct platform_device *pdev) return 0; err_otg: + regulator_put(gpio_vbus->vbus_draw); free_irq(irq, pdev); err_irq: if (gpio_is_valid(pdata->gpio_pullup)) -- cgit v1.2.3-59-g8ed1b From e44694e858ed000ef11ee37861c7f7c86d8ddbda Mon Sep 17 00:00:00 2001 From: Shinya Kuribayashi Date: Thu, 10 May 2012 13:02:38 +0900 Subject: USB: gpio_vbus: avoid consecutive vbus_session calls with the same "is_active" Basically, ->vbus_session() calls should be served when VBUS session starts and ends (it's not whenever transciever drivers detect VBUS _changes_). Otherwise, if UDC gadget drivers don't want for some reason ->vbus_session() calls with the same "is_active" value, either OTG or UDC drivers need to have some protection handlings. Also, on platforms using this 'gpio_vbus' driver, the driver is only allowed to check whether VBUS is applied. There is no kernel-standard way prepared for UDC gadget drivers to do that. With this in mind, gpio_vbus should try to prevent unnecessary consecutive vbus_session calls being served with the same "in_active" value. Signed-off-by: Shinya Kuribayashi Signed-off-by: Greg Kroah-Hartman --- drivers/usb/otg/gpio_vbus.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'drivers/usb/otg/gpio_vbus.c') diff --git a/drivers/usb/otg/gpio_vbus.c b/drivers/usb/otg/gpio_vbus.c index ac962acfbb18..bd6e755dd3d8 100644 --- a/drivers/usb/otg/gpio_vbus.c +++ b/drivers/usb/otg/gpio_vbus.c @@ -38,6 +38,7 @@ struct gpio_vbus_data { int vbus_draw_enabled; unsigned mA; struct delayed_work work; + int vbus; }; @@ -96,18 +97,24 @@ static void gpio_vbus_work(struct work_struct *work) struct gpio_vbus_data *gpio_vbus = container_of(work, struct gpio_vbus_data, work.work); struct gpio_vbus_mach_info *pdata = gpio_vbus->dev->platform_data; - int gpio, status; + int gpio, status, vbus; if (!gpio_vbus->phy.otg->gadget) return; + vbus = is_vbus_powered(pdata); + if ((vbus ^ gpio_vbus->vbus) == 0) + return; + gpio_vbus->vbus = vbus; + /* Peripheral controllers which manage the pullup themselves won't have * gpio_pullup configured here. If it's configured here, we'll do what * isp1301_omap::b_peripheral() does and enable the pullup here... although * that may complicate usb_gadget_{,dis}connect() support. */ gpio = pdata->gpio_pullup; - if (is_vbus_powered(pdata)) { + + if (vbus) { status = USB_EVENT_VBUS; gpio_vbus->phy.state = OTG_STATE_B_PERIPHERAL; gpio_vbus->phy.last_event = status; @@ -195,6 +202,7 @@ static int gpio_vbus_set_peripheral(struct usb_otg *otg, dev_dbg(&pdev->dev, "registered gadget '%s'\n", gadget->name); /* initialize connection state */ + gpio_vbus->vbus = 0; /* start with disconnected */ gpio_vbus_irq(irq, pdev); return 0; } -- cgit v1.2.3-59-g8ed1b From 123bbceebeb1174e385eab1fc2b2535dcdcc9ec3 Mon Sep 17 00:00:00 2001 From: Shinya Kuribayashi Date: Thu, 17 May 2012 20:09:32 +0900 Subject: USB: gpio_vbus: use cached IRQ number for consistency with the probed one gpio_vbus is designed to be able to get an IRQ number for VBUS change interrupt either (1) through platform_get_resource(IORESOURCE_IRQ) or (2) by processing gpio_to_irq(pdata->gpio_vbus), in probe() function. On the other hand, gpio_vbus_set_peripheral() and gpio_vbus_remove() are always doing gpio_to_irq(pdata->gpio_vbus) to get an IRQ number. This is not just inconsistent, but also broken. There is no guarantee that an IRQ number obtained by platform_get_resource() is equal to gpio_to_irq(pdata->gpio_vbus). Cache an IRQ number in probe() function, and use it where necessary. Signed-off-by: Shinya Kuribayashi Signed-off-by: Greg Kroah-Hartman --- drivers/usb/otg/gpio_vbus.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'drivers/usb/otg/gpio_vbus.c') diff --git a/drivers/usb/otg/gpio_vbus.c b/drivers/usb/otg/gpio_vbus.c index bd6e755dd3d8..8853cb1fd9d7 100644 --- a/drivers/usb/otg/gpio_vbus.c +++ b/drivers/usb/otg/gpio_vbus.c @@ -39,6 +39,7 @@ struct gpio_vbus_data { unsigned mA; struct delayed_work work; int vbus; + int irq; }; @@ -173,12 +174,11 @@ static int gpio_vbus_set_peripheral(struct usb_otg *otg, struct gpio_vbus_data *gpio_vbus; struct gpio_vbus_mach_info *pdata; struct platform_device *pdev; - int gpio, irq; + int gpio; gpio_vbus = container_of(otg->phy, struct gpio_vbus_data, phy); pdev = to_platform_device(gpio_vbus->dev); pdata = gpio_vbus->dev->platform_data; - irq = gpio_to_irq(pdata->gpio_vbus); gpio = pdata->gpio_pullup; if (!gadget) { @@ -203,7 +203,7 @@ static int gpio_vbus_set_peripheral(struct usb_otg *otg, /* initialize connection state */ gpio_vbus->vbus = 0; /* start with disconnected */ - gpio_vbus_irq(irq, pdev); + gpio_vbus_irq(gpio_vbus->irq, pdev); return 0; } @@ -284,6 +284,8 @@ static int __init gpio_vbus_probe(struct platform_device *pdev) } else irq = gpio_to_irq(gpio); + gpio_vbus->irq = irq; + /* if data line pullup is in use, initialize it to "not pulling up" */ gpio = pdata->gpio_pullup; if (gpio_is_valid(gpio)) { @@ -350,7 +352,7 @@ static int __exit gpio_vbus_remove(struct platform_device *pdev) usb_set_transceiver(NULL); - free_irq(gpio_to_irq(gpio), pdev); + free_irq(gpio_vbus->irq, pdev); if (gpio_is_valid(pdata->gpio_pullup)) gpio_free(pdata->gpio_pullup); gpio_free(gpio); -- cgit v1.2.3-59-g8ed1b From da020b49fa6ee7eaf9fe359bc6089dd1848bb7d0 Mon Sep 17 00:00:00 2001 From: Shinya Kuribayashi Date: Thu, 17 May 2012 20:09:53 +0900 Subject: USB: gpio_vbus: remove IRQF_SAMPLE_RANDOM use IRQF_SAMPLE_RANDOM has been scheduled for removal for years (it was scheduled by July 2009, but not yet remvoed). I'm not sure when it's going to take place, but would be better to remove it now. Thanks for scripts/checkpatch secretary. Signed-off-by: Shinya Kuribayashi Signed-off-by: Greg Kroah-Hartman --- drivers/usb/otg/gpio_vbus.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'drivers/usb/otg/gpio_vbus.c') diff --git a/drivers/usb/otg/gpio_vbus.c b/drivers/usb/otg/gpio_vbus.c index 8853cb1fd9d7..4e393ef2f254 100644 --- a/drivers/usb/otg/gpio_vbus.c +++ b/drivers/usb/otg/gpio_vbus.c @@ -53,8 +53,7 @@ struct gpio_vbus_data { * edges might be workable. */ #define VBUS_IRQ_FLAGS \ - ( IRQF_SAMPLE_RANDOM | IRQF_SHARED \ - | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING ) + (IRQF_SHARED | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING) /* interface to regulator framework */ @@ -280,7 +279,7 @@ static int __init gpio_vbus_probe(struct platform_device *pdev) if (res) { irq = res->start; res->flags &= IRQF_TRIGGER_MASK; - res->flags |= IRQF_SAMPLE_RANDOM | IRQF_SHARED; + res->flags |= IRQF_SHARED; } else irq = gpio_to_irq(gpio); -- cgit v1.2.3-59-g8ed1b From c8240c1b810ac4adc13e04244781db6d2ff272be Mon Sep 17 00:00:00 2001 From: Shinya Kuribayashi Date: Thu, 17 May 2012 20:10:16 +0900 Subject: USB: gpio_vbus: handle IRQ flags properly Currently, 'res->flags' handlings are wrong in three respects: * the driver _modifies_ the contents of platform data * res->flags is set up, but not used anywhere in the driver * request_irq() always takes VBUS_IRQ_FLAGS, regardless of refs->flags This patch tries to fix this with a policy: If a platform IRQ resource is available, give preference to its IRQ flag(s) over a default one (VBUS_IRQ_FLAGS). Signed-off-by: Shinya Kuribayashi Signed-off-by: Greg Kroah-Hartman --- drivers/usb/otg/gpio_vbus.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'drivers/usb/otg/gpio_vbus.c') diff --git a/drivers/usb/otg/gpio_vbus.c b/drivers/usb/otg/gpio_vbus.c index 4e393ef2f254..00e763ecb55a 100644 --- a/drivers/usb/otg/gpio_vbus.c +++ b/drivers/usb/otg/gpio_vbus.c @@ -242,6 +242,7 @@ static int __init gpio_vbus_probe(struct platform_device *pdev) struct gpio_vbus_data *gpio_vbus; struct resource *res; int err, gpio, irq; + unsigned long irqflags; if (!pdata || !gpio_is_valid(pdata->gpio_vbus)) return -EINVAL; @@ -278,10 +279,11 @@ static int __init gpio_vbus_probe(struct platform_device *pdev) res = platform_get_resource(pdev, IORESOURCE_IRQ, 0); if (res) { irq = res->start; - res->flags &= IRQF_TRIGGER_MASK; - res->flags |= IRQF_SHARED; - } else + irqflags = (res->flags & IRQF_TRIGGER_MASK) | IRQF_SHARED; + } else { irq = gpio_to_irq(gpio); + irqflags = VBUS_IRQ_FLAGS; + } gpio_vbus->irq = irq; @@ -299,8 +301,7 @@ static int __init gpio_vbus_probe(struct platform_device *pdev) gpio_direction_output(gpio, pdata->gpio_pullup_inverted); } - err = request_irq(irq, gpio_vbus_irq, VBUS_IRQ_FLAGS, - "vbus_detect", pdev); + err = request_irq(irq, gpio_vbus_irq, irqflags, "vbus_detect", pdev); if (err) { dev_err(&pdev->dev, "can't request irq %i, err: %d\n", irq, err); -- cgit v1.2.3-59-g8ed1b From ec1ac6e1690adf4087afdc706770cb6fb732157b Mon Sep 17 00:00:00 2001 From: Shinya Kuribayashi Date: Thu, 17 May 2012 20:10:43 +0900 Subject: USB: gpio_vbus: a missing cancellation of workqueue in remove() function Signed-off-by: Shinya Kuribayashi Signed-off-by: Greg Kroah-Hartman --- drivers/usb/otg/gpio_vbus.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/usb/otg/gpio_vbus.c') diff --git a/drivers/usb/otg/gpio_vbus.c b/drivers/usb/otg/gpio_vbus.c index 00e763ecb55a..1e6bd0347aff 100644 --- a/drivers/usb/otg/gpio_vbus.c +++ b/drivers/usb/otg/gpio_vbus.c @@ -348,6 +348,7 @@ static int __exit gpio_vbus_remove(struct platform_device *pdev) struct gpio_vbus_mach_info *pdata = pdev->dev.platform_data; int gpio = pdata->gpio_vbus; + cancel_delayed_work_sync(&gpio_vbus->work); regulator_put(gpio_vbus->vbus_draw); usb_set_transceiver(NULL); -- cgit v1.2.3-59-g8ed1b From 7cbb062ade87b987a24aa834bbde32ad8374a4cf Mon Sep 17 00:00:00 2001 From: Shinya Kuribayashi Date: Thu, 17 May 2012 20:11:06 +0900 Subject: USB: gpio_vbus: wakeup support on GPIO VBUS interrupts We'd like to see the system waking up from the system-wide suspend when it gets plugged-in, or the USB cable is pulled out. Also makes it configurable via platform data 'wakeup'. Signed-off-by: Shinya Kuribayashi Signed-off-by: Greg Kroah-Hartman --- drivers/usb/otg/gpio_vbus.c | 33 +++++++++++++++++++++++++++++++++ include/linux/usb/gpio_vbus.h | 2 ++ 2 files changed, 35 insertions(+) (limited to 'drivers/usb/otg/gpio_vbus.c') diff --git a/drivers/usb/otg/gpio_vbus.c b/drivers/usb/otg/gpio_vbus.c index 1e6bd0347aff..bde6298a9693 100644 --- a/drivers/usb/otg/gpio_vbus.c +++ b/drivers/usb/otg/gpio_vbus.c @@ -327,6 +327,8 @@ static int __init gpio_vbus_probe(struct platform_device *pdev) goto err_otg; } + device_init_wakeup(&pdev->dev, pdata->wakeup); + return 0; err_otg: regulator_put(gpio_vbus->vbus_draw); @@ -348,6 +350,7 @@ static int __exit gpio_vbus_remove(struct platform_device *pdev) struct gpio_vbus_mach_info *pdata = pdev->dev.platform_data; int gpio = pdata->gpio_vbus; + device_init_wakeup(&pdev->dev, 0); cancel_delayed_work_sync(&gpio_vbus->work); regulator_put(gpio_vbus->vbus_draw); @@ -364,6 +367,33 @@ static int __exit gpio_vbus_remove(struct platform_device *pdev) return 0; } +#ifdef CONFIG_PM +static int gpio_vbus_pm_suspend(struct device *dev) +{ + struct gpio_vbus_data *gpio_vbus = dev_get_drvdata(dev); + + if (device_may_wakeup(dev)) + enable_irq_wake(gpio_vbus->irq); + + return 0; +} + +static int gpio_vbus_pm_resume(struct device *dev) +{ + struct gpio_vbus_data *gpio_vbus = dev_get_drvdata(dev); + + if (device_may_wakeup(dev)) + disable_irq_wake(gpio_vbus->irq); + + return 0; +} + +static const struct dev_pm_ops gpio_vbus_dev_pm_ops = { + .suspend = gpio_vbus_pm_suspend, + .resume = gpio_vbus_pm_resume, +}; +#endif + /* NOTE: the gpio-vbus device may *NOT* be hotplugged */ MODULE_ALIAS("platform:gpio-vbus"); @@ -372,6 +402,9 @@ static struct platform_driver gpio_vbus_driver = { .driver = { .name = "gpio-vbus", .owner = THIS_MODULE, +#ifdef CONFIG_PM + .pm = &gpio_vbus_dev_pm_ops, +#endif }, .remove = __exit_p(gpio_vbus_remove), }; diff --git a/include/linux/usb/gpio_vbus.h b/include/linux/usb/gpio_vbus.h index d9f03ccc2d60..837bba604a0b 100644 --- a/include/linux/usb/gpio_vbus.h +++ b/include/linux/usb/gpio_vbus.h @@ -17,6 +17,7 @@ * @gpio_pullup: optional D+ or D- pullup GPIO (else negative/invalid) * @gpio_vbus_inverted: true if gpio_vbus is active low * @gpio_pullup_inverted: true if gpio_pullup is active low + * @wakeup: configure gpio_vbus as a wake-up source * * The VBUS sensing GPIO should have a pulldown, which will normally be * part of a resistor ladder turning a 4.0V-5.25V level on VBUS into a @@ -27,4 +28,5 @@ struct gpio_vbus_mach_info { int gpio_pullup; bool gpio_vbus_inverted; bool gpio_pullup_inverted; + bool wakeup; }; -- cgit v1.2.3-59-g8ed1b