Commit 401a8e9e authored by Wolfram Sang's avatar Wolfram Sang Committed by Andi Shyti

i2c: mpc: use proper binding for transfer timeouts

"i2c-scl-clk-low-timeout-us" is wrongly used here because it describes
maximum clock stretching not maximum transfer time. Additionally, it is
deprecated because of issues. Move this driver to the correct binding.
Signed-off-by: default avatarWolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: default avatarChris Packham <chris.packham@alliedtelesis.co.nz>
Tested-by: default avatarChris Packham <chris.packham@alliedtelesis.co.nz>
Signed-off-by: default avatarAndi Shyti <andi.shyti@kernel.org>
parent f9ccb453
...@@ -844,14 +844,14 @@ static int fsl_i2c_probe(struct platform_device *op) ...@@ -844,14 +844,14 @@ static int fsl_i2c_probe(struct platform_device *op)
mpc_i2c_setup_8xxx(op->dev.of_node, i2c, clock); mpc_i2c_setup_8xxx(op->dev.of_node, i2c, clock);
} }
/* /* Sadly, we have to support two deprecated bindings here */
* "fsl,timeout" has been marked as deprecated and, to maintain
* backward compatibility, we will only look for it if
* "i2c-scl-clk-low-timeout-us" is not present.
*/
result = of_property_read_u32(op->dev.of_node, result = of_property_read_u32(op->dev.of_node,
"i2c-scl-clk-low-timeout-us", "i2c-transfer-timeout-us",
&mpc_ops.timeout); &mpc_ops.timeout);
if (result == -EINVAL)
result = of_property_read_u32(op->dev.of_node,
"i2c-scl-clk-low-timeout-us",
&mpc_ops.timeout);
if (result == -EINVAL) if (result == -EINVAL)
result = of_property_read_u32(op->dev.of_node, result = of_property_read_u32(op->dev.of_node,
"fsl,timeout", &mpc_ops.timeout); "fsl,timeout", &mpc_ops.timeout);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment