[PATCH 1/4] i3c: dw: make resets optional in probe

Maniyam, Dinesh dinesh.maniyam at altera.com
Fri Jul 3 04:33:11 CEST 2026


Hi Tilak,


On 1/7/2026 6:27 pm, Pranav Tilak wrote:
> [CAUTION: This email is from outside your organization. Unless you trust the sender, do not click on links or open attachments as it may be a fraudulent email attempting to steal your information and/or compromise your computer.]
> 
> Treat -ENOENT and -EOPNOTSUPP from reset_get_bulk() as non-fatal to
> support platforms where no resets are defined in the DTS. The resets
> property is not yet documented in the DT binding.
> 
> Fixes: 1009c96f1590 ("drivers: i3c: Add driver for MIPI DWI3C")
> Signed-off-by: Pranav Tilak <pranav.vinaytilak at amd.com>
> ---
>  drivers/i3c/master/dw-i3c-master.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/i3c/master/dw-i3c-master.c b/drivers/i3c/master/dw-i3c-master.c
> index 0c4af7e528a..384fd27b750 100644
> --- a/drivers/i3c/master/dw-i3c-master.c
> +++ b/drivers/i3c/master/dw-i3c-master.c
> @@ -972,7 +972,7 @@ static int dw_i3c_probe(struct udevice *dev)
>         }
> 
>         ret = reset_get_bulk(dev, &master->resets);
> -       if (ret) {
> +       if (ret && ret != -EOPNOTSUPP && ret != -ENOENT) {
>                 dev_err(dev, "Can't get reset: %d\n", ret);
>                 return ret;
>         }
> --
> 2.43.0
> 

-EOPNOTSUPP is the wrong error code here. When CONFIG_DM_RESET is disabled, the reset_get_bulk() stub in include/reset.h returns -ENOTSUPP, not -EOPNOTSUPP, so this check won't cover that case and probe will still fail.

The established idiom across the tree is to ignore -ENOTSUPP and -ENOENT (see drivers/i2c/designware_i2c.c, drivers/net/zynq_gem.c, drivers/usb/host/xhci-dwc3.c, drivers/mmc/zynq_sdhci.c, etc.).

Please use:
if (ret && ret != -ENOTSUPP && ret != -ENOENT) {

Regards
Dinesh



More information about the U-Boot mailing list