[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200314095019.GQ4885@vkoul-mobl>
Date: Sat, 14 Mar 2020 15:20:19 +0530
From: Vinod Koul <vkoul@...nel.org>
To: Pierre-Louis Bossart <pierre-louis.bossart@...ux.intel.com>
Cc: alsa-devel@...a-project.org, tiwai@...e.de,
gregkh@...uxfoundation.org, linux-kernel@...r.kernel.org,
Ranjani Sridharan <ranjani.sridharan@...ux.intel.com>,
Hui Wang <hui.wang@...onical.com>, broonie@...nel.org,
srinivas.kandagatla@...aro.org, jank@...ence.com,
slawomir.blauciak@...el.com, Sanyog Kale <sanyog.r.kale@...el.com>,
Rander Wang <rander.wang@...el.com>,
Bard liao <yung-chuan.liao@...ux.intel.com>,
Rander Wang <rander.wang@...ux.intel.com>
Subject: Re: [PATCH 03/16] soundwire: cadence: add interface to check clock
status
On 13-03-20, 11:31, Pierre-Louis Bossart wrote:
>
>
> > > +/**
> > > + * sdw_cdns_is_clock_stop: Check clock status
> > > + *
> > > + * @cdns: Cadence instance
> > > + */
> > > +bool sdw_cdns_is_clock_stop(struct sdw_cdns *cdns)
> > > +{
> > > + u32 status;
> > > +
> > > + status = cdns_readl(cdns, CDNS_MCP_STAT) & CDNS_MCP_STAT_CLK_STOP;
> > > + if (status) {
> > > + dev_dbg(cdns->dev, "Clock is stopped\n");
> > > + return true;
> > > + }
> >
> > This can be further optimized to:
> >
> > return !!(cdns_readl(cdns, CDNS_MCP_STAT) & CDNS_MCP_STAT_CLK_STOP);
>
> The logs are very useful for debug.
You have this log also in caller function.
--
~Vinod
Powered by blists - more mailing lists