From: Linus Walleij <linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
To: Lorenzo Bianconi
<lorenzo.bianconi83-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Jonathan Cameron <jic23-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
"linux-iio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-iio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
Lorenzo BIANCONI <lorenzo.bianconi-qxv4g6HH51o@public.gmane.org>
Subject: Re: [PATCH 1/2] iio: imu: st_lsm6dsx: support open drain mode
Date: Thu, 29 Jun 2017 13:46:32 +0200 [thread overview]
Message-ID: <CACRpkdYLbHrNehFeJZDAHoOfegBJqqTesJUrXSALNqGLPT_SPA@mail.gmail.com> (raw)
In-Reply-To: <CAA2SeNJ5yPqMiW2tVSc9ZSC5Rt=Q+CRoMibzigjvPyw05Qsr5Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
On Sun, Jun 25, 2017 at 11:34 AM, Lorenzo Bianconi
<lorenzo.bianconi83-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>> In common with the mpu3050 which was the first driver in IIO to do open drain,
I think I implemented it on the ST sensors first actually.
>> I think you need to think about precedence as we allow for IRQF_RISING
>> and IRQF_FALLING already. Open drain only allows for shared interrupts
>> if IRQF_FALLING (I think)
>>> err = devm_request_threaded_irq(hw->dev, hw->irq,
>>> st_lsm6dsx_handler_irq,
>>> st_lsm6dsx_handler_thread,
>
> I have not got the difference between IRQF_RISING and IRQF_FALLING
> when the irq line
> is marked as shared (when open drain is enabled).
> Looking at the code, mpu3050 gyro sensor does not support shared interrupts
> with IRQF_RISING and IRQF_TRIGGER_HIGH. Is it a hw limitation?
It seems like I have inverted the logic in the MPU3050 driver.
I'll send a patch.
> Speaking with digital designer, lsm6dsx series allows open drain mode
> even if the requested irq line
> is IRQF_TRIGGER_HIGH or IRQF_RISING, we need to add a pull-down resistor.
> Moreover ST framework already supports open drain if the requested
> interrupt is IRQF_RISING.
This seems correct.
Yours,
Linus Walleij
next prev parent reply other threads:[~2017-06-29 11:46 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-21 19:21 [PATCH 0/2] Add open drain support to st_lsm6dsx Lorenzo Bianconi
[not found] ` <20170621192129.10226-1-lorenzo.bianconi-qxv4g6HH51o@public.gmane.org>
2017-06-21 19:21 ` [PATCH 1/2] iio: imu: st_lsm6dsx: support open drain mode Lorenzo Bianconi
[not found] ` <20170621192129.10226-2-lorenzo.bianconi-qxv4g6HH51o@public.gmane.org>
2017-06-24 20:08 ` Jonathan Cameron
[not found] ` <20170624210835.56ffdd1c-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2017-06-25 9:34 ` Lorenzo Bianconi
[not found] ` <CAA2SeNJ5yPqMiW2tVSc9ZSC5Rt=Q+CRoMibzigjvPyw05Qsr5Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-06-25 16:01 ` Jonathan Cameron
2017-06-29 11:46 ` Linus Walleij [this message]
2017-06-21 19:21 ` [PATCH 2/2] dt-bindings: " Lorenzo Bianconi
[not found] ` <20170621192129.10226-3-lorenzo.bianconi-qxv4g6HH51o@public.gmane.org>
2017-06-25 16:03 ` Jonathan Cameron
2017-06-26 18:24 ` Rob Herring
2017-06-30 18:22 ` Jonathan Cameron
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=CACRpkdYLbHrNehFeJZDAHoOfegBJqqTesJUrXSALNqGLPT_SPA@mail.gmail.com \
--to=linus.walleij-qsej5fyqhm4dnm+yrofe0a@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=jic23-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=linux-iio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=lorenzo.bianconi-qxv4g6HH51o@public.gmane.org \
--cc=lorenzo.bianconi83-Re5JQEeQqe8AvxtiuMwx3w@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).