From: Jonathan Cameron <jic23@kernel.org>
To: Esben Haabendal <esben@geanix.com>
Cc: "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,
"Joshua Crofts" <joshua.crofts1@gmail.com>,
"Andy Shevchenko" <andriy.shevchenko@intel.com>
Subject: Re: [PATCH v4 2/6] iio: accel: mma8452: Optimize struct mm8452_data member orders
Date: Sat, 15 Aug 2026 05:13:56 +0100 [thread overview]
Message-ID: <20260815051356.4dac350e@jic23-huawei> (raw)
In-Reply-To: <20260812-mma8452-open-drain-v4-2-bfca15d02b59@geanix.com>
On Wed, 12 Aug 2026 16:30:33 +0200
Esben Haabendal <esben@geanix.com> wrote:
> Reorder struct mma8452_data members to avoid holes.
Trivial but sashiko pointed out mm[a]_8452 in the title.
I'll tidy that up if nothing significant comes up.
Interestingly Sashiko also thinks it found a deadlock.
Given you are working with this driver if you have time could
you take a look at that.
https://sashiko.dev/#/patchset/20260812-mma8452-open-drain-v4-0-bfca15d02b59%40geanix.com
I'm rather surprised to see the lock taken in the runtime
pm suspend callback. It is probably there to close a race
where the device is being suspended and the sampling
frequency is being written. I'm not immediately sure what
the best way to fix it is. One thing that would work is to
do pm_runtime_get* to raise the reference counter and stop
there being any chance of an autosuspend.
Jonathan
>
> Reviewed-by: Joshua Crofts <joshua.crofts1@gmail.com>
> Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
> Signed-off-by: Esben Haabendal <esben@geanix.com>
> ---
> drivers/iio/accel/mma8452.c | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/iio/accel/mma8452.c b/drivers/iio/accel/mma8452.c
> index 7d683686dd9d..f645a5c6fd1c 100644
> --- a/drivers/iio/accel/mma8452.c
> +++ b/drivers/iio/accel/mma8452.c
> @@ -106,10 +106,7 @@ struct mma8452_data {
> struct i2c_client *client;
> struct mutex lock;
> struct iio_mount_matrix orientation;
> - u8 ctrl_reg1;
> - u8 data_cfg;
> const struct mma_chip_info *chip_info;
> - int sleep_val;
> struct regulator *vdd_reg;
> struct regulator *vddio_reg;
>
> @@ -118,6 +115,10 @@ struct mma8452_data {
> __be16 channels[3];
> aligned_s64 ts;
> } buffer;
> +
> + int sleep_val;
> + u8 ctrl_reg1;
> + u8 data_cfg;
> };
>
> /**
>
next prev parent reply other threads:[~2026-08-15 4:14 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-12 14:30 [PATCH v4 0/6] io: accel: mma8452: Allow open drain interrupt pin configuration Esben Haabendal
2026-08-12 14:30 ` [PATCH v4 1/6] dt-bindings: iio: accel: mma8452: Add drive-open-drain Esben Haabendal
2026-08-12 15:00 ` sashiko-bot
2026-08-12 14:30 ` [PATCH v4 2/6] iio: accel: mma8452: Optimize struct mm8452_data member orders Esben Haabendal
2026-08-12 15:12 ` sashiko-bot
2026-08-15 4:13 ` Jonathan Cameron [this message]
2026-08-12 14:30 ` [PATCH v4 3/6] iio: accel: mma8452: Only apply trigger type when not set by firmware Esben Haabendal
2026-08-12 15:23 ` sashiko-bot
2026-08-12 14:30 ` [PATCH v4 4/6] iio: accel: mma8452: Support interrupt sharing Esben Haabendal
2026-08-12 15:34 ` sashiko-bot
2026-08-14 8:09 ` Andy Shevchenko
2026-08-15 19:33 ` Jonathan Cameron
2026-08-12 14:30 ` [PATCH v4 5/6] iio: accel: mma8452: Allow open drain interrupt pin configuration Esben Haabendal
2026-08-12 15:46 ` sashiko-bot
2026-08-12 14:30 ` [PATCH v4 6/6] iio: accel: mma8452: Reuse existing dev pointer in mma8452_probe() Esben Haabendal
2026-08-12 15:56 ` sashiko-bot
2026-08-14 8:07 ` Andy Shevchenko
2026-08-14 12:56 ` Esben Haabendal
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=20260815051356.4dac350e@jic23-huawei \
--to=jic23@kernel.org \
--cc=andriy.shevchenko@intel.com \
--cc=andy@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dlechner@baylibre.com \
--cc=esben@geanix.com \
--cc=joshua.crofts1@gmail.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox