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

Commit c39c0cbf authored by Abinaya P's avatar Abinaya P
Browse files

leds: leds-qpnp-wled: set overwrite bit for switching frequency



While configuring the switching frequency for WLED, we need to set
the overwrite bit as well so that the switching frequency change
will get reflected.

Change-Id: I3e7f67b76ac49c1d925a8e84ea1280160ee044bd
Signed-off-by: default avatarAbinaya P <abinayap@codeaurora.org>
parent 769d7b09
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -90,9 +90,10 @@
#define QPNP_WLED_BOOST_DUTY_MIN_NS	26
#define QPNP_WLED_BOOST_DUTY_MAX_NS	156
#define QPNP_WLED_DEF_BOOST_DUTY_NS	104
#define QPNP_WLED_SWITCH_FREQ_MASK	0xF0
#define QPNP_WLED_SWITCH_FREQ_MASK	0x70
#define QPNP_WLED_SWITCH_FREQ_800_KHZ	800
#define QPNP_WLED_SWITCH_FREQ_1600_KHZ	1600
#define QPNP_WLED_SWITCH_FREQ_OVERWRITE 0x80
#define QPNP_WLED_OVP_MASK		0xFC
#define QPNP_WLED_OVP_17800_MV		17800
#define QPNP_WLED_OVP_19400_MV		19400
@@ -1061,7 +1062,7 @@ static int qpnp_wled_config(struct qpnp_wled *wled)
	if (rc < 0)
		return rc;
	reg &= QPNP_WLED_SWITCH_FREQ_MASK;
	reg |= temp;
	reg |= (temp | QPNP_WLED_SWITCH_FREQ_OVERWRITE);
	rc = qpnp_wled_write_reg(wled, &reg,
			QPNP_WLED_SWITCH_FREQ_REG(wled->ctrl_base));
	if (rc)