From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Svyatoslav Ryhel <clamor95@gmail.com>
Cc: Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Linus Walleij <linusw@kernel.org>,
linux-input@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1 2/2] Input: isa1200 - new driver for Imagis ISA1200
Date: Sat, 25 Apr 2026 21:28:20 -0700 [thread overview]
Message-ID: <ae2TswfLCEACzPcg@google.com> (raw)
In-Reply-To: <CAPVz0n2-JE6E10O_rFZYPSET62HfAz3Zw8vyNa8xoALQQJR7Xw@mail.gmail.com>
Hi Svyatoslav,
On Sat, Apr 25, 2026 at 08:26:00PM +0300, Svyatoslav Ryhel wrote:
> Hello Dmitry!
>
> I have a question regarding this sashiko comment
>
> > +static void isa1200_play_work(struct work_struct *work)
> > +{
> > + struct isa1200 *isa =
> > + container_of(work, struct isa1200, play_work);
> > +
> > + if (isa->level)
> > + isa1200_start(isa);
> > + else
> > + isa1200_stop(isa);
> > +}
> Because the driver tracks isa->level locklessly, if an effect starts
> and quickly stops, the workqueue might only execute once. When it
> executes, it sees isa->level == 0 and calls isa1200_stop(). Since
> isa1200_start() was never called for this effect,
> clk_disable_unprepare(isa->clk) will be invoked on an un-enabled
> clock. Does this unbalance the clock reference count?
>
> This is a valid comment, but I cannot find how this should be handled
> among all available haptic drivers. Maybe you can point me in the
> right direction?
Maybe have a flag reflecting the true (committed) state of the
controller that is both checked and updated in the work entity?
Thanks.
--
Dmitry
prev parent reply other threads:[~2026-04-26 4:28 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-24 7:13 [PATCH v1 0/2] input: misc: add support for Imagis ISA1200 haptic motor driver Svyatoslav Ryhel
2026-04-24 7:13 ` [PATCH v1 1/2] dt-bindings: input: Document " Svyatoslav Ryhel
2026-04-24 7:48 ` Linus Walleij
2026-04-24 8:30 ` Rob Herring (Arm)
2026-04-24 8:57 ` Svyatoslav Ryhel
2026-04-24 11:55 ` Rob Herring
2026-04-24 12:58 ` Svyatoslav Ryhel
2026-04-24 14:57 ` Rob Herring
2026-04-24 16:11 ` Svyatoslav Ryhel
2026-04-24 7:13 ` [PATCH v1 2/2] Input: isa1200 - new driver for Imagis ISA1200 Svyatoslav Ryhel
2026-04-24 15:31 ` Dmitry Torokhov
2026-04-24 16:01 ` Svyatoslav Ryhel
2026-04-25 17:26 ` Svyatoslav Ryhel
2026-04-26 4:28 ` Dmitry Torokhov [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=ae2TswfLCEACzPcg@google.com \
--to=dmitry.torokhov@gmail.com \
--cc=clamor95@gmail.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linusw@kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robh@kernel.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