From: David Brownell <david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org>
To: Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>
Cc: "Hennerich,
Michael"
<Michael.Hennerich-OyLXuOCK7orQT0dZR+AlfA@public.gmane.org>,
Mike Frysinger <vapier-aBrp7R+bbdUdnm+yROfE0A@public.gmane.org>,
"linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"uclinux-dist-devel-ZG0+EudsQA8dtHy/vicBwGD2FQJk+8+b@public.gmane.org"
<uclinux-dist-devel-ZG0+EudsQA8dtHy/vicBwGD2FQJk+8+b@public.gmane.org>,
"device-drivers-devel-ZG0+EudsQA8dtHy/vicBwGD2FQJk+8+b@public.gmane.org"
<device-drivers-devel-ZG0+EudsQA8dtHy/vicBwGD2FQJk+8+b@public.gmane.org>
Subject: Re: [PATCH] i2c: add irq_flags to board info
Date: Mon, 18 Oct 2010 08:38:25 -0700 [thread overview]
Message-ID: <1287416305.2038.70.camel@helium> (raw)
In-Reply-To: <20101018163357.659efe25-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org>
On Mon, 2010-10-18 at 16:33 +0200, Jean Delvare wrote:
>
> This is an interesting point. David, you're the one who added irq to
> struct i2c_client, you didn't add irq_flags then, did you have a good
> reason not to?
There was no evident need to do so. The problem wasn't characterizing
the IRQ, but knowing what IRQ was associated with a given I2C chip. The
IRQs would, as a rule, only have one behavior, known in advance by the
I2C chip's driver ... if it only had a way to know client->irq ...
In one model of IRQ setup (like PC BIOS), it's handled before drivers
do more than request the IRQ, and drivers just cope. irq_flags not
needed ... it's often a hardware-to-driver convention, likely matching
I2C chip defaults. (Or more awkwardly, coping with whatever trigger
mode the platform uses).
In another model, drivers configure their chips according to desired
mode (level low, for the most common example, or edge triggered, etc)
and again, irq_flags not needed, but in this case the platform code
would have had *nothing* do do with such mode setup.
>
> > There are drivers that work around this deficiency, by adding irq_flags to the bus clients dev.platform_data
> > See include/linux/spi/ads7846.h for one example.
Not a good example; that was changed earlier this year and, from a quick
glance, may not have tried much to avoid that change. The driver had
worked for years with that alleged "deficiency".
- Dave
next prev parent reply other threads:[~2010-10-18 15:38 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
[not found] ` <1287359019-1476-1-git-send-email-vapier-aBrp7R+bbdUdnm+yROfE0A@public.gmane.org>
2010-10-18 8:36 ` Jean Delvare
[not found] ` <20101018103610.77b7e605-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org>
2010-10-18 9:55 ` Hennerich, Michael
2010-10-18 12:01 ` Jean Delvare
[not found] ` <20101018140136.2b44d29e-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org>
2010-10-18 12:31 ` Hennerich, Michael
[not found] ` <544AC56F16B56944AEC3BD4E3D5917713094520FA6-gpnycfiEEVR7xzP2fcxY8GoKb0G9Rp+C@public.gmane.org>
2010-10-18 14:33 ` Jean Delvare
[not found] ` <20101018163357.659efe25-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org>
2010-10-18 15:38 ` David Brownell [this message]
2010-10-18 15:46 ` Hennerich, Michael
2010-10-18 19:51 ` [Device-drivers-devel] " Mike Frysinger
[not found] ` <AANLkTi=fAYqxsGre9kOt9Z8nDXZ9JFjZtKUiMrE3Qn9b-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-10-25 0:45 ` Ben Dooks
[not found] ` <20101025004541.GD21564-SMNkleLxa3Z6Wcw2j4pizdi2O/JbrIOy@public.gmane.org>
2010-10-25 14:12 ` Jonathan Cameron
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=1287416305.2038.70.camel@helium \
--to=david-b-ybekhbn/0ldr7s880joybq@public.gmane.org \
--cc=Michael.Hennerich-OyLXuOCK7orQT0dZR+AlfA@public.gmane.org \
--cc=device-drivers-devel-ZG0+EudsQA8dtHy/vicBwGD2FQJk+8+b@public.gmane.org \
--cc=khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org \
--cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=uclinux-dist-devel-ZG0+EudsQA8dtHy/vicBwGD2FQJk+8+b@public.gmane.org \
--cc=vapier-aBrp7R+bbdUdnm+yROfE0A@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;
as well as URLs for NNTP newsgroup(s).