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

Peng Fan peng.fan at oss.nxp.com
Mon Sep 29 04:56:57 CEST 2025


On Fri, Sep 26, 2025 at 01:05:26PM +0300, bigunclemax at gmail.com wrote:
>From: Maksim Kiselev <bigunclemax at gmail.com>
>
>If reset property is missing in DT, then we get this warning:
>	designware_i2c at 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"

>
>Fixes: 622597dee4f ("i2c: designware: add reset ctrl to driver")
>Signed-off-by: Maksim Kiselev <bigunclemax at gmail.com>
>---
> drivers/i2c/designware_i2c.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/drivers/i2c/designware_i2c.c b/drivers/i2c/designware_i2c.c
>index a54976e7889..8ad716f410e 100644
>--- a/drivers/i2c/designware_i2c.c
>+++ b/drivers/i2c/designware_i2c.c
>@@ -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:


Reviewed-by: Peng Fan <peng.fan at nxp.com>

>-- 
>2.48.1
>


More information about the U-Boot mailing list