From: Esben Haabendal <esben@geanix.com>
To: "Andy Shevchenko" <andriy.shevchenko@intel.com>
Cc: "Jonathan Cameron" <jic23@kernel.org>,
"Lars-Peter Clausen" <lars@metafoo.de>,
"Rob Herring" <robh@kernel.org>,
"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
"Conor Dooley" <conor+dt@kernel.org>,
"Martin Kepplinger" <martink@posteo.de>,
"Sean Nyekjaer" <sean@geanix.com>,
"David Lechner" <dlechner@baylibre.com>,
"Nuno Sá" <nuno.sa@analog.com>,
"Andy Shevchenko" <andy@kernel.org>,
"Martin Kepplinger" <martin.kepplinger@theobroma-systems.com>,
linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 3/4] iio: accel: mma8452: Only apply trigger type when not set by firmware
Date: Wed, 12 Aug 2026 15:23:55 +0200 [thread overview]
Message-ID: <87se4jwjys.fsf@geanix.com> (raw)
In-Reply-To: <anorldy1yxtBMygX@ashevche-desk.local> (Andy Shevchenko's message of "Mon, 10 Aug 2026 22:50:45 +0300")
"Andy Shevchenko" <andriy.shevchenko@intel.com> writes:
> On Wed, Aug 05, 2026 at 09:21:37AM +0200, Esben Haabendal wrote:
>> Instead of unconditionally overriding the trigger type, it is better to
>> only apply a default when no trigger type is set by firmware. This should
>> be reasonably backward compatible, and should only potentially cause
>> problems if systems exist where firmware specifies an incorrect trigger
>> type. With a bit of luck, there are no such systems.
>
> Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
>
> ...
>
>> if (client->irq) {
>> + unsigned long irq_flags;
>> +
>> + irq_flags = irq_get_trigger_type(client->irq);
>> + if (irq_flags == IRQ_TYPE_NONE)
>> + irq_flags = IRQF_TRIGGER_LOW;
>
> I would even add info message or so that FW lacks of the proper IRQ type.
> But it's up to you, most of the code that I saw and does something similar
> does not print anything in this case.
I agree. That seems like a nice improvement. I will add that for v4.
>> + irq_flags |= IRQF_ONESHOT;
>> ret = request_threaded_irq(client->irq, NULL, mma8452_interrupt,
>> - IRQF_TRIGGER_LOW | IRQF_ONESHOT,
>> - client->name, indio_dev);
>> + irq_flags, client->name, indio_dev);
/Esben
next prev parent reply other threads:[~2026-08-12 13:24 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-05 7:21 [PATCH v3 0/4] io: accel: mma8452: Allow open drain interrupt pin configuration Esben Haabendal
2026-08-05 7:21 ` [PATCH v3 1/4] dt-bindings: iio: accel: mma8452: Add drive-open-drain Esben Haabendal
2026-08-05 7:21 ` [PATCH v3 2/4] iio: accel: mma8452: Optimize struct mm8452_data member orders Esben Haabendal
2026-08-10 19:47 ` Andy Shevchenko
2026-08-05 7:21 ` [PATCH v3 3/4] iio: accel: mma8452: Only apply trigger type when not set by firmware Esben Haabendal
2026-08-05 7:33 ` sashiko-bot
2026-08-10 19:50 ` Andy Shevchenko
2026-08-12 13:23 ` Esben Haabendal [this message]
2026-08-05 7:21 ` [PATCH v3 4/4] iio: accel: mma8452: Allow open drain interrupt pin configuration Esben Haabendal
2026-08-05 7:41 ` sashiko-bot
2026-08-05 11:55 ` Esben Haabendal
2026-08-10 19:51 ` Andy Shevchenko
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=87se4jwjys.fsf@geanix.com \
--to=esben@geanix.com \
--cc=andriy.shevchenko@intel.com \
--cc=andy@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dlechner@baylibre.com \
--cc=jic23@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=martin.kepplinger@theobroma-systems.com \
--cc=martink@posteo.de \
--cc=nuno.sa@analog.com \
--cc=robh@kernel.org \
--cc=sean@geanix.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.