mirror of
https://github.com/hardkernel/kernel_common_drivers.git
synced 2026-06-25 12:03:48 +09:00
i2c: fix clk get rate erro [1/2]
PD#SWPL-141317 Problem: get erro clk rate Solution: move clk api frontally Verify: A5 av400 Change-Id: I78ade63d323796ec6fa1a6e1c697ba3be07a736e Signed-off-by: junyi.zhao <junyi.zhao@amlogic.com>
This commit is contained in:
@@ -636,6 +636,11 @@ static int meson_i2c_probe(struct platform_device *pdev)
|
||||
ret = meson_i2c_speed_debug(&pdev->dev);
|
||||
if (ret)
|
||||
dev_err(&pdev->dev, "Creat i2c speed debug sysfs failed\n");
|
||||
i2c->clk_rate = clk_get_rate(i2c->clk);
|
||||
if (i2c->clk_rate == 0) {
|
||||
dev_err(&pdev->dev, "failed to get clk rate\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
#endif
|
||||
/*
|
||||
* A transfer is triggered when START bit changes from 0 to 1.
|
||||
@@ -650,7 +655,6 @@ static int meson_i2c_probe(struct platform_device *pdev)
|
||||
}
|
||||
|
||||
#ifdef CONFIG_AMLOGIC_MODIFY
|
||||
i2c->clk_rate = clk_get_rate(i2c->clk);
|
||||
meson_i2c_set_clk_div(i2c);
|
||||
pm_runtime_mark_last_busy(i2c->dev);
|
||||
pm_runtime_put_autosuspend(i2c->dev);
|
||||
|
||||
Reference in New Issue
Block a user