From: Maxime Ripard <maxime.ripard@free-electrons.com>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drivers: tca8418: Change the interrupt type
Date: Thu, 10 Nov 2016 10:13:02 +0100 [thread overview]
Message-ID: <20161110091302.cjn4srrpxtg2mknv@lukather> (raw)
In-Reply-To: <20161110040208.GA9498@dtor-ws>
[-- Attachment #1: Type: text/plain, Size: 2006 bytes --]
On Wed, Nov 09, 2016 at 08:02:08PM -0800, Dmitry Torokhov wrote:
> On Wed, Nov 09, 2016 at 09:02:35AM +0100, Maxime Ripard wrote:
> > Hello Dmitry,
> >
> > On Tue, Nov 08, 2016 at 04:04:00PM -0800, Dmitry Torokhov wrote:
> > > On Mon, Nov 07, 2016 at 03:40:24PM +0100, Maxime Ripard wrote:
> > > > The TCA8418 interrupt has a level trigger, not a edge one.
> > > >
> > > > Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
> > >
> > > Hmm, maybe we could rely on OF data for trigger type?
> >
> > We might, even though the i2c core doesn't change the trigger type
> > when it retrieves the interrupt from the DT.
>
> i2c core itself does not, and should not, but irq code does:
>
> of_irq_get() -> irq_create_of_mapping() -> irq_create_fwspec_mapping()
> -> irqd_set_trigger_type().
Ah, indeed, I overlooked that. I wonder why platform_get_irq does it
then.
>
> >
> > However, I'm a bit worried about the other probing mechanims (ACPI,
> > board files) that should be supported as well, and removing the
> > trigger type from the flags might break those. There's no board files
> > using it though in the tree, but I don't know about ACPI systems.
>
> The driver is not enabled for ACPI systems, at least not in mainline.
Ok. Good.
> By the way, this is what TCA8418 binding dochas to say:
>
> "- interrupts: IRQ line number, should trigger on falling edge"
>
> so it seems there was at least one system that needed falling edge and
> not level interrupt.
I don't know, looking at the datasheet, it really looks like it's
level triggered to me, and we were actually seeing issues when set in
edge.
http://www.ti.com/lit/ds/symlink/tca8418.pdf
Especially page 20 and 33.
My understanding is that in input, the chip will trigger on edges, but
the line coming from that device to the SoC will be level triggered.
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
next prev parent reply other threads:[~2016-11-10 9:13 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-07 14:40 [PATCH] drivers: tca8418: Change the interrupt type Maxime Ripard
2016-11-09 0:04 ` Dmitry Torokhov
2016-11-09 8:02 ` Maxime Ripard
2016-11-10 4:02 ` Dmitry Torokhov
2016-11-10 9:13 ` Maxime Ripard [this message]
2016-11-12 1:24 ` Dmitry Torokhov
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=20161110091302.cjn4srrpxtg2mknv@lukather \
--to=maxime.ripard@free-electrons.com \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.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).