From: sashiko-bot@kernel.org
To: "Ali Rouhi" <arouhi@sitime.com>
Cc: "devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH net-next v16 10/13] dpll: sit9531x: implement output pin state on a DPLL
Date: Fri, 20 Nov 2026 22:58:32 +0000 [thread overview]
Message-ID: <sashiko-outbox-226326@kernel.org> (raw)
In-Reply-To: <20261119225752.41846-11-arouhi@sitime.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] dpll: sit9531x: missing unmute rollback in
sit9531x_output_hiz_write()
--
commit 0e3fab69e8ec41357c5e926188ccf70841ddc72f
Author: Oleg Zadorozhnyi <Oleg.Zadorozhnyi@devoxsoftware.com>
dpll: sit9531x: implement output pin state on a DPLL
This commit implements the DPLL state get and set callbacks for SiT9531x
output pins by forcing or releasing the slot's Hi-Z pad overrides, and
enables output pin registration.
> diff --git a/drivers/dpll/sit9531x/core.c b/drivers/dpll/sit9531x/core.c
> index d3f6955b3bbd0..eb1d10e1fde2e 100644
> --- a/drivers/dpll/sit9531x/core.c
> +++ b/drivers/dpll/sit9531x/core.c
[ ... ]
> +static int sit9531x_output_hiz_write(struct sit9531x_dev *sitdev, u8 slot,
> + bool mute, u8 keep)
> {
> - int rc, rc2 = 0, rc3;
> - u8 attempt;
> + u8 mask[SIT9531X_HIZ_PAIRS], state[SIT9531X_HIZ_PAIRS];
> + struct sit9531x_hiz_pair p[SIT9531X_HIZ_PAIRS];
> + int i, rc, undo_rc;
>
> - rc = sit9531x_write_u8(sitdev, SIT9531X_REG_PRG_DIR_GEN,
> - SIT9531X_UPDATE_NVM);
> + sit9531x_output_get_hiz_regs(slot, p);
>
> - for (attempt = 0; attempt < SIT9531X_LOOP_LOCK_TRIES; attempt++) {
> - rc2 = sit9531x_write_u8(sitdev, SIT9531X_REG_PRG_DIR_GEN,
> - SIT9531X_LOOP_LOCK);
> - if (!rc2)
> - break;
> - usleep_range(1000, 2000);
> + if (!mute) {
> + for (i = 0; i < SIT9531X_HIZ_PAIRS; i++) {
> + /* A pad the loaded configuration forces stays forced */
> + if (keep & BIT(i))
> + continue;
> + rc = sit9531x_hiz_set_bit(sitdev, p[i].mask, p[i].bit,
> + false);
> + if (rc)
> + return rc;
> + }
> + return 0;
> }
[Severity: Medium]
Should the !mute branch roll back the mask bits cleared in earlier
iterations when sit9531x_hiz_set_bit() fails, just as the mute branch
does?
On a muted CMOS output where clearing SIT9531X_HIZ_CMOS_P succeeds and
clearing SIT9531X_HIZ_CMOS_N fails, the hardware is left partially
unmuted with OutP driving and OutN still forced to Hi-Z. The subsequent
readback in sit9531x_output_forced_hiz() computes muted = pad_p && pad_n
as false, so sit9531x_output_enable() sets out->enabled = true and
sit9531x_dpll_output_pin_state_on_dpll_set() fails the request while
sending a notification that reports the pin as DPLL_PIN_STATE_CONNECTED.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261119225752.41846-1-arouhi@sitime.com?part=10
next prev parent reply other threads:[~2026-11-20 22:58 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-19 22:57 [PATCH net-next v16 00/13] dpll: add SiTime SiT9531x DPLL clock driver Ali Rouhi
2026-11-19 22:57 ` [PATCH net-next v16 02/13] dt-bindings: vendor-prefixes: add SiTime Corporation Ali Rouhi
2026-11-19 22:57 ` [PATCH net-next v16 01/13] dpll: omit pin phase attributes the driver has no value for Ali Rouhi
2026-11-19 22:57 ` [PATCH net-next v16 03/13] dt-bindings: dpll: add SiTime SiT95316 clock generator Ali Rouhi
2026-11-19 22:57 ` [PATCH net-next v16 04/13] dpll: add basic SiTime SiT9531x support Ali Rouhi
2026-11-20 22:58 ` sashiko-bot
2026-11-19 22:57 ` [PATCH net-next v16 05/13] dpll: sit9531x: read DPLL types and pin properties from system firmware Ali Rouhi
2026-11-19 22:57 ` [PATCH net-next v16 06/13] dpll: sit9531x: register DPLL devices and pins Ali Rouhi
2026-11-20 22:58 ` sashiko-bot
2026-11-19 22:57 ` [PATCH net-next v16 07/13] dpll: sit9531x: implement input pin state on a DPLL Ali Rouhi
2026-11-20 22:58 ` sashiko-bot
2026-11-19 22:57 ` [PATCH net-next v16 08/13] dpll: sit9531x: add support to get and set priority on input pins Ali Rouhi
2026-11-19 22:57 ` [PATCH net-next v16 10/13] dpll: sit9531x: implement output pin state on a DPLL Ali Rouhi
2026-11-20 22:58 ` sashiko-bot [this message]
2026-11-19 22:57 ` [PATCH net-next v16 09/13] dpll: sit9531x: add support to get and set frequency on pins Ali Rouhi
2026-11-20 22:58 ` sashiko-bot
2026-11-19 22:58 ` [PATCH net-next v16 11/13] dpll: sit9531x: add support to adjust output phase Ali Rouhi
2026-11-20 22:58 ` sashiko-bot
2026-11-19 22:58 ` [PATCH net-next v16 12/13] dpll: sit9531x: add support to get phase offset on the connected input Ali Rouhi
2026-11-19 22:58 ` [PATCH net-next v16 13/13] dpll: sit9531x: model the inter-PLL sync line as a pair of pins Ali Rouhi
2026-11-20 22:58 ` 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-226326@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=arouhi@sitime.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=robh@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.