Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 89ba8dad authored by derfelot's avatar derfelot Committed by Andreas Schneider
Browse files

pwm: pwm-qpnp: Always update pwm mode for yoshino when pwm_change_mode is called

This mirrors the behavior of this function prior to commit 3d40e46b . Without this, LED initialization at boot will fail - wreaking all sorts of havoc.
parent 6429060a
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -1579,7 +1579,9 @@ int pwm_change_mode(struct pwm_device *pwm, enum pm_pwm_mode mode)
	chip = qpnp_pwm_from_pwm_dev(pwm);

	spin_lock_irqsave(&chip->lpg_lock, flags);
#ifndef CONFIG_ARCH_SONY_YOSHINO
	if (chip->pwm_mode != mode) {
#endif
		rc = _pwm_change_mode(chip, mode);
		if (rc) {
			pr_err("Failed to change mode: %d, rc=%d\n", mode, rc);
@@ -1593,7 +1595,9 @@ int pwm_change_mode(struct pwm_device *pwm, enum pm_pwm_mode mode)
				goto unlock;
			}
		}
#ifndef CONFIG_ARCH_SONY_YOSHINO
	}
#endif
unlock:
	spin_unlock_irqrestore(&chip->lpg_lock, flags);