Skip to content
Snippets Groups Projects
Commit 1e6707bb authored by Gao Pan's avatar Gao Pan Committed by Leonard Crestez
Browse files

MLK-17426 imx: lpi2c: add debug message when i2c peripheral clk doesn't work


add debug message when i2c peripheral clk rate is 0, then
directly return -EINVAL.

Signed-off-by: default avatarGao Pan <pandy.gao@nxp.com>
Reviewed-by: default avatarAndy Duan <fugang.duan@nxp.com>
(Vipul: Fixed merge conflicts)
Signed-off-by: default avatarVipul Kumar <vipul_kumar@mentor.com>
parent e1aa13df
No related branches found
No related tags found
No related merge requests found
......@@ -216,7 +216,12 @@ static int lpi2c_imx_config(struct lpi2c_imx_struct *lpi2c_imx)
lpi2c_imx_set_mode(lpi2c_imx);
clk_rate = clk_get_rate(lpi2c_imx->clk);
clk_rate = clk_get_rate(lpi2c_imx->clk_per);
if (!clk_rate) {
dev_dbg(&lpi2c_imx->adapter.dev, "clk_per rate is 0\n");
return -EINVAL;
}
if (lpi2c_imx->mode == HS || lpi2c_imx->mode == ULTRA_FAST)
filt = 0;
else
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment