Re: [PATCH v2 1/7] Input: elan_i2c - Wait for initialization after enabling regulator supply
Dmitry Torokhov <[email protected]> Sat, 4 Jul 2026 16:44:18 -0700
| Newsgroups | 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-i2c,org.kernel.vger.linux-input,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
Hi Chen-Yu, On Fri, Jul 03, 2026 at 07:55:54PM +0800, Chen-Yu Tsai wrote: > Elan trackpad controllers require some delay after enabling power to > the controller for the hardware and firmware to initialize: > > - 2ms for hardware initialization > - 100ms for firmware initialization > > Until then, the hardware will not respond to I2C transfers. This was > observed on the MT8173 Chromebooks after the regulator supply for the > trackpad was changed to "not always on". > > Add proper delays after regulator_enable() calls. To avoid impacting > the boot time of existing devices that have the power rails always on, > skip the delay if the regulator supply was already enabled. In this > case the regulator is either always on, was on by default at power up, > or was left on by some other driver, such as the I2C OF component > prober. Either way the controller has had ample time to initialize. Unfortunately we do not know that [it had ample time]. For this code be reliable we need to record the time at which given regulator was turned on and then execute/adjust the delay as needed. Until we have it we need to assume the regulator was enabled at the time of regulator_enable() call. I am not concerned with increased boot time too much given the driver is set up for asynchronous probing. Thanks. -- Dmitry