<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEEDINFO "
   title="NEEDINFO - [BYT LPSS backlight] Acer Aspire Switch 10 backlight control"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=90075#c7">Comment # 7</a>
              on <a class="bz_bug_link 
          bz_status_NEEDINFO "
   title="NEEDINFO - [BYT LPSS backlight] Acer Aspire Switch 10 backlight control"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=90075">bug 90075</a>
              from <span class="vcard"><a class="email" href="mailto:darlor@seznam.cz" title="darlor@seznam.cz">darlor@seznam.cz</a>
</span></b>
        <pre>Now I know why list_for_each_entry did not iterate. Function pwm_add_table
fills the list in "drivers/mfd/intel_soc_pmic_core.c, line 109" AFTER the
pwm_get is already executed (and failed). 

dmesg with my debugging lines:

dmesg | grep ZR
[    5.360759] ZR pwm_setup_backlight after variable definition
[    5.360841] ZR pwm_setup_backlight pwm is set to &lpss_pwm_info
[    5.360853] ZR *pwm_get()
[    5.360860] ZR *pwm_get() const char *dev_id = 0000:00:02.0 *con_id=pwm_lpss
[    5.360867] ZR *pwm_get() IS_ENABLE(CONFIG_OF) && dev && dev->of_node =
FALSE and non return
[    5.360877] ZR *pwm_get() and mutex_lock(&pwm_lookup_lock);
[    5.360884] ZR *pwm_get() after list_for_each_entry() best = 0
[    5.360891] ZR *pwm_get() (!chosen==true) goto out
[    5.360897] ZR *pwm_get() mutex_unlock(&pwm_lookup_lock);
[    5.360959] [drm:pwm_setup_backlight [i915]] *ERROR* ZR Failed to own the
pwm chip: pwm_lpss
[    5.492548] ZR intel_soc_pmic_i2c_probe() starting pwm_add_table
[    5.492566] ZR pwm_add_table mutex lock and size_t num = 1
[    5.492577] ZR pwm_add_table inside while (num--){...} num=0 and
&table->provider = crystal_cove_pwm and &table->dev_id = 0000:00:02.0 and
&table->con_id = pwm_backlight
[    5.492598] ZR pwm_add_table mutex unlock

How can I force pwm_get to wait until pwm_add_table is finished without
breaking everything? Another mutex? Ill try to fiddle with it in the evening.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the QA Contact for the bug.</li>
          <li>You are on the CC list for the bug.</li>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>