linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Peter Ujfalusi <peter.ujfalusi@ti.com>
Cc: Samuel Ortiz <sameo@linux.intel.com>,
	linux-kernel@vger.kernel.org,
	Misael Lopez Cruz <misael.lopez@ti.com>,
	Benoit Cousson <b-cousson@ti.com>,
	devicetree-discuss@lists.ozlabs.org, Liam Girdwood <lrg@ti.com>
Subject: Re: [PATCH 2/3] MFD: twl6040: Allocate IRQ numbers dynamically
Date: Fri, 4 May 2012 13:47:51 +0100	[thread overview]
Message-ID: <20120504124750.GL14230@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <4FA3CCAF.3020902@ti.com>

[-- Attachment #1: Type: text/plain, Size: 1388 bytes --]

On Fri, May 04, 2012 at 03:33:51PM +0300, Peter Ujfalusi wrote:
> On 05/04/2012 03:17 PM, Mark Brown wrote:

> > The latter, and also just any driver that delivers an interrupt via a
> > GPIO on OMAP - if the GPIO IRQ numbers are all dynamically allocated
> > then it gets hard to register an off-chip device and tell it which
> > interrupt to request.

> For GPIO IRQ there's the gpio_to_irq() call which returns the mapped IRQ
> number for the given GPIO.

This doesn't really work for board files, though - you can only call
gpio_to_irq() at runtime so if you're statically registering the devices
on the board you'd need to make the structures non-const, manage to find
the GPIO controller at runtime then do the lookup, update the struct and
finally register the device.

> If there is "irq expander" type of chip I assume it would have similar
> way to get the IRQ number based on either GPIO number or some other
> enumeration value.

No, there's no generic interface for this.

> The twl6040 does not have such a feature. The interrupts are generated
> internally and it has one IRQ line towards the host. We have nested
> interrupts for the childs (plug detect is handled by ASoC codec, Vibra
> overcurrent is handled by the vibra driver, etc).

OK, that's fine then - you should put this in the changelog to make it
clear that there are no external users who could be affected.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  reply	other threads:[~2012-05-04 12:47 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-03 12:54 [PATCH 0/3] MFD: twl6040: Device tree support Peter Ujfalusi
2012-05-03 12:54 ` [PATCH 1/3] MFD: twl6040: Code cleanup in interrupt initialization part Peter Ujfalusi
2012-05-03 12:54 ` [PATCH 2/3] MFD: twl6040: Allocate IRQ numbers dynamically Peter Ujfalusi
2012-05-03 13:20   ` Mark Brown
2012-05-03 13:28     ` Peter Ujfalusi
2012-05-03 14:52       ` Mark Brown
2012-05-03 15:13         ` Peter Ujfalusi
2012-05-03 15:26           ` Mark Brown
2012-05-04  8:38             ` Peter Ujfalusi
2012-05-04  9:08               ` Mark Brown
2012-05-04 10:37                 ` Peter Ujfalusi
2012-05-04 11:22                   ` Mark Brown
2012-05-04 11:55                     ` Peter Ujfalusi
2012-05-04 12:17                       ` Mark Brown
2012-05-04 12:33                         ` Peter Ujfalusi
2012-05-04 12:47                           ` Mark Brown [this message]
2012-05-07  6:49                             ` Peter Ujfalusi
2012-05-07  9:49                               ` Mark Brown
2012-05-03 12:54 ` [PATCH 3/3] MFD: twl6040: Support for DT Peter Ujfalusi

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=20120504124750.GL14230@opensource.wolfsonmicro.com \
    --to=broonie@opensource.wolfsonmicro.com \
    --cc=b-cousson@ti.com \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lrg@ti.com \
    --cc=misael.lopez@ti.com \
    --cc=peter.ujfalusi@ti.com \
    --cc=sameo@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).