public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
From: sylvain.rochet@finsecur•com (Sylvain Rochet)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCHv6 4/5] USB: gadget: atmel_usba_udc: Prepare for IRQ single edge support
Date: Sat, 7 Feb 2015 20:37:23 +0100	[thread overview]
Message-ID: <20150207193723.GA32213@gradator.net> (raw)
In-Reply-To: <54D3A63B.6040209@atmel.com>

Hello Nicolas,


On Thu, Feb 05, 2015 at 06:19:55PM +0100, Nicolas Ferre wrote:
> Le 22/01/2015 18:14, Boris Brezillon a ?crit :
> > On Thu, 22 Jan 2015 17:56:44 +0100
> > Sylvain Rochet <sylvain.rochet@finsecur•com> wrote:
> > 
> > > -static const struct usba_udc_errata at91sam9g45_errata = {
> > > +static const struct usba_udc_caps at91sam9g45_caps = {
> > >  	.pulse_bias = at91sam9g45_pulse_bias,
> > > +	.irq_single_edge_support = true,
> 
> Nope! at91sam9g45 doesn't have this property. You'll have to create
> another compatible string and capabilities structure
> ("atmel,at91sam9x5-udc")

Oops.


> But still, I don't know if it's the proper approach. The possibility to
> trigger an IRQ on both edges or a single edge is a capacity of the gpio
> controller, not the USBA IP. So, it's a little bit strange to have this
> capability here.

I agree.


> I don't know if it's actually feasible but trying to configure the IRQ
> on a single edge, testing if it's accepted by the GPIO irq controller
> and if not, falling back to a "both edge" pattern. Doesn't it look like
> a way to workaround this issue nicely? Can you give it a try?

Tried, it works, but it displays the following message from 
__irq_set_trigger() [1] during devm_request_threaded_irq(?, 
IRQF_TRIGGER_RISING, ?) on boards which does not support single-edge 
IRQ:

genirq: Setting trigger mode 1 for irq 176 failed (gpio_irq_type+0x0/0x34)

Is it acceptable ?
If not, is udc->caps->irq_single_edge_support boolean acceptable ?
If not, I am ok to drop the feature, this is only a bonus.


Sylvain


[1] http://lxr.free-electrons.com/source/kernel/irq/manage.c#L619

  reply	other threads:[~2015-02-07 19:37 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-22 16:56 [PATCHv6 0/5] USB: gadget: atmel_usba_udc: Driver improvements Sylvain Rochet
2015-01-22 16:56 ` [PATCHv6 1/5] USB: gadget: atmel_usba_udc: Fixed vbus_prev initial state Sylvain Rochet
2015-01-22 16:56 ` [PATCHv6 2/5] USB: gadget: atmel_usba_udc: Request an auto disabled Vbus signal IRQ instead of an auto enabled IRQ request followed by IRQ disable Sylvain Rochet
2015-01-23  7:43   ` Jean-Christophe PLAGNIOL-VILLARD
2015-01-23  8:59     ` Nicolas Ferre
2015-01-23  9:39       ` Sylvain Rochet
2015-02-05 11:28   ` Nicolas Ferre
2015-01-22 16:56 ` [PATCHv6 3/5] USB: gadget: atmel_usba_udc: Start clocks on rising edge of the Vbus signal, stop clocks on falling edge of the Vbus signal Sylvain Rochet
2015-01-22 16:56 ` [PATCHv6 4/5] USB: gadget: atmel_usba_udc: Prepare for IRQ single edge support Sylvain Rochet
2015-01-22 17:14   ` Boris Brezillon
2015-02-05 17:19     ` Nicolas Ferre
2015-02-07 19:37       ` Sylvain Rochet [this message]
2015-02-08  9:24         ` Boris Brezillon
2015-02-12 18:00           ` Sylvain Rochet
2015-01-22 16:56 ` [PATCHv6 5/5] USB: gadget: atmel_usba_udc: Add suspend/resume with wakeup support Sylvain Rochet
2015-02-05 17:20   ` Nicolas Ferre

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150207193723.GA32213@gradator.net \
    --to=sylvain.rochet@finsecur$(echo .)com \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox