devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Boyd <sboyd@kernel.org>
To: Shengjiu Wang <shengjiu.wang@gmail.com>
Cc: Shengjiu Wang <shengjiu.wang@nxp.com>,
	abelvesa@kernel.org, conor+dt@kernel.org, festevam@gmail.com,
	kernel@pengutronix.de, krzysztof.kozlowski+dt@linaro.org,
	linux-imx@nxp.com, mturquette@baylibre.com, peng.fan@nxp.com,
	robh+dt@kernel.org, s.hauer@pengutronix.de, shawnguo@kernel.org,
	linux-clk@vger.kernel.org, devicetree@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v5 3/3] clk: imx: imx8: add audio clock mux driver
Date: Thu, 20 Jul 2023 11:21:11 -0700	[thread overview]
Message-ID: <6f9a6f0a4d43492604503098313c32f3.sboyd@kernel.org> (raw)
In-Reply-To: <CAA+D8APd3n8XvC3m5fAoPxqqLzaU-RKm+e9y_G++D6KdaJJhiQ@mail.gmail.com>

Quoting Shengjiu Wang (2023-07-20 00:31:05)
> On Thu, Jul 20, 2023 at 4:17 AM Stephen Boyd <sboyd@kernel.org> wrote:
>     Quoting Shengjiu Wang (2023-07-14 01:10:59)
>     > +/**
>     > + * struct imx8_acm_soc_data: soc specific data
>     > + * @sels: pointer to struct clk_imx8_acm_sel
>     > + * @num_sels: numbers of items
>     > + */
>     > +struct imx8_acm_soc_data {
>     > +       struct clk_imx8_acm_sel *sels;
>     > +       unsigned int num_sels;
>     > +};
>     > +
>     > +/**
>     > + * struct imx8_acm_priv: private structure
> 
>     Compile with W=1 and see that this isn't kerneldoc. Please fix.
> 
> 
> I have used the W=1,  but there is not error or warning from kerneldoc
> 
> My command is:
> make W=1 ARCH=arm64 CROSS_COMPILE=/opt/toolchain/
> gcc-linaro-14.0.0-2023.06-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu- -j4
> 
> Anything I missed?

I thought W=1 ran kerneldoc check, but maybe not by default. Look at
the docs:

https://docs.kernel.org/doc-guide/kernel-doc.html#structure-union-and-enumeration-documentation

> 
> 
> 
>     > + * @dev_pm: multi power domain
>     > + * @soc_data: pointer to soc data
>     > + * @reg: base address of registers
>     > + * @regs: save registers for suspend
>     > + */
>     > +struct imx8_acm_priv {
>     > +       struct clk_imx_acm_pm_domains dev_pm;
>     > +       const struct imx8_acm_soc_data *soc_data;
>     > +       void __iomem *reg;
>     > +       u32 regs[IMX_ADMA_ACM_CLK_END];
>     > +};
>     > +
>     > +static const struct clk_parent_data imx8qm_aud_clk_sels[] = {
>     > +       {.fw_name = "aud_rec_clk0_lpcg_clk", .name =
>     "aud_rec_clk0_lpcg_clk" },
> 
>     There should only be fw_name here, or use an index. Presumably this
>     isn't migrating old code or bindings. Also, please add space after { and
>     before }.
> 
> 
> The clock  "aud_rec_clk0_lpcg_clk" is not defined in this provider. if
> remove .name There is an issue for finding parent.

The .fw_name should be part of the DT binding. If it isn't part of the
binding as an element of clock-names then it shouldn't be in the driver
as a .fw_name. If it isn't part of the provider, then it should be
referenced by DT index or clock-names. If you use the index, you avoid a
possibly time consuming set of string comparisons. So if you can, use
the index as much as possible. If you're converting a pre-existing
binding you will have to use .name as well to fallback to the globally
unique string name for a clk.

> 
> Should I remove .fw_name , only keep .name?

You should remove .name it sounds like.

      parent reply	other threads:[~2023-07-20 18:21 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-14  8:10 [PATCH v5 0/3] clk: imx: add audio clock mux driver Shengjiu Wang
2023-07-14  8:10 ` [PATCH v5 1/3] dt-bindings: clock: fsl,imx8-acm: Add audio clock mux support Shengjiu Wang
2023-07-14  8:10 ` [PATCH v5 2/3] dt-bindings: clock: imx8-clock: Add audio clock mux related clock Shengjiu Wang
2023-07-14  8:10 ` [PATCH v5 3/3] clk: imx: imx8: add audio clock mux driver Shengjiu Wang
2023-07-18  7:14   ` Peng Fan
2023-07-19 20:17   ` Stephen Boyd
     [not found]     ` <CAA+D8APd3n8XvC3m5fAoPxqqLzaU-RKm+e9y_G++D6KdaJJhiQ@mail.gmail.com>
2023-07-20 18:21       ` Stephen Boyd [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=6f9a6f0a4d43492604503098313c32f3.sboyd@kernel.org \
    --to=sboyd@kernel.org \
    --cc=abelvesa@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=festevam@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=peng.fan@nxp.com \
    --cc=robh+dt@kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    --cc=shengjiu.wang@gmail.com \
    --cc=shengjiu.wang@nxp.com \
    /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;
as well as URLs for NNTP newsgroup(s).