mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-24 22:36:05 +00:00
i2c: i2c_cdns: Enable i2c clock
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> Reviewed-by: Heiko Schocher <hs@denx.de>
This commit is contained in:
parent
60b03f1cc4
commit
8faa7913a4
1 changed files with 7 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue