From: Andi Shyti <andi.shyti@kernel.org>
To: linux-i2c@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Cc: Wolfram Sang <wsa@kernel.org>, Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Chris Packham <chris.packham@alliedtelesis.co.nz>,
Ryan Chen <ryan_chen@aspeedtech.com>,
Andi Shyti <andi.shyti@kernel.org>
Subject: [PATCH 2/2] i2c: mpc: Use the i2c-scl-clk-low-timeout-ms property
Date: Sun, 12 Mar 2023 14:19:33 +0100 [thread overview]
Message-ID: <20230312131933.248715-3-andi.shyti@kernel.org> (raw)
In-Reply-To: <20230312131933.248715-1-andi.shyti@kernel.org>
Now we have the i2c-scl-clk-low-timeout-ms property defined in
the binding. Use it and remove the previous "fsl,timeout".
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
Cc: Chris Packham <chris.packham@alliedtelesis.co.nz>
---
Documentation/devicetree/bindings/i2c/i2c-mpc.yaml | 12 ++++++------
drivers/i2c/busses/i2c-mpc.c | 3 ++-
2 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/Documentation/devicetree/bindings/i2c/i2c-mpc.yaml b/Documentation/devicetree/bindings/i2c/i2c-mpc.yaml
index 018e1b944424..c01547585456 100644
--- a/Documentation/devicetree/bindings/i2c/i2c-mpc.yaml
+++ b/Documentation/devicetree/bindings/i2c/i2c-mpc.yaml
@@ -41,11 +41,6 @@ properties:
if defined, the clock settings from the bootloader are
preserved (not touched)
- fsl,timeout:
- $ref: /schemas/types.yaml#/definitions/uint32
- description: |
- I2C bus timeout in microseconds
-
fsl,i2c-erratum-a004447:
$ref: /schemas/types.yaml#/definitions/flag
description: |
@@ -53,6 +48,11 @@ properties:
says that the standard i2c recovery scheme mechanism does
not work and an alternate implementation is needed.
+ i2c-scl-clk-low-timeout-ms:
+ description:
+ Indicates the SCL timeouts which used to force the client
+ into a waiting state
+
required:
- compatible
- reg
@@ -95,6 +95,6 @@ examples:
interrupts = <43 2>;
interrupt-parent = <&mpic>;
clock-frequency = <400000>;
- fsl,timeout = <10000>;
+ i2c-scl-clk-low-timeout-ms = <10000>;
};
...
diff --git a/drivers/i2c/busses/i2c-mpc.c b/drivers/i2c/busses/i2c-mpc.c
index 81ac92bb4f6f..93c484efc3f3 100644
--- a/drivers/i2c/busses/i2c-mpc.c
+++ b/drivers/i2c/busses/i2c-mpc.c
@@ -846,7 +846,8 @@ static int fsl_i2c_probe(struct platform_device *op)
mpc_i2c_setup_8xxx(op->dev.of_node, i2c, clock);
}
- prop = of_get_property(op->dev.of_node, "fsl,timeout", &plen);
+ prop = of_get_property(op->dev.of_node,
+ "i2c-scl-clk-low-timeout-ms", &plen);
if (prop && plen == sizeof(u32)) {
mpc_ops.timeout = *prop * HZ / 1000000;
if (mpc_ops.timeout < 5)
--
2.39.2
next prev parent reply other threads:[~2023-03-12 13:21 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-12 13:19 [PATCH 0/2] Add the clock stretching i2c property Andi Shyti
2023-03-12 13:19 ` [PATCH 1/2] dt-bindings: i2c: Add the clock stretching property Andi Shyti
2023-03-12 13:43 ` Krzysztof Kozlowski
2023-03-12 13:19 ` Andi Shyti [this message]
2023-03-12 13:44 ` [PATCH 2/2] i2c: mpc: Use the i2c-scl-clk-low-timeout-ms property Krzysztof Kozlowski
2023-03-12 13:44 ` Krzysztof Kozlowski
2023-03-12 13:48 ` Andi Shyti
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230312131933.248715-3-andi.shyti@kernel.org \
--to=andi.shyti@kernel.org \
--cc=chris.packham@alliedtelesis.co.nz \
--cc=devicetree@vger.kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robh+dt@kernel.org \
--cc=ryan_chen@aspeedtech.com \
--cc=wsa@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox