Skip to contentSkip to conversation

i2c: designware_i2c: Don't warn if reset DT property is not present

PATCH In review [email protected] 4 participants 4 messages Sep 26, 2025 – Sep 29, 2025 I2C

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 i2c: designware_i2c: Don't warn if reset DT property is not present

From: Maksim Kiselev <[email protected]>

If reset property is missing in DT, then we get this warning:
designware_i2c@0: Can't get reset: -2

Avoid this by checking if reset DT property is present, first.

Fixes 622597dee4f ("i2c: designware: add reset ctrl to driver")
---
 drivers/i2c/designware_i2c.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/i2c/designware_i2c.c +1 -1
index a54976e7889..8ad716f410e 100644
@@ -764,7 +764,7 @@ int designware_i2c_of_to_plat(struct udevice *bus)
 
 	ret = reset_get_bulk(bus, &priv->resets);
 	if (ret) {
-		if (ret != -ENOTSUPP)
+		if (ret != -ENOTSUPP && ret != -ENOENT)
 			dev_warn(bus, "Can't get reset: %d\n", ret);
 	} else {
 		reset_deassert_bulk(&priv->resets);
Signature · 1 line
2.48.1
Reviewed-by on v1 1/1
#1 lore raw

Hello Maxim,

Quoted 5 lines · On 26.09.25 12:05, [email protected] wrote:

From: Maksim Kiselev <[email protected]>

If reset property is missing in DT, then we get this warning:
designware_i2c@0: Can't get reset: -2

Quoted 7 lines

Avoid this by checking if reset DT property is present, first.

Fixes 622597dee4f ("i2c: designware: add reset ctrl to driver")
---
  drivers/i2c/designware_i2c.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

@Tom: I think, this is a late bugfix, so feel free to pick it up.
If too late for 2025.10, I pick it up and send a PR when 2025.10 is out.

Thanks!

bye,
Heiko

Signature · 5 lines
Nabla Software Engineering
HRB 40522 Augsburg
Phone: +49 821 45592596
E-Mail: [email protected]
Geschäftsführer : Stefano Babic
Reviewed-by on v1 1/1
#2 lore raw
In reply to [email protected]
Quoted 6 lines · On Fri, Sep 26, 2025 at 01:05:26PM +0300, [email protected] wrote:

From: Maksim Kiselev <[email protected]>

If reset property is missing in DT, then we get this warning:
designware_i2c@0: Can't get reset: -2

Avoid this by checking if reset DT property is present, first.

I would add more:
"reset is an optional property per snps,designware-i2c.yaml"

Quoted 12 lines
Fixes 622597dee4f ("i2c: designware: add reset ctrl to driver")

---
drivers/i2c/designware_i2c.c | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)
drivers/i2c/designware_i2c.c +0 -0
index a54976e7889..8ad716f410e 100644

drivers/i2c/designware_i2c.c int designware_i2c_of_to_plat(struct udevice *bus) · line 770

Quoted 8 lines
drivers/i2c/designware_i2c.c +1 -1
@@ -764,7 +764,7 @@ int designware_i2c_of_to_plat(struct udevice *bus)
 
 	ret = reset_get_bulk(bus, &priv->resets);
 	if (ret) {
-		if (ret != -ENOTSUPP)
+		if (ret != -ENOTSUPP && ret != -ENOENT)
 			dev_warn(bus, "Can't get reset: %d\n", ret);
 	} else {
 		reset_deassert_bulk(&priv->resets);

Otherwise:

Quoted 3 lines
Signature · 1 line
2.48.1
#3 lore raw
In reply to [email protected]
Quoted 6 lines · On Fri, 26 Sep 2025 13:05:26 +0300, [email protected] wrote:

If reset property is missing in DT, then we get this warning:
designware_i2c@0: Can't get reset: -2

Avoid this by checking if reset DT property is present, first.

Applied to u-boot/master, thanks!

[1/1] i2c: designware_i2c: Don't warn if reset DT property is not present

      commit: 522a58af836598918758b41b110a73f35b9335ba
Signature · 1 line
Tom