From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michal Simek Date: Wed, 10 Feb 2021 13:42:22 +0100 Subject: [PATCH v2 4/5] i2c: i2c_cdns: Enable i2c clock In-Reply-To: References: Message-ID: <8c1bcf7960118410e0a72952a3ad8a6bc511a74f.1612960940.git.michal.simek@xilinx.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de From: T Karthik Reddy Enable i2c controller clock from driver probe function by calling clk_enable(). Signed-off-by: T Karthik Reddy Signed-off-by: Michal Simek --- (no changes since v1) drivers/i2c/i2c-cdns.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/i2c/i2c-cdns.c b/drivers/i2c/i2c-cdns.c index db3c04fa6e75..a650dd69b89f 100644 --- a/drivers/i2c/i2c-cdns.c +++ b/drivers/i2c/i2c-cdns.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include @@ -481,6 +482,12 @@ static int cdns_i2c_of_to_plat(struct udevice *dev) i2c_bus->input_freq = clk_get_rate(&clk); + ret = clk_enable(&clk); + if (ret) { + dev_err(dev, "failed to enable clock\n"); + return ret; + } + return 0; } -- 2.30.0