From: sashiko-bot@kernel.org
To: "Emfox Zhou" <emfox@debian.org>
Cc: linux-input@vger.kernel.org, dmitry.torokhov@gmail.com
Subject: Re: [PATCH v11 1/6] HID: intel-thc-hid: intel-thc: expose the port operations IPTS needs
Date: Thu, 03 Dec 2026 02:11:14 +0000 [thread overview]
Message-ID: <sashiko-outbox-246970@kernel.org> (raw)
In-Reply-To: <20261203020433.2631656-1-emfox@debian.org>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] HID: intel-thc: thc_port_reset() misnamed for Touch IC reset
operation
--
commit a15fdd771faccc457564c8d773289aea962cca03
Author: Emfox Zhou <emfox@debian.org>
HID: intel-thc-hid: intel-thc: expose the port operations IPTS needs
This commit adds and exports thc_port_supported() and thc_port_reset() so
clients can check the port capability bit and drive the touch controller
reset pin via THC_M_PRT_CONTROL.
> diff --git a/drivers/hid/intel-thc-hid/intel-thc/intel-thc-dev.c b/drivers/hid/intel-thc-hid/intel-thc/intel-thc-dev.c
> index 03d3b60b35cf1..c7d4959153e94 100644
> --- a/drivers/hid/intel-thc-hid/intel-thc/intel-thc-dev.c
> +++ b/drivers/hid/intel-thc-hid/intel-thc/intel-thc-dev.c
> @@ -1111,6 +1111,64 @@ int thc_port_select(struct thc_device *dev, enum thc_port_type port_type)
[ ... ]
> +/**
> + * thc_port_reset - Drive the reset line of the touch IC
> + *
> + * @dev: the pointer of THC private device context
> + * @hold: keep the touch IC in reset instead of releasing it
> + *
> + * The reset bit of the port control register drives the reset pin of the
> + * touch IC: zero asserts the reset, one releases it. Firmware may leave
> + * the pin released, so a start asserts it and then lets it go rather than
> + * assume it was held.
> + *
> + * Return: 0 on success, other error codes on failed
> + */
> +int thc_port_reset(struct thc_device *dev, bool hold)
> +{
> + int ret;
> +
> + /* DEVRST: 0 asserts the reset, 1 releases it. */
> + ret = regmap_write_bits(dev->thc_regmap, THC_M_PRT_CONTROL_OFFSET,
> + THC_M_PRT_CONTROL_DEVRST, 0);
> + if (ret || hold)
> + return ret;
> +
> + usleep_range(1000, 2000);
> +
> + return regmap_write_bits(dev->thc_regmap, THC_M_PRT_CONTROL_OFFSET,
> + THC_M_PRT_CONTROL_DEVRST,
> + THC_M_PRT_CONTROL_DEVRST);
> +}
> +EXPORT_SYMBOL_NS_GPL(thc_port_reset, "INTEL_THC");
[Severity: Low]
As reported by Xu, Even on v10 [1], should thc_port_reset() be named
thc_tic_reset() instead?
THC_M_PRT_CONTROL_DEVRST drives the external Touch IC (TIC) reset pin
rather than resetting the THC port itself (which has its own soft-reset
bit THC_M_PRT_CONTROL_TSFTRST), and existing Touch IC helpers in this file
use the thc_tic_ prefix (thc_tic_pio_read(), thc_tic_pio_write(),
thc_tic_pio_write_and_read()).
[1] https://lore.kernel.org/r/SJ0PR11MB7704E6861DD87DC5483395B5F44C2@SJ0PR11MB7704.namprd11.prod.outlook.com
--
Sashiko AI review · https://sashiko.dev/#/patchset/cover.1796215044.git.emfox@debian.org?part=1
next prev parent reply other threads:[~2026-12-03 2:11 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-03 2:04 [PATCH v11 0/6] HID: intel-thc-hid: intel-ipts: support THC IPTS ports Emfox Zhou
2026-12-03 2:04 ` [PATCH v11 1/6] HID: intel-thc-hid: intel-thc: expose the port operations IPTS needs Emfox Zhou
2026-12-03 2:11 ` sashiko-bot [this message]
2026-12-03 2:04 ` [PATCH v11 2/6] HID: intel-thc-hid: intel-ipts: bring up the port Emfox Zhou
2026-12-03 2:15 ` sashiko-bot
2026-12-03 2:04 ` [PATCH v11 3/6] HID: intel-thc-hid: intel-ipts: receive reports Emfox Zhou
2026-12-03 2:26 ` sashiko-bot
2026-12-03 2:04 ` [PATCH v11 4/6] HID: intel-thc-hid: intel-ipts: add the HID device Emfox Zhou
2026-12-03 2:04 ` [PATCH v11 5/6] HID: intel-thc-hid: intel-ipts: handle system sleep Emfox Zhou
2026-12-03 2:04 ` [PATCH v11 6/6] HID: intel-thc-hid: intel-ipts: document the IPTS mode Emfox Zhou
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-246970@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.