From: sashiko-bot@kernel.org
To: "Qianhui Xu" <xiaqinghuan@mail.ustc.edu.cn>, linux-input@vger.kernel.org
Cc: devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org,
dmitry.torokhov@gmail.com
Subject: Re: [PATCH 5/5] Input: aw86927 - stop playback over suspend and on shutdown
Date: Tue, 27 Oct 2026 13:55:45 +0000 [thread overview]
Message-ID: <sashiko-outbox-186676@kernel.org> (raw)
In-Reply-To: <20261027132929.242158-6-xiaqinghuan@mail.ustc.edu.cn>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] Input: aw86927: missing devm_add_action_or_reset() for aw86927_reset()
--
commit becd63da0830df31ce436337adc571d6ea9ae15f
Author: Qianhui Xu <xiaqinghuan@mail.ustc.edu.cn>
Input: aw86927 - stop playback over suspend and on shutdown
This commit stops haptic playback, drains pending work, and parks the
chip in reset on shutdown, while also adding suspend and resume handlers
to prevent playback across system sleep.
> diff --git a/drivers/input/misc/aw86927.c b/drivers/input/misc/aw86927.c
> index e8fd880ac1ded..6d45c310a73fd 100644
> --- a/drivers/input/misc/aw86927.c
> +++ b/drivers/input/misc/aw86927.c
[ ... ]
> @@ -900,6 +909,58 @@ static int aw86927_probe(struct i2c_client *client)
> return 0;
> }
>
> +static void aw86927_reset(void *data)
> +{
> + struct aw86927_data *haptics = data;
> +
> + gpiod_set_value_cansleep(haptics->reset_gpio, 1);
> +}
> +
> +static void aw86927_shutdown(struct i2c_client *client)
> +{
> + struct aw86927_data *haptics = i2c_get_clientdata(client);
> +
> + disable_work_sync(&haptics->play_work);
> + aw86927_reset(haptics);
> +}
[Severity: Medium]
aw86927_reset() has the void (*)(void *) callback signature for
devm_add_action_or_reset(), but it is only called from aw86927_shutdown().
In aw86927_probe(), reset_gpio is acquired in the asserted state and then
deasserted by aw86927_hw_reset():
drivers/input/misc/aw86927.c:aw86927_probe() {
...
haptics->reset_gpio = devm_gpiod_get(haptics->dev, "reset", GPIOD_OUT_HIGH);
if (IS_ERR(haptics->reset_gpio))
return dev_err_probe(haptics->dev, PTR_ERR(haptics->reset_gpio),
"Failed to get reset gpio\n");
/* Hardware reset */
aw86927_hw_reset(haptics);
...
}
Should aw86927_reset() also be registered with devm_add_action_or_reset()
after aw86927_hw_reset() in aw86927_probe() so that the chip is placed back
into hardware reset if a subsequent step in aw86927_probe() fails or when
the driver is unbound?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261027132929.242158-1-xiaqinghuan@mail.ustc.edu.cn?part=5
prev parent reply other threads:[~2026-10-27 13:55 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-27 13:29 [PATCH 0/5] Input: aw86927 - add AW86937 support and fix the AW8693X layout Qianhui Xu
2026-10-27 13:29 ` [PATCH 1/5] Input: aw86927 - fix the 7 V boost reference for AW86938 Qianhui Xu
2026-10-27 13:29 ` [PATCH 2/5] dt-bindings: input: awinic,aw86927: document the AW86937 variant Qianhui Xu
2026-10-27 18:06 ` Krzysztof Kozlowski
2026-10-27 13:29 ` [PATCH 3/5] Input: aw86927 - add support for Awinic AW86937 Qianhui Xu
2026-10-27 13:29 ` [PATCH 4/5] Input: aw86927 - handle the AW8693X play and boost register layout Qianhui Xu
2026-10-27 13:37 ` sashiko-bot
2026-10-27 13:29 ` [PATCH 5/5] Input: aw86927 - stop playback over suspend and on shutdown Qianhui Xu
2026-10-27 13:55 ` sashiko-bot [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=sashiko-outbox-186676@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=xiaqinghuan@mail.ustc.edu.cn \
/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.