From 93111f8dba5b00cfd2f185044db6794985ae0caf Mon Sep 17 00:00:00 2001 From: Andrey Smirnov Date: Wed, 10 Jan 2018 08:31:59 -0800 Subject: i.MX: ecspi: Enable imx->clk as a part of initialization Some SoCs (e. g. i.MX7) do not enable this clock by default, so add code to take care of that in the driver. Signed-off-by: Andrey Smirnov Signed-off-by: Sascha Hauer --- drivers/spi/imx_spi.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/spi/imx_spi.c b/drivers/spi/imx_spi.c index 0827de7786..10621d00c8 100644 --- a/drivers/spi/imx_spi.c +++ b/drivers/spi/imx_spi.c @@ -624,6 +624,13 @@ static int imx_spi_probe(struct device_d *dev) goto err_free; } + ret = clk_enable(imx->clk); + if (ret) { + dev_err(dev, "Failed to enable clock: %s\n", + strerror(ret)); + return ret; + } + imx->chipselect = devdata->chipselect; imx->xchg_single = devdata->xchg_single; imx->do_transfer = devdata->do_transfer; -- cgit v1.2.3