public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@cam.ac.uk>
To: Ben Dooks <ben-i2c@fluff.org>
Cc: Mike Frysinger <vapier@gentoo.org>,
	Jean Delvare <khali@linux-fr.org>,
	"Hennerich, Michael" <Michael.Hennerich@analog.com>,
	David Brownell <david-b@pacbell.net>,
	"uclinux-dist-devel@blackfin.uclinux.org" 
	<uclinux-dist-devel@blackfin.uclinux.org>,
	"linux-i2c@vger.kernel.org" <linux-i2c@vger.kernel.org>,
	"device-drivers-devel@blackfin.uclinux.org" 
	<device-drivers-devel@blackfin.uclinux.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [Device-drivers-devel] [PATCH] i2c: add irq_flags to board info
Date: Mon, 25 Oct 2010 15:12:24 +0100	[thread overview]
Message-ID: <4CC59048.4060600@cam.ac.uk> (raw)
In-Reply-To: <20101025004541.GD21564@trinity.fluff.org>

On 10/25/10 01:45, Ben Dooks wrote:
> On Mon, Oct 18, 2010 at 03:51:49PM -0400, Mike Frysinger wrote:
>> On Mon, Oct 18, 2010 at 10:33, Jean Delvare wrote:
>>> Why do we have set_irq_type() if we're not supposed to call it? I am
>>> not claiming to be an expert in the area, but it seems totally
>>> reasonable to me that the same piece of code instantiating an I2C
>>> device is also responsible for setting its IRQ type.
>>
>> but we're back to the same issue mentioned earlier -- you cant have a
>> single kernel build with modules supporting multiple drivers
>> simultaneously.  we like to ship development boards with a single
>> kernel build on it with many modules.  then people can pick the addon
>> boards they wish to prototype with at runtime by plugging in the card
>> and loading the module.
> 
> I also dislike set_irq_type() as it doesn't check whether there is anyone
> registered with the interrupt, which means that you could set the irq
> type of someone else's irq.
> 
> I wonder if we should pass a struct resource instead, in case there
> are multiple interrupt sources, as well as having it registered with
> the right resource systems.
> 
Either works as far as I am concerned. Having seen a large set of drivers
using the flags option (posted to linux-iio yesterday) I'm definitely convinced
some means of allowing devices to match what the board config asks for is useful.

I personally prefer the struct resource option as I have multiple drivers in IIO
which have two interrupts and this is the only reason some of them use platform
data.

Thanks,

Jonathan

  reply	other threads:[~2010-10-25 14:06 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-17 23:43 [PATCH] i2c: add irq_flags to board info Mike Frysinger
2010-10-18  8:36 ` Jean Delvare
2010-10-18  9:55   ` Hennerich, Michael
2010-10-18 12:01     ` Jean Delvare
2010-10-18 12:31       ` Hennerich, Michael
2010-10-18 14:33         ` Jean Delvare
2010-10-18 15:38           ` David Brownell
2010-10-18 15:46           ` Hennerich, Michael
2010-10-18 19:51           ` [Device-drivers-devel] " Mike Frysinger
2010-10-25  0:45             ` Ben Dooks
2010-10-25 14:12               ` Jonathan Cameron [this message]
2011-01-07  1:33               ` Mike Frysinger
2010-10-20 18:59   ` Mark Brown

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=4CC59048.4060600@cam.ac.uk \
    --to=jic23@cam.ac.uk \
    --cc=Michael.Hennerich@analog.com \
    --cc=ben-i2c@fluff.org \
    --cc=david-b@pacbell.net \
    --cc=device-drivers-devel@blackfin.uclinux.org \
    --cc=khali@linux-fr.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=uclinux-dist-devel@blackfin.uclinux.org \
    --cc=vapier@gentoo.org \
    /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