lkml.org 
[lkml]   [2014]   [Sep]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH V1] ASoC: fsl_ssi: refine ipg clock usage in this module
On Tue, Sep 09, 2014 at 02:37:42PM -0500, Timur Tabi wrote:
> On 09/09/2014 01:38 PM, Nicolin Chen wrote:
> >make sure to have the call for imx only because it seems that
> >the other platforms do not depend on the clock.
>
> Although I doubt anyone will every add support for clocks to PowerPC "side"
> of this driver, I would prefer to avoid IMX-specific changes. Instead, the
> code should check if a clock is available. That's why I suggested this
> change:
>
> - if (ssi_private->soc->imx)
> + if (!IS_ERR(ssi_private->clk))

Hmm.... I think the following change may be better?

probe() {
....
+ /*
+ * Initially mark the clock to NULL for all platforms so that later
+ * clk_prepare_enable() will ignore and return 0 for non-clock cases.
+ */
+ ssi_private->clk = NULL;
.....
fsl_ssi_imx_probe();
}

In this way, all platforms, not confined to imx any more, will be able
to call clk_prepare_enable(). Then we don't need an extra platform check
before calling it.


\
 
 \ /
  Last update: 2014-09-09 22:21    [W:0.095 / U:0.108 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site