All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Emfox Zhou" <emfox@debian.org>
Cc: linux-input@vger.kernel.org, dmitry.torokhov@gmail.com
Subject: Re: [PATCH v2 1/5] HID: intel-thc-hid: intel-ipts: bring up the port
Date: Sat, 14 Nov 2026 17:20:38 +0000	[thread overview]
Message-ID: <sashiko-outbox-214831@kernel.org> (raw)
In-Reply-To: <20261114170740.2068179-2-emfox@debian.org>

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] HID: intel-thc-hid: intel-ipts: set idev->running in
  thc_ipts_port_start()
--

commit 603b533dc41071ba0e983a0108dc8c85c96dd22a
Author: Emfox Zhou <emfox@debian.org>

HID: intel-thc-hid: intel-ipts: bring up the port

This commit adds a PCI driver for Intel Touch Host Controller ports in
IPTS mode that brings up the SPI port, reads the controller configuration
block, configures SPI timing, and enables the touch engine.

> diff --git a/drivers/hid/intel-thc-hid/intel-ipts/ipts.c b/drivers/hid/intel-thc-hid/intel-ipts/ipts.c
> new file mode 100644
> index 0000000000000..f139b8f9443d0
> --- /dev/null
> +++ b/drivers/hid/intel-thc-hid/intel-ipts/ipts.c

[ ... ]

> +int thc_ipts_port_start(struct thc_ipts *idev)
> +{

[ ... ]

> +	ret = thc_ipts_touch_set(idev, true);
> +	if (ret)
> +		return ret;
> +
> +	return 0;
> +}
> +
> +/**
> + * thc_ipts_port_stop - tear one port down
> + * @idev: port to stop
> + */
> +void thc_ipts_port_stop(struct thc_ipts *idev)
> +{
> +	if (!idev->thc)
> +		return;
> +
> +	if (idev->running)
> +		thc_ipts_touch_set(idev, false);
> +
> +	idev->running = false;
> +	regmap_clear_bits(idev->thc->thc_regmap,
> +			  THC_M_PRT_CONTROL_OFFSET,
> +			  THC_M_PRT_CONTROL_DEVRST);
> +	thc_ipts_quiesce(idev, true);
> +}

[Severity: Medium]
Should thc_ipts_port_start() set idev->running to true after
thc_ipts_touch_set(idev, true) succeeds?  Without that, idev->running is
never set in this commit, so thc_ipts_port_stop() skips disabling and
powering down the touch engine before asserting hardware reset on driver
removal or shutdown.  Note that a later patch in the series, commit
"HID: intel-thc-hid: intel-ipts: receive reports", adds this assignment.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261114170740.2068179-1-emfox@debian.org?part=1

  reply	other threads:[~2026-11-14 17:20 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-14 17:07 [PATCH v2 0/5] HID: intel-thc-hid: intel-ipts: support THC IPTS ports Emfox Zhou
2026-11-14 17:07 ` [PATCH v2 1/5] HID: intel-thc-hid: intel-ipts: bring up the port Emfox Zhou
2026-11-14 17:20   ` sashiko-bot [this message]
2026-11-14 17:07 ` [PATCH v2 2/5] HID: intel-thc-hid: intel-ipts: receive reports Emfox Zhou
2026-11-14 17:35   ` sashiko-bot
2026-11-14 17:07 ` [PATCH v2 3/5] HID: intel-thc-hid: intel-ipts: register the HID device Emfox Zhou
2026-11-14 17:32   ` sashiko-bot
2026-11-14 17:07 ` [PATCH v2 4/5] HID: intel-thc-hid: intel-ipts: handle system sleep Emfox Zhou
2026-11-14 17:07 ` [PATCH v2 5/5] HID: intel-thc-hid: intel-ipts: document the IPTS mode Emfox Zhou
2026-11-14 17:24   ` sashiko-bot

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-214831@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=emfox@debian.org \
    --cc=linux-input@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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.