Devicetree
 help / color / mirror / Atom feed
From: netdev-bot+sashiko@kernel.org
To: arouhi@sitime.com
Cc: jiri@resnulli.us, ivecera@redhat.com, vadim.fedorenko@linux.dev,
	arkadiusz.kubalewski@intel.com, kuba@kernel.org,
	pabeni@redhat.com, robh@kernel.org, krzk+dt@kernel.org,
	conor+dt@kernel.org, prabhakar.mahadev-lad.rj@bp.renesas.com,
	cjubran@nvidia.com, Oleg.Zadorozhnyi@devoxsoftware.com,
	netdev@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next v17 05/13] dpll: sit9531x: read DPLL types and pin properties from system firmware
Date: Thu, 03 Dec 2026 00:39:05 +0000	[thread overview]
Message-ID: <179625834542.3146.8144227807378729978@kernel.org> (raw)
In-Reply-To: <20261201235202.97645-6-arouhi@sitime.com>

Thank you for your contribution! Sashiko AI review found more severe
issue(s) in other patches of this series. This mail is only an FYI, in case
you want to address the nit picks below when you respin.

Low priority / nit picks for your consideration:

- [Low] Concern: sit9531x_input_pin_label() picks the 'IN<k>' or
  'IN<k>P/N' label from sitdev->ref[id].sig_mode, which nothing at this…

--

dpll: sit9531x: read DPLL types and pin properties from system firmware

This commit adds prop.c. It reads the DPLL type from the firmware node
and, for each pin, its label, connection type and supported frequencies,
with defaults for pins whose node gives none of them. Input pins are
labeled from the signal mode of their pair, and outputs get OUTn labels
plus the datasheet output rates when no rates are listed.

> diff --git a/drivers/dpll/sit9531x/prop.c b/drivers/dpll/sit9531x/prop.c
> new file mode 100644
> index 0000000000000..495bed45c2384
> --- /dev/null
> +++ b/drivers/dpll/sit9531x/prop.c
> @@ -0,0 +1,350 @@

[ ... ]

> +static void sit9531x_input_pin_label(struct sit9531x_dev *sitdev,
> +				     struct sit9531x_pin_props *props, u8 id)
> +{
> +	u8 pair = sit9531x_input_pair(id);
> +
> +	if (sitdev->ref[id].sig_mode == SIT9531X_MODE_DE)
> +		snprintf(props->package_label,
> +			 sizeof(props->package_label), "IN%u", pair);
> +	else
> +		snprintf(props->package_label,
> +			 sizeof(props->package_label), "IN%u%c", pair,
> +			 sit9531x_input_is_n(id) ? 'N' : 'P');
> +}

[Severity: Low]
At this commit, does anything write sitdev->ref[].sig_mode?

The field is added to struct sit9531x_ref in core.h, and
sit9531x_input_pin_label() is its only reader. Nothing in this patch
sets it, so every pair would read as SIT9531X_MODE_SE (0). Each pin
would then get the IN<n>P/IN<n>N label, even for a differential pair.

This doesn't look observable in practice. No caller of
sit9531x_pin_props_get() exists yet. The later patch "dpll: sit9531x:
register DPLL devices and pins" adds the first caller. It also adds
sit9531x_input_mode_fetch(), which sets both lanes of each pair:

    sitdev->ref[pair * 2].sig_mode = sig_mode;
    sitdev->ref[pair * 2 + 1].sig_mode = sig_mode;

That patch also skips the N lane of a differential pair in
sit9531x_input_pin_is_registrable().

Would it be clearer to add sig_mode in the same patch as the code that
fills it in? Or could the kernel-doc here say where the value comes from
(CLKINx_INPUT_MODE), as it does at the end of the series?

-- 
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261201235202.97645-1-arouhi%40sitime.com

  reply	other threads:[~2026-12-03  0:39 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-01 23:52 [PATCH net-next v17 00/13] dpll: add SiTime SiT9531x DPLL clock driver Ali Rouhi
2026-12-01 23:52 ` [PATCH net-next v17 01/13] dpll: omit pin phase attributes the driver has no value for Ali Rouhi
2026-12-01 23:52 ` [PATCH net-next v17 02/13] dt-bindings: vendor-prefixes: add SiTime Corporation Ali Rouhi
2026-12-01 23:52 ` [PATCH net-next v17 03/13] dt-bindings: dpll: add SiTime SiT95316 clock generator Ali Rouhi
2026-12-03  0:39   ` netdev-bot+sashiko
2026-12-01 23:52 ` [PATCH net-next v17 04/13] dpll: add basic SiTime SiT9531x support Ali Rouhi
2026-12-03  0:39   ` netdev-bot+sashiko
2026-12-01 23:52 ` [PATCH net-next v17 05/13] dpll: sit9531x: read DPLL types and pin properties from system firmware Ali Rouhi
2026-12-03  0:39   ` netdev-bot+sashiko [this message]
2026-12-01 23:52 ` [PATCH net-next v17 06/13] dpll: sit9531x: register DPLL devices and pins Ali Rouhi
2026-12-03  0:39   ` netdev-bot+sashiko
2026-12-01 23:52 ` [PATCH net-next v17 07/13] dpll: sit9531x: implement input pin state on a DPLL Ali Rouhi
2026-12-02 23:52   ` sashiko-bot
2026-12-03  0:39   ` netdev-bot+sashiko
2026-12-01 23:52 ` [PATCH net-next v17 08/13] dpll: sit9531x: add support to get and set priority on input pins Ali Rouhi
2026-12-02 23:52   ` sashiko-bot
2026-12-03  0:39   ` netdev-bot+sashiko
2026-12-01 23:52 ` [PATCH net-next v17 10/13] dpll: sit9531x: implement output pin state on a DPLL Ali Rouhi
2026-12-03  0:39   ` netdev-bot+sashiko
2026-12-01 23:52 ` [PATCH net-next v17 09/13] dpll: sit9531x: add support to get and set frequency on pins Ali Rouhi
2026-12-03  0:39   ` netdev-bot+sashiko
2026-12-01 23:52 ` [PATCH net-next v17 11/13] dpll: sit9531x: add support to adjust output phase Ali Rouhi
2026-12-02 23:52   ` sashiko-bot
2026-12-03  0:39   ` netdev-bot+sashiko
2026-12-01 23:52 ` [PATCH net-next v17 12/13] dpll: sit9531x: add support to get phase offset on the connected input Ali Rouhi
2026-12-03  0:39   ` netdev-bot+sashiko
2026-12-01 23:52 ` [PATCH net-next v17 13/13] dpll: sit9531x: model the inter-PLL sync line as a pair of pins Ali Rouhi
2026-12-02 23:53   ` sashiko-bot
2026-12-03  0:39   ` netdev-bot+sashiko

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=179625834542.3146.8144227807378729978@kernel.org \
    --to=netdev-bot+sashiko@kernel.org \
    --cc=Oleg.Zadorozhnyi@devoxsoftware.com \
    --cc=arkadiusz.kubalewski@intel.com \
    --cc=arouhi@sitime.com \
    --cc=cjubran@nvidia.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=ivecera@redhat.com \
    --cc=jiri@resnulli.us \
    --cc=krzk+dt@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
    --cc=robh@kernel.org \
    --cc=vadim.fedorenko@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox