[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z2QQI2gJNLjI-fam@pengutronix.de>
Date: Thu, 19 Dec 2024 13:22:59 +0100
From: Oleksij Rempel <o.rempel@...gutronix.de>
To: Andi Shyti <andi.shyti@...nel.org>
Cc: Carlos Song <carlos.song@....com>, frank.li@....com,
kernel@...gutronix.de, shawnguo@...nel.org, s.hauer@...gutronix.de,
festevam@...il.com, linux-i2c@...r.kernel.org, imx@...ts.linux.dev,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
Clark Wang <xiaoning.wang@....com>,
Ahmad Fatoum <a.fatoum@...gutronix.de>
Subject: Re: [PATCH v5] i2c: imx: support DMA defer probing
On Thu, Dec 19, 2024 at 01:02:29PM +0100, Andi Shyti wrote:
> Hi Carlos,
>
> > + /*
> > + * Init DMA config if supported, -ENODEV means DMA not enabled at
> > + * this platform, that is not a real error, so just remind "only
> > + * PIO mode is used". If DMA is enabled, but meet error when request
> > + * DMA channel, error should be showed in probe error log. PIO mode
> > + * should be available regardless of DMA.
> > + */
> > + ret = i2c_imx_dma_request(i2c_imx, phy_addr);
> > + if (ret) {
> > + if (ret == -EPROBE_DEFER)
> > + goto clk_notifier_unregister;
> > + else if (ret == -ENODEV)
> > + dev_dbg(&pdev->dev, "Only use PIO mode\n");
> > + else
> > + dev_err_probe(&pdev->dev, ret, "Failed to setup DMA, only use PIO mode\n");
>
> Just for understanding, should we quit in this last case, as
> well?
>
> Before we were ignoring ENODEV and EPROBE_DEFER, but now you are
> making it clear that other failures like ENOMEM might happen.
Good point, dev_err_probe() would not print an error in case of EPROBE_DEFER,
but in this case we should only print error and continue with PIO.
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
Powered by blists - more mailing lists