diff options
author | Peng Fan <peng.fan@nxp.com> | 2019-07-24 08:54:16 +0000 |
---|---|---|
committer | Stefano Babic <sbabic@denx.de> | 2019-10-14 09:31:41 +0200 |
commit | d02be21d3004b51c6fc9a54b90d31dcc2dac4a9a (patch) | |
tree | 53a9a1f778c17a96ea7e81f93d08a45b87f411f6 /drivers/i2c/imx_lpi2c.c | |
parent | b4eca2d787b09509e6a5a0f597e91bcb00558b4d (diff) |
i2c: imx_lpi2c: add ipg clk
The controller needs two clk, per clk and ipg clk,
so let's add ipg clk.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Diffstat (limited to 'drivers/i2c/imx_lpi2c.c')
-rw-r--r-- | drivers/i2c/imx_lpi2c.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/i2c/imx_lpi2c.c b/drivers/i2c/imx_lpi2c.c index 4586d4331f..2de99d019e 100644 --- a/drivers/i2c/imx_lpi2c.c +++ b/drivers/i2c/imx_lpi2c.c @@ -471,6 +471,17 @@ static int imx_lpi2c_probe(struct udevice *bus) dev_err(bus, "Failed to enable per clk\n"); return ret; } + + ret = clk_get_by_name(bus, "ipg", &i2c_bus->ipg_clk); + if (ret) { + dev_err(bus, "Failed to get ipg clk\n"); + return ret; + } + ret = clk_enable(&i2c_bus->ipg_clk); + if (ret) { + dev_err(bus, "Failed to enable ipg clk\n"); + return ret; + } } else { /* To i.MX7ULP, only i2c4-7 can be handled by A7 core */ ret = enable_i2c_clk(1, bus->seq); |