All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: viorel.suman@nxp.com
Cc: alsa-devel@alsa-project.org
Subject: [bug report] ASoC: fsl_xcvr: Add XCVR ASoC CPU DAI driver
Date: Mon, 2 Nov 2020 16:53:17 +0300	[thread overview]
Message-ID: <20201102135317.GA41527@mwanda> (raw)

Hello Viorel Suman,

The patch 28564486866f: "ASoC: fsl_xcvr: Add XCVR ASoC CPU DAI
driver" from Oct 13, 2020, leads to the following static checker
warning:

	sound/soc/fsl/fsl_xcvr.c:393 fsl_xcvr_en_aud_pll()
	warn: 'xcvr->phy_clk' not released on lines: 373.

sound/soc/fsl/fsl_xcvr.c
   351  static int fsl_xcvr_en_aud_pll(struct fsl_xcvr *xcvr, u32 freq)
   352  {
   353          struct device *dev = &xcvr->pdev->dev;
   354          int ret;
   355  
   356          clk_disable_unprepare(xcvr->phy_clk);
   357          ret = clk_set_rate(xcvr->phy_clk, freq);
   358          if (ret < 0) {
   359                  dev_err(dev, "Error while setting AUD PLL rate: %d\n", ret);
   360                  return ret;
   361          }
   362          ret = clk_prepare_enable(xcvr->phy_clk);
   363          if (ret) {
   364                  dev_err(dev, "failed to start PHY clock: %d\n", ret);
   365                  return ret;
   366          }
   367  
   368          /* Release AI interface from reset */
   369          ret = regmap_write(xcvr->regmap, FSL_XCVR_PHY_AI_CTRL_SET,
   370                             FSL_XCVR_PHY_AI_CTRL_AI_RESETN);
   371          if (ret < 0) {
   372                  dev_err(dev, "Error while setting IER0: %d\n", ret);

clck_disable_unprepare(xcvr->phy_clk)?

   373                  return ret;
   374          }
   375  
   376          if (xcvr->mode == FSL_XCVR_MODE_EARC) { /* eARC mode */
   377                  /* PHY: CTRL_SET: TX_DIFF_OE, PHY_EN */
   378                  fsl_xcvr_ai_write(xcvr, FSL_XCVR_PHY_CTRL_SET,
   379                                    FSL_XCVR_PHY_CTRL_TSDIFF_OE |
   380                                    FSL_XCVR_PHY_CTRL_PHY_EN, 1);
   381                  /* PHY: CTRL2_SET: EARC_TX_MODE */
   382                  fsl_xcvr_ai_write(xcvr, FSL_XCVR_PHY_CTRL2_SET,
   383                                    FSL_XCVR_PHY_CTRL2_EARC_TXMS, 1);
   384          } else { /* SPDIF mode */
   385                  /* PHY: CTRL_SET: TX_CLK_AUD_SS | SPDIF_EN */
   386                  fsl_xcvr_ai_write(xcvr, FSL_XCVR_PHY_CTRL_SET,
   387                                    FSL_XCVR_PHY_CTRL_TX_CLK_AUD_SS |
   388                                    FSL_XCVR_PHY_CTRL_SPDIF_EN, 1);
   389          }
   390  
   391          dev_dbg(dev, "PLL Fexp: %u\n", freq);
   392  
   393          return 0;
   394  }


regards,
dan carpenter

             reply	other threads:[~2020-11-02 13:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-02 13:53 Dan Carpenter [this message]
2020-11-02 14:02 ` [bug report] ASoC: fsl_xcvr: Add XCVR ASoC CPU DAI driver Viorel Suman
2020-11-02 14:57   ` Dan Carpenter

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=20201102135317.GA41527@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=viorel.suman@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 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.