lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Mon, 22 Apr 2019 11:02:22 +0000 From: Viorel Suman <viorel.suman@....com> To: "nicoleotsuka@...il.com" <nicoleotsuka@...il.com>, Daniel Baluta <daniel.baluta@....com> CC: dl-linux-imx <linux-imx@....com>, "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>, "linuxppc-dev@...ts.ozlabs.org" <linuxppc-dev@...ts.ozlabs.org>, "timur@...nel.org" <timur@...nel.org>, "Xiubo.Lee@...il.com" <Xiubo.Lee@...il.com>, "festevam@...il.com" <festevam@...il.com>, "broonie@...nel.org" <broonie@...nel.org>, "tiwai@...e.com" <tiwai@...e.com>, "lgirdwood@...il.com" <lgirdwood@...il.com>, "S.j. Wang" <shengjiu.wang@....com>, "perex@...ex.cz" <perex@...ex.cz>, "alsa-devel@...a-project.org" <alsa-devel@...a-project.org> Subject: Re: [PATCH 2/2] ASoC: fsl: Move clock operation to PM runtime Hi Nicolin, On Sb, 2019-04-20 at 22:54 -0700, Nicolin Chen wrote: > On Sat, Apr 20, 2019 at 03:59:05PM +0000, Daniel Baluta wrote: > > > > Turn off/on clocks when device enters suspend/resume. This > > helps saving power. > > > > @@ -934,6 +933,25 @@ static int fsl_sai_runtime_suspend(struct device *dev) > > static int fsl_sai_runtime_resume(struct device *dev) > > { > > struct fsl_sai *sai = dev_get_drvdata(dev); > > + int ret; > > + > > + ret = clk_prepare_enable(sai->bus_clk); > > + if (ret) { > > + dev_err(dev, "failed to enable bus clock: %d\n", ret); > > + return ret; > > + } > > + > > + if (sai->mclk_streams & BIT(SNDRV_PCM_STREAM_PLAYBACK)) { > > + ret = clk_prepare_enable(sai->mclk_clk[sai->mclk_id[1]]); > > + if (ret) > > + goto disable_bus_clk; > > + } > > + > > + if (sai->mclk_streams & BIT(SNDRV_PCM_STREAM_CAPTURE)) { > > + ret = clk_prepare_enable(sai->mclk_clk[sai->mclk_id[0]]); > > + if (ret) > > + goto disable_tx_clk; > > + } > The driver only enables mclk_clks for I2S master mode. But this > change enables them for I2S slave mode also. It doesn't sound a > right thing to me since we are supposed to save power? This change does not enable them for I2S slave mode, please check "fsl_sai_hw_params" and "fsl_sai_hw_free" functions: the field "sai->mclk_streams" is modified only for the case when "if (!sai->is_slave_mode)"; Regards, Viorel
Powered by blists - more mailing lists