Re: [PATCH v3 6/9] i2c: of-prober: Defer regulator_disable() on successful probe in simple helper
Andy Shevchenko <[email protected]> Thu, 6 Aug 2026 23:43:11 +0300
| Newsgroups | org.kernel.vger.linux-i2c,dev.linux.lists.chrome-platform,org.infradead.lists.linux-arm-kernel,org.infradead.lists.linux-mediatek,org.kernel.vger.linux-devicetree,org.kernel.vger.linux-input,org.kernel.vger.linux-kernel |
|---|---|
| Organization | Intel Finland Oy - BIC 0357606-4 - c/o Alberga Business Park, 6 krs, Bertel Jungin Aukio 5, 02600 Espoo |
| Message-ID | <[email protected]> |
On Wed, Jul 22, 2026 at 04:34:15PM +0800, Chen-Yu Tsai wrote: > On Tue, Jul 21, 2026 at 6:24 PM Andy Shevchenko > <[email protected]> wrote: > > On Tue, Jul 21, 2026 at 03:52:20PM +0800, Chen-Yu Tsai wrote: ... > > > + /* > > > + * Wait a bit of time for async drivers to probe and increase the > > > + * regulator enable count. This allows the drivers to check and > > > + * skip waiting for re-initialization. > > > + */ > > > + if (defer_disable) { > > > + dev_dbg(dev, "Deferring regulator disable\n"); > > > + msleep(100); > > > > How was this value chosen? > > I just chose an arbitrary round value. > > If both the prober and the driver for the probed device (trackpad in > this example) are builtin, the time between enabling the node and the > driver asynchronously probing is between 5 ms and 30 ms, but could > also see outliers exceeding 100 ms. > > If you're worried the value won't suit every user, I could make it a > parameter of the simple helpers? And the user itself could be made to > probe asynchronously to not block the main code path. I think the comment above should be updated to summarize the above instead of "a bit of time". -- With Best Regards, Andy Shevchenko