From: Jonathan Cameron <jic23@kernel.org>
To: Matti Vaittinen <mazziesaccount@gmail.com>
Cc: "Matti Vaittinen" <matti.vaittinen@linux.dev>,
"Matti Vaittinen" <matti.vaittinen@fi.rohmeurope.com>,
0012-iio-accel-kx022a-Fix-IPOL-macro-name.patch@mva-rohm,
"David Lechner" <dlechner@baylibre.com>,
"Nuno Sá" <nuno.sa@analog.com>,
"Andy Shevchenko" <andy@kernel.org>,
"Javier Carrasco" <javier.carrasco.cruz@gmail.com>,
"Mehdi Djait" <mehdi.djait.k@gmail.com>,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
"Kalle Niemi" <kaleposti@gmail.com>,
"Topi Sonkajärvi" <sonkajarvi@hotmail.com>
Subject: Re: [PATCH 12/12] iio: accel: kionix-kx022a: Fix IPOL macro name
Date: Tue, 18 Aug 2026 03:03:30 +0100 [thread overview]
Message-ID: <20260818030330.62158406@jic23-huawei> (raw)
In-Reply-To: <0498393a-1313-4781-8afc-6dab918233b6@gmail.com>
On Mon, 17 Aug 2026 14:43:18 +0300
Matti Vaittinen <mazziesaccount@gmail.com> wrote:
> On 17/08/2026 04:54, Jonathan Cameron wrote:
> > On Mon, 10 Aug 2026 10:55:25 +0300
> > Matti Vaittinen <matti.vaittinen@linux.dev> wrote:
> >
> >> From: Matti Vaittinen <mazziesaccount@gmail.com>
> >>
> >> The "interrupt polarity high" -macro for KX022A variant is defined as:
> >> However, the KX022A_MASK_IPOL1 is not defined anywhere, so actually
> >> using the KX022A_IPOL_HIGH would produce a compile error.
> >>
> >> Fix the define by using correct mask.
> >>
> >> Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com>
> >> Fixes: 7c1d1677b322 ("iio: accel: Support Kionix/ROHM KX022A accelerometer")
> >>
> >> ---
> >> It appears the KX022A_IPOL_HIGH is unused as the IRQ is currently,
> >> unconditionally set level low in kx022a_prepare_irq_pin(). The KX022A
> >> hardware would support other configurations though. So, another
> >> potential fix would be removing the define altogether. I decided to
> >> leave the define there, as having it will allow users who need different
> >> configuration to simply change the KX022A_IPOL_LOW to KX022A_IPOL_HIGH,
> >> which is kind of a "easy to try" thing.
> >
> > Handling interrupt polarity options at the device end is typically a
> > 'feature' rather than a must have given in most cases we don't have sharing
> > going on and these days interrupt controllers can cope with most types
> > of input. If anyone needs it they can propose support.
>
> I take this as a "please, drop the unused define rather than fix it".
Nope. I'm fine with fixing the define being there (fixed).
This was more of a comment on whether we should 'fix' whether we
ignored the flag from firmware or not.
>
> > Note I've never been happy with how we do this when we do support it
> > because the argument for letting DT set the polarity is there may be
> > not gates or similar in the path so the driver can't know, yet if we
> > read the type to set the polarity at the driver end we are saying we
> > do know there aren't any such not gate (trick for level shifting on
> > the cheap). I haven't figured out a better binding.
>
> I was more thinking of people who do downstream projects than a proper
> upstream support including nice mechanism to select appropriate
> polarity. It's quite easy to experiment (and carry a downstream patch)
> with one-line define change. Especially so when defines are already there.
I'd rather we support them properly if they actually need it.
Ideal case they'd ask even for a downstream project and at that time
we can add support - via the ugly path or maybe something better.
Jonathan
>
> Yours,
> -- Matti
>
prev parent reply other threads:[~2026-08-18 2:03 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-10 7:49 [PATCH 00/12] ROHM IIO fixes Matti Vaittinen
2026-08-10 7:49 ` [PATCH 01/12] iio: adc: rohm-bd79124: Fix rising alarm Matti Vaittinen
2026-08-17 1:17 ` Jonathan Cameron
2026-08-10 7:50 ` [PATCH 02/12] iio: adc: rohm-bd79124: Fix channel initialization Matti Vaittinen
2026-08-17 1:23 ` Jonathan Cameron
2026-08-10 7:50 ` [PATCH 03/12] iio: adc: rohm-bd79124: Fix GPIO mask check Matti Vaittinen
2026-08-17 1:23 ` Jonathan Cameron
2026-08-10 7:51 ` [PATCH 04/12] iio: adc: rohm-bd79124: Catch regmap errors at measurement start/stop Matti Vaittinen
2026-08-17 1:27 ` Jonathan Cameron
2026-08-10 7:51 ` [PATCH 05/12] iio: dac: rohm-bd79703: Do not allow writing SCALE Matti Vaittinen
2026-08-17 1:32 ` Jonathan Cameron
2026-08-17 5:06 ` Matti Vaittinen
2026-08-10 7:52 ` [PATCH 06/12] iio: pressure: rohm-bm1390: Return error when read fails Matti Vaittinen
2026-08-17 1:34 ` Jonathan Cameron
2026-08-10 7:53 ` [PATCH 07/12] iio: pressure: rohm-bm1390: Fix AVE_NUM initialization Matti Vaittinen
2026-08-10 20:06 ` Andy Shevchenko
2026-08-11 9:05 ` Matti Vaittinen
2026-08-11 10:08 ` Andy Shevchenko
2026-08-17 1:15 ` Jonathan Cameron
2026-09-16 5:26 ` Matti Vaittinen
2026-08-17 1:19 ` Jonathan Cameron
2026-08-17 5:43 ` Matti Vaittinen
2026-08-23 22:38 ` Jonathan Cameron
2026-08-17 1:12 ` Jonathan Cameron
2026-08-17 5:51 ` Matti Vaittinen
2026-08-18 2:01 ` Jonathan Cameron
2026-08-10 7:53 ` [PATCH 08/12] iio: light: rohm-bu27034: Fix error return Matti Vaittinen
2026-08-17 1:35 ` Jonathan Cameron
2026-08-10 7:54 ` [PATCH 09/12] iio: light: rohm-bu27034: Fix infinite delay on error Matti Vaittinen
2026-08-10 20:09 ` Andy Shevchenko
2026-08-11 9:07 ` Matti Vaittinen
2026-08-10 7:54 ` [PATCH 10/12] iio: accel: kionix-kx022a: Fix array boundary check Matti Vaittinen
2026-08-12 11:43 ` Mehdi Djait
2026-08-17 1:37 ` Jonathan Cameron
2026-08-10 7:55 ` [PATCH 11/12] iio: accel: kionix-kx022a: Prevent memory leak and fix state Matti Vaittinen
2026-08-12 11:47 ` [PATCH 11/12] iio: accel: kionix-kx022a: Prevent memory leak and fix statey Mehdi Djait
2026-08-14 7:39 ` Matti Vaittinen
2026-08-17 1:49 ` Jonathan Cameron
2026-08-17 1:45 ` [PATCH 11/12] iio: accel: kionix-kx022a: Prevent memory leak and fix state Jonathan Cameron
2026-08-17 11:37 ` Matti Vaittinen
2026-08-10 7:55 ` [PATCH 12/12] iio: accel: kionix-kx022a: Fix IPOL macro name Matti Vaittinen
2026-08-12 11:53 ` Mehdi Djait
2026-08-14 7:43 ` Matti Vaittinen
2026-08-17 1:54 ` Jonathan Cameron
2026-08-17 11:43 ` Matti Vaittinen
2026-08-18 2:03 ` Jonathan Cameron [this message]
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=20260818030330.62158406@jic23-huawei \
--to=jic23@kernel.org \
--cc=0012-iio-accel-kx022a-Fix-IPOL-macro-name.patch@mva-rohm \
--cc=andy@kernel.org \
--cc=dlechner@baylibre.com \
--cc=javier.carrasco.cruz@gmail.com \
--cc=kaleposti@gmail.com \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=matti.vaittinen@fi.rohmeurope.com \
--cc=matti.vaittinen@linux.dev \
--cc=mazziesaccount@gmail.com \
--cc=mehdi.djait.k@gmail.com \
--cc=nuno.sa@analog.com \
--cc=sonkajarvi@hotmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®