[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAOMZO5DcBbr7THgCCGtsymYVj_fPFQ9WH7XO5bbQHZLtjOL3Ag@mail.gmail.com>
Date: Mon, 15 Oct 2018 11:02:39 -0300
From: Fabio Estevam <festevam@...il.com>
To: Leonard Crestez <leonard.crestez@....com>
Cc: Shawn Guo <shawnguo@...nel.org>,
Fabio Estevam <fabio.estevam@....com>,
Rob Herring <robh+dt@...nel.org>,
Marek Vasut <marek.vasut@...il.com>,
Herbert Xu <herbert@...dor.apana.org.au>,
Horia Geanta Neag <horia.geanta@....com>,
Franck LENORMAND <franck.lenormand@....com>,
Aymen Sghaier <aymen.sghaier@....com>,
"David S. Miller" <davem@...emloft.net>,
Mark Rutland <mark.rutland@....com>,
"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
<devicetree@...r.kernel.org>,
"open list:HARDWARE RANDOM NUMBER GENERATOR CORE"
<linux-crypto@...r.kernel.org>,
"moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE"
<linux-arm-kernel@...ts.infradead.org>,
NXP Linux Team <linux-imx@....com>,
Sascha Hauer <kernel@...gutronix.de>,
linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 2/4] crypto: mxs-dcp - Add support for dcp clk
On Mon, Oct 15, 2018 at 10:28 AM Leonard Crestez
<leonard.crestez@....com> wrote:
> + /* DCP clock is optional, only used on some SOCs */
> + sdcp->dcp_clk = devm_clk_get(dev, "dcp");
> + if (IS_ERR(sdcp->dcp_clk)) {
> + if (sdcp->dcp_clk != ERR_PTR(-ENOENT))
> + return PTR_ERR(sdcp->dcp_clk);
> + sdcp->dcp_clk = NULL;
> + }
> +
> + ret = clk_prepare(sdcp->dcp_clk);
> + if (ret)
> + return ret;
> + ret = clk_enable(sdcp->dcp_clk);
> + if (ret)
> + return ret;
Couldn't you use clk_prepare_enable() instead?
Powered by blists - more mailing lists