power: qpnp-smb5: Configure ICL based on flash active state

The charger driver configures the ICL to 100mA or 0mA on input
removal and to 100mA on charger insertion (before USB enumeration).
When there is a TORCH concurrency with USB insertion, there can be
a scenario where the TORCH could delay in ramping up. Fix this 
this by forcing the ICL to at least 500mA when TORCH is active.

While at it, reject the current reported from USB if input is absent.

Change-Id: Ie4084c236957538d396cfb504f50d7b325a5743e
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
diff --git a/drivers/power/supply/qcom/qpnp-smb5.c b/drivers/power/supply/qcom/qpnp-smb5.c
index 9840396..ab4990a 100644
--- a/drivers/power/supply/qcom/qpnp-smb5.c
+++ b/drivers/power/supply/qcom/qpnp-smb5.c
@@ -985,6 +985,10 @@
 					pr_err("Failed to force 5V\n");
 				else
 					chg->pulse_cnt = 0;
+			} else {
+				/* USB absent & flash not-active - vote 100mA */
+				vote(chg->usb_icl_votable, SW_ICL_MAX_VOTER,
+							true, SDP_100_MA);
 			}
 
 			pr_debug("flash active VBUS 5V restriction %s\n",