[PATCH] drm/panel: simple: Initialize unprepared_time in probe

Marek Vasut marex at denx.de
Mon Jul 31 18:03:14 UTC 2023


On 7/24/23 15:49, Doug Anderson wrote:

Hi,

[...]

>> Maybe the EPROBE_DEFER actually happens and triggers the failure ?
> 
> I could certainly believe that EPROBE_DEFER is involved.

So no, it is not. It is difficult to set this up and access the signals, 
but so I did.

What happens is this:
panel_simple_probe() calls devm_regulator_get()
   -> If the regulator was ENABLED, then it is now DISABLED
   -> For regulator-fixed, this means the regulator GPIO goes HIGH->LOW

panel_simple_prepare() triggers panel_simple_resume()
   -> If this occurs too soon after devm_regulator_get() turned the
      regulator OFF and thus regulator GPIO low, then unprepare time is
      not respected => FAIL

Since there is no way to find out in which state the regulator was when 
devm_regulator_get() was called, we have to wait the full unprepare time 
before re-enabling that regulator in panel_simple_resume().


More information about the dri-devel mailing list