From: Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>
To: Ben Dooks <ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org>
Cc: David Brownell <david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org>,
Felipe Balbi <me-uiRdBs8odbtmTBlB0Cgj/Q@public.gmane.org>,
i2c-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org
Subject: Re: [PATCH] I2C: ISP1301_OMAP: New-style i2c driver updates, part 2
Date: Mon, 31 Mar 2008 20:41:56 +0200 [thread overview]
Message-ID: <20080331204156.1bcda7b9@hyperion.delvare> (raw)
In-Reply-To: <20080331173749.GA10234-elnMNo+KYs3pIgCt6eIbzw@public.gmane.org>
Hi Ben,
On Mon, 31 Mar 2008 18:37:49 +0100, Ben Dooks wrote:
> On Sun, Mar 16, 2008 at 12:56:18PM +0200, Felipe Balbi wrote:
> > This patch uses set_irq_type as suggested by Dave.
> >
> > ============= CUT HERE =========
> >
> > >From 293a73277794a1ca0f2307e7fe9d5ecd76d3ad06 Mon Sep 17 00:00:00 2001
> > From: Felipe Balbi <me-uiRdBs8odbtmTBlB0Cgj/Q@public.gmane.org>
> > Date: Tue, 1 Jan 2008 23:00:18 -0500
> > Subject: [PATCH] I2C: ISP1301_OMAP: New-style i2c driver updates, part 2
> >
> > Based on David Brownell's patch for tps65010, this patch
> > finish conversting isp1301_omap.c to new-style i2c driver.
> >
> > Signed-off-by: Felipe Balbi <me-uiRdBs8odbtmTBlB0Cgj/Q@public.gmane.org>
> > ---
> > arch/arm/mach-omap1/board-h2.c | 4 +
> > arch/arm/mach-omap1/board-h3.c | 8 ++
> > arch/arm/mach-omap2/board-h4.c | 14 ++++
> > drivers/i2c/chips/isp1301_omap.c | 134 ++++++++++---------------------------
> > 4 files changed, 62 insertions(+), 98 deletions(-)
> >
> > diff --git a/arch/arm/mach-omap1/board-h2.c b/arch/arm/mach-omap1/board-h2.c
> > index 5079877..fd9567c 100644
> > --- a/arch/arm/mach-omap1/board-h2.c
> > +++ b/arch/arm/mach-omap1/board-h2.c
> > @@ -22,6 +22,8 @@
> > #include <linux/kernel.h>
> > #include <linux/platform_device.h>
> > #include <linux/delay.h>
> > +#include <linux/irq.h>
> > +#include <linux/interrupt.h>
> > #include <linux/i2c.h>
> > #include <linux/mtd/mtd.h>
> > #include <linux/mtd/nand.h>
> > @@ -366,6 +368,8 @@ static void __init h2_init_irq(void)
> > omap_init_irq();
> > omap_gpio_init();
> > h2_init_smc91x();
> > + set_irq_type(OMAP_GPIO_IRQ(2),
> > + IRQF_SAMPLE_RANDOM | IRQF_TRIGGER_FALLING);
>
> Calling set_irq_type directly is not the recommended way of doing
> this. Use the correct trigger flags to request_irq().
Why that? set_irq_type() can be called from platform code, while
request_irq() is called from device drivers. When different platforms
use the same driver and need different IRQ trigger flags, using
set_irq_type() saves the need to carry the information from each
platform to the device driver. What's wrong with this approach?
--
Jean Delvare
_______________________________________________
i2c mailing list
i2c-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org
http://lists.lm-sensors.org/mailman/listinfo/i2c
next prev parent reply other threads:[~2008-03-31 18:41 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-15 12:47 [PATH 0/3] isp1301 changes Felipe Balbi
[not found] ` <1205585237-21492-1-git-send-email-me-uiRdBs8odbtmTBlB0Cgj/Q@public.gmane.org>
2008-03-15 12:47 ` [PATCH] I2C: Introduce irq_flags in i2c_boardinfo and i2c_client Felipe Balbi
[not found] ` <1205585237-21492-2-git-send-email-me-uiRdBs8odbtmTBlB0Cgj/Q@public.gmane.org>
2008-03-15 12:47 ` [PATCH] I2C: ISP1301_OMAP: New-style i2c driver updates, part 1 Felipe Balbi
[not found] ` <1205585237-21492-3-git-send-email-me-uiRdBs8odbtmTBlB0Cgj/Q@public.gmane.org>
2008-03-15 12:47 ` [PATCH] I2C: ISP1301_OMAP: New-style i2c driver updates, part 2 Felipe Balbi
[not found] ` <1205585237-21492-4-git-send-email-me-uiRdBs8odbtmTBlB0Cgj/Q@public.gmane.org>
2008-03-15 12:49 ` Felipe Balbi
[not found] ` <20080315124918.GA21547-4vvIQG7NF+ITKvXZea5imILpUPVTGn5w@public.gmane.org>
2008-03-15 12:54 ` Felipe Balbi
[not found] ` <20080315125458.GB21547-4vvIQG7NF+ITKvXZea5imILpUPVTGn5w@public.gmane.org>
2008-03-15 13:13 ` Felipe Balbi
[not found] ` <20080315131309.GA24990-4vvIQG7NF+ITKvXZea5imILpUPVTGn5w@public.gmane.org>
2008-03-16 10:56 ` Felipe Balbi
[not found] ` <20080316105617.GA4503-4vvIQG7NF+ITKvXZea5imILpUPVTGn5w@public.gmane.org>
2008-03-16 11:00 ` [PATCH] I2C: ISP1301: Sync with linux-omap Felipe Balbi
[not found] ` <20080316110033.GB4503-4vvIQG7NF+ITKvXZea5imILpUPVTGn5w@public.gmane.org>
2008-03-16 17:59 ` David Brownell
[not found] ` <200803161059.52278.david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org>
2008-03-16 18:18 ` Felipe Balbi
2008-03-18 12:46 ` Jean Delvare
[not found] ` <20080318134633.16f6e5f1-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
2008-03-18 13:09 ` Felipe Balbi
[not found] ` <31e679430803180609s2b404dabu1cac2e09f128ba96-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-03-18 13:23 ` Jean Delvare
[not found] ` <20080318142337.0f9a2b5b-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
2008-03-18 13:28 ` Felipe Balbi
[not found] ` <31e679430803180628h7a4926a2t4e540d9617522e28-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-03-20 9:39 ` David Brownell
2008-03-16 17:55 ` [PATCH] I2C: ISP1301_OMAP: New-style i2c driver updates, part 2 David Brownell
2008-03-18 12:42 ` Jean Delvare
[not found] ` <20080318134259.1b7e2878-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
2008-03-18 13:06 ` Felipe Balbi
[not found] ` <31e679430803180606w51e5538ar1df7fbdfa5a0e894-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-03-18 13:27 ` Jean Delvare
[not found] ` <20080318142716.74d65ba1-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
2008-03-20 9:44 ` David Brownell
2008-03-18 13:15 ` Jean Delvare
[not found] ` <20080318141528.53f4b2d8-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
2008-03-18 13:25 ` Felipe Balbi
2008-03-20 9:56 ` David Brownell
2008-03-31 17:37 ` Ben Dooks
[not found] ` <20080331173749.GA10234-elnMNo+KYs3pIgCt6eIbzw@public.gmane.org>
2008-03-31 18:41 ` Jean Delvare [this message]
2008-03-15 15:28 ` [PATH 0/3] isp1301 changes Jean Delvare
[not found] ` <20080315162832.067b8088-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
2008-03-15 15:38 ` Felipe Balbi
[not found] ` <31e679430803150838n6638be05k53800bb74eeb3462-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-03-15 15:40 ` Felipe Balbi
[not found] ` <31e679430803150840p334e8d17ncdd1fdc431de8d82-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-03-15 16:47 ` Jean Delvare
[not found] ` <20080315174731.29cfb554-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
2008-03-15 23:22 ` Felipe Balbi
2008-03-16 3:57 ` David Brownell
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=20080331204156.1bcda7b9@hyperion.delvare \
--to=khali-puyad+kwke1g9huczpvpmw@public.gmane.org \
--cc=ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org \
--cc=david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org \
--cc=i2c-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org \
--cc=me-uiRdBs8odbtmTBlB0Cgj/Q@public.gmane.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