diff options
author | Dong Aisheng <aisheng.dong@nxp.com> | 2019-09-26 21:00:55 +0800 |
---|---|---|
committer | Dong Aisheng <aisheng.dong@nxp.com> | 2019-11-25 15:46:23 +0800 |
commit | 5fa8c422a1e276f133aedcf20152b702bb2b8271 (patch) | |
tree | 6a9f991ff7e35fdbb8c77d245452da809987e680 /drivers/i2c | |
parent | 90b29e7b9c6bd6f9c2e27a2275d7c68d80cedf42 (diff) |
i2c: imx: get rid of CONFIG_ARCH_LAYERSCAPE
We can't use CONFIG_ARCH_LAYERSCAPE for one Image multiple platforms
support.
Reviewed-by: Biwen Li <biwen.li@nxp.com>
Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
Diffstat (limited to 'drivers/i2c')
-rw-r--r-- | drivers/i2c/busses/i2c-imx.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c index 61e87134bd09..0f737655e818 100644 --- a/drivers/i2c/busses/i2c-imx.c +++ b/drivers/i2c/busses/i2c-imx.c @@ -1398,13 +1398,12 @@ static int i2c_imx_probe(struct platform_device *pdev) i2c_imx, IMX_I2C_I2CR); imx_i2c_write_reg(i2c_imx->hwdata->i2sr_clr_opcode, i2c_imx, IMX_I2C_I2SR); -#ifdef CONFIG_ARCH_LAYERSCAPE - /* Init optional bus recovery for layerscape */ - ret = i2c_imx_init_recovery_for_layerscape(i2c_imx, pdev); -#else - /* Init optional bus recovery function */ - ret = i2c_imx_init_recovery_info(i2c_imx, pdev); -#endif + /* Init optional bus recovery */ + if (of_match_node(pinmux_of_match, pdev->dev.of_node)) + ret = i2c_imx_init_recovery_for_layerscape(i2c_imx, pdev); + else + ret = i2c_imx_init_recovery_info(i2c_imx, pdev); + /* Give it another chance if pinctrl used is not ready yet */ if (ret == -EPROBE_DEFER) goto clk_notifier_unregister; |