mirror of
https://xff.cz/git/u-boot/
synced 2025-09-30 06:51:28 +02: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:
committed by
Michal Simek
parent
60b03f1cc4
commit
8faa7913a4
@@ -15,6 +15,7 @@
|
|||||||
#include <linux/types.h>
|
#include <linux/types.h>
|
||||||
#include <linux/io.h>
|
#include <linux/io.h>
|
||||||
#include <linux/errno.h>
|
#include <linux/errno.h>
|
||||||
|
#include <dm/device_compat.h>
|
||||||
#include <dm/root.h>
|
#include <dm/root.h>
|
||||||
#include <i2c.h>
|
#include <i2c.h>
|
||||||
#include <fdtdec.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);
|
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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user