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

Commit aa6c8bba authored by Kiran Gunda's avatar Kiran Gunda Committed by Gerrit - the friendly Code Review server
Browse files

leds: qpnp-flash-v2: Disable the safety timer by default



Safety timer is enabled in the HW by default. Make it disabled
by default and enable based on the client's need.

Change-Id: I7967b91deeed5f87557e59f1dd16ce41a22ae134
Signed-off-by: default avatarKiran Gunda <kgunda@codeaurora.org>
parent 3440aa4e
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -438,6 +438,12 @@ static int qpnp_flash_led_init_settings(struct qpnp_flash_led *led)

		val |= 0x1 << led->fnode[i].id;

		rc = qpnp_flash_led_write(led,
			FLASH_LED_REG_SAFETY_TMR(led->base + addr_offset),
			FLASH_LED_SAFETY_TMR_DISABLED);
		if (rc < 0)
			return rc;

		if (led->fnode[i].strobe_sel == HW_STROBE) {
			if (led->fnode[i].id == LED3)
				strobe_mask |= LED3_FLASH_ONCE_ONLY_BIT;
@@ -1324,6 +1330,12 @@ static int qpnp_flash_led_switch_disable(struct flash_switch_data *snode)
		if (rc < 0)
			return rc;

		rc = qpnp_flash_led_write(led,
			FLASH_LED_REG_SAFETY_TMR(led->base + addr_offset),
			FLASH_LED_SAFETY_TMR_DISABLED);
		if (rc < 0)
			return rc;

		led->fnode[i].led_on = false;

		if (led->fnode[i].strobe_sel == HW_STROBE) {