public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: David Brownell <david-b@pacbell•net>
To: Grant Likely <grant.likely@secretlab•ca>
Cc: akpm@osdl•org, linuxppc-dev@ozlabs•org, gregkh@suse•de,
	linux-usb-devel@lists•sourceforge.net
Subject: Re: [PATCH 1/5] USB: Make usb_hcd_irq work for multi-role USB controllers w/ shared irq
Date: Sat, 24 Nov 2007 11:06:46 -0800	[thread overview]
Message-ID: <200711241106.46515.david-b@pacbell.net> (raw)
In-Reply-To: <20071124002431.25361.23974.stgit@trillian.cg.shawcable.net>

On Friday 23 November 2007, Grant Likely wrote:
> Some multi-role (host/peripheral) USB controllers use a shared interrupt
> line for all parts of the chip.

Like the musb_hdrc code ... soonish to go upstream (it needs some
updates to catch up to usbcore urb->status changes), this is used
by the Nokia 800 and 810.  In terms of chips with Linux support:
DaVinci, TUSB60x0, OMAP 2430, OMAP 3430, Blackfin BF527; and ISTR
a few less-publicised ones (including, yes, some PPC SOCs).

That driver hasn't needed to change usbcore for IRQ handling though.


> Export usb_hcd_irq so drivers can call it 
> from their interrupt handler instead of duplicating code.

This seems to be the main point of this patch.  I'd rather just
make that "static" though; it should already be marked that way.

That routine doesn't do enough to make me like it any more; and
with dual-role controllers, the driver lifecycle is more complex
than usbcore can be expected to mediate.  Best to just call the
host side IRQ logic directly from your toplevel IRQ handler.


> Drivers pass an irqnum of 0 to usb_add_hcd to signal that the interrupt handler
> shouldn't be registerred by the core.

The current way to get that behavior is to leave hcd->driver->irq
as zero; then "irqnum" is ignored, and your dual role driver can
register its own handler.

- Dave

  parent reply	other threads:[~2007-11-24 19:06 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-24  0:24 [PATCH 0/5] Review request: Cypress c67x00 OTG controller Grant Likely
2007-11-24  0:24 ` [PATCH 1/5] USB: Make usb_hcd_irq work for multi-role USB controllers w/ shared irq Grant Likely
2007-11-24  5:10   ` Greg KH
2007-11-24 17:03     ` [linux-usb-devel] " Alan Cox
2007-11-24 17:15       ` Grant Likely
2007-11-24 17:50       ` David Brownell
2007-11-24 19:06   ` David Brownell [this message]
2007-11-24 19:28     ` Grant Likely
2007-11-24  0:24 ` [PATCH 2/5] USB: Add Cypress c67x00 low level interface code Grant Likely
2007-11-24 19:39   ` David Brownell
2007-11-24  0:24 ` [PATCH 3/5] USB: add Cypress c67x00 OTG controller core driver Grant Likely
2007-11-24  0:24 ` [PATCH 4/5] USB: add Cypress c67x00 OTG controller HCD driver Grant Likely
2007-11-24  3:56   ` [linux-usb-devel] " Alan Stern
2007-11-24  0:24 ` [PATCH 5/5] USB: Add Cypress c67x00 OTG controller driver to Kconfig and Makefiles Grant Likely
2007-11-24 20:12   ` David Brownell
2007-11-24 20:20     ` Grant Likely
2007-11-24 21:03       ` David Brownell
2007-11-24 21:13         ` Grant Likely
2007-11-24 17:57 ` [PATCH 0/5] Review request: Cypress c67x00 OTG controller David Brownell
2007-11-24 19:27   ` Grant Likely

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=200711241106.46515.david-b@pacbell.net \
    --to=david-b@pacbell$(echo .)net \
    --cc=akpm@osdl$(echo .)org \
    --cc=grant.likely@secretlab$(echo .)ca \
    --cc=gregkh@suse$(echo .)de \
    --cc=linux-usb-devel@lists$(echo .)sourceforge.net \
    --cc=linuxppc-dev@ozlabs$(echo .)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