From 5c458cc2f8bfbadae6e2809ed9206528eec9f59f Mon Sep 17 00:00:00 2001 From: Subbaraman Narayanamurthy Date: Thu, 2 Feb 2017 16:39:41 -0800 Subject: [PATCH] leds: qpnp-flash-v2: add delay between LMH mitigation and LED strobe As per the hardware recommendation, a delay of 500 us is needed after LMH mitigation is enabled by software and before the flash LED is strobed. Add it. Change-Id: Ib70efbb7267510ffb9d95c4aba8566bf6e777c0f Signed-off-by: Subbaraman Narayanamurthy --- drivers/leds/leds-qpnp-flash-v2.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/leds/leds-qpnp-flash-v2.c b/drivers/leds/leds-qpnp-flash-v2.c index 08809a93d4b2..54d395d5e78d 100644 --- a/drivers/leds/leds-qpnp-flash-v2.c +++ b/drivers/leds/leds-qpnp-flash-v2.c @@ -1076,6 +1076,8 @@ static int qpnp_flash_led_switch_set(struct flash_switch_data *snode, bool on) pr_err("trigger lmh mitigation failed, rc=%d\n", rc); return rc; } + /* Wait for LMH mitigation to take effect */ + udelay(500); } if (led->trigger_chgr) {