All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Simek <michal.simek@xilinx.com>
To: u-boot@lists.denx.de
Subject: [PATCH v2 4/5] i2c: i2c_cdns: Enable i2c clock
Date: Wed, 10 Feb 2021 13:42:22 +0100	[thread overview]
Message-ID: <8c1bcf7960118410e0a72952a3ad8a6bc511a74f.1612960940.git.michal.simek@xilinx.com> (raw)
In-Reply-To: <cover.1612960940.git.michal.simek@xilinx.com>

From: T Karthik Reddy <t.karthik.reddy@xilinx.com>

Enable i2c controller clock from driver probe function
by calling clk_enable().

Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---

(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 <linux/types.h>
 #include <linux/io.h>
 #include <linux/errno.h>
+#include <dm/device_compat.h>
 #include <dm/root.h>
 #include <i2c.h>
 #include <fdtdec.h>
@@ -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

  parent reply	other threads:[~2021-02-10 12:42 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-10 12:42 [PATCH v2 0/5] clk: Add support to enable clocks Michal Simek
2021-02-10 12:42 ` [PATCH v2 1/5] clk: zynq: Add dummy clock enable function Michal Simek
2021-02-10 12:42 ` [PATCH v2 2/5] clk: zynqmp: Add support to enable clocks Michal Simek
2021-02-10 12:42 ` [PATCH v2 3/5] clk: versal: " Michal Simek
2021-02-10 12:42 ` Michal Simek [this message]
2021-02-11  5:24   ` [PATCH v2 4/5] i2c: i2c_cdns: Enable i2c clock Heiko Schocher
2021-02-10 12:42 ` [PATCH v2 5/5] net: gem: Enable ethernet rx clock for versal Michal Simek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8c1bcf7960118410e0a72952a3ad8a6bc511a74f.1612960940.git.michal.simek@xilinx.com \
    --to=michal.simek@xilinx.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.