Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

i2c-imx: Driver fixes #21

Open
wants to merge 2 commits into
base: lf-6.6.y
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions drivers/i2c/busses/i2c-imx.c
Original file line number Diff line number Diff line change
Expand Up @@ -722,10 +722,6 @@ static int i2c_imx_start(struct imx_i2c_struct *i2c_imx, bool atomic)
unsigned int temp = 0;
int result;

result = i2c_imx_set_clk(i2c_imx, clk_get_rate(i2c_imx->clk));
if (result)
return result;

imx_i2c_write_reg(i2c_imx->ifdr, i2c_imx, IMX_I2C_IFDR);
/* Enable I2C controller */
imx_i2c_write_reg(i2c_imx->hwdata->i2sr_clr_opcode, i2c_imx, IMX_I2C_I2SR);
Expand Down Expand Up @@ -1860,7 +1856,7 @@ static int __maybe_unused i2c_imx_runtime_suspend(struct device *dev)
{
struct imx_i2c_struct *i2c_imx = dev_get_drvdata(dev);

clk_disable_unprepare(i2c_imx->clk);
clk_disable(i2c_imx->clk);
pinctrl_pm_select_sleep_state(dev);

return 0;
Expand All @@ -1872,7 +1868,7 @@ static int __maybe_unused i2c_imx_runtime_resume(struct device *dev)
int ret;

pinctrl_pm_select_default_state(dev);
ret = clk_prepare_enable(i2c_imx->clk);
ret = clk_enable(i2c_imx->clk);
if (ret)
dev_err(dev, "can't enable I2C clock, ret=%d\n", ret);

Expand Down