Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1724206
| Path | csiph.com!news.mixmin.net!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Ludovic Desroches <ludovic.desroches@microchip.com> |
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH RESEND new email address] usb: gadget: udc: atmel: set vbus irqflags explicitly |
| Date | Thu, 31 Aug 2017 15:10:01 +0200 |
| Message-ID | <ukxol-62o-9@gated-at.bofh.it> (permalink) |
| References | <ukx4Z-5GR-1@gated-at.bofh.it> <ukxeG-5K2-9@gated-at.bofh.it> |
| X-Original-To | Nicolas Ferre <nicolas.ferre@microchip.com> |
| X-Ironport-Av | E=Sophos;i="5.41,453,1498546800"; d="scan'208";a="4101385" |
| Mail-Followup-To | Nicolas Ferre <nicolas.ferre@microchip.com>, Alexandre Belloni <alexandre.belloni@free-electrons.com>, linux-arm-kernel@lists.infradead.org, balbi@kernel.org, linux-usb@vger.kernel.org, Boris BREZILLON <boris.brezillon@free-electrons.com>, Quentin Schulz <quentin.schulz@free-electrons.com>, linux-kernel@vger.kernel.org, gregkh@linuxfoundation.org, "stable # v4 . 4+" <stable@vger.kernel.org> |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset="us-ascii" |
| Content-Disposition | inline |
| User-Agent | NeoMutt/20170609 (1.8.3) |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 44 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | Alexandre Belloni <alexandre.belloni@free-electrons.com>, <linux-arm-kernel@lists.infradead.org>, <balbi@kernel.org>, <linux-usb@vger.kernel.org>, Boris BREZILLON <boris.brezillon@free-electrons.com>, Quentin Schulz <quentin.schulz@free-electrons.com>, Ludovic Desroches <ludovic.desroches@microchip.com>, <linux-kernel@vger.kernel.org>, <gregkh@linuxfoundation.org>, "stable # v4 . 4+" <stable@vger.kernel.org> |
| X-Original-Date | Thu, 31 Aug 2017 15:02:33 +0200 |
| X-Original-Message-ID | <20170831130233.enztdnkaj7dgg5gj@rfolt0960.corp.atmel.com> |
| X-Original-References | <20170831124820.21423-1-nicolas.ferre@microchip.com> <20170831125140.21600-1-nicolas.ferre@microchip.com> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1724206 |
Show key headers only | View raw
On Thu, Aug 31, 2017 at 02:51:40PM +0200, Nicolas Ferre wrote:
> The driver triggers actions on both edges of the vbus signal.
>
> The former PIO controller was triggering IRQs on both falling and rising edges
> by default. Newer PIO controller don't, so it's better to set it explicitly to
> IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING.
>
> Without this patch we may trigger the connection with host but only on some
> bouncing signal conditions and thus lose connecting events.
>
> Signed-off-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Acked-by: Ludovic Desroches <ludovic.desroches@microchip.com>
> Cc: stable <stable@vger.kernel.org> # v4.4+
> ---
> drivers/usb/gadget/udc/atmel_usba_udc.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/usb/gadget/udc/atmel_usba_udc.c b/drivers/usb/gadget/udc/atmel_usba_udc.c
> index 98d71400f8a1..a884c022df7a 100644
> --- a/drivers/usb/gadget/udc/atmel_usba_udc.c
> +++ b/drivers/usb/gadget/udc/atmel_usba_udc.c
> @@ -29,6 +29,8 @@
> #include <linux/of_gpio.h>
>
> #include "atmel_usba_udc.h"
> +#define USBA_VBUS_IRQFLAGS (IRQF_ONESHOT \
> + | IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING)
>
> #ifdef CONFIG_USB_GADGET_DEBUG_FS
> #include <linux/debugfs.h>
> @@ -2361,7 +2363,7 @@ static int usba_udc_probe(struct platform_device *pdev)
> IRQ_NOAUTOEN);
> ret = devm_request_threaded_irq(&pdev->dev,
> gpio_to_irq(udc->vbus_pin), NULL,
> - usba_vbus_irq_thread, IRQF_ONESHOT,
> + usba_vbus_irq_thread, USBA_VBUS_IRQFLAGS,
> "atmel_usba_udc", udc);
> if (ret) {
> udc->vbus_pin = -ENODEV;
> --
> 2.9.0
>
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH] usb: gadget: udc: atmel: set vbus irqflags explicitly Nicolas Ferre <nicolas.ferre@microchip.com> - 2017-08-31 14:50 +0200
[PATCH RESEND new email address] usb: gadget: udc: atmel: set vbus irqflags explicitly Nicolas Ferre <nicolas.ferre@microchip.com> - 2017-08-31 15:00 +0200
Re: [PATCH RESEND new email address] usb: gadget: udc: atmel: set vbus irqflags explicitly Ludovic Desroches <ludovic.desroches@microchip.com> - 2017-08-31 15:10 +0200
csiph-web