ICNSS monitors runtime phone power. When phone power
crosses either high or low threshold, ICNSS sends
vbatt notification to WLAN FW. FW then should vote for
different regulator power mode based on the notification.
Add support for disabling this feature and disable it
for now until WLAN FW support voting for different
regulator power mode.
CRs-Fixed:
1070294
Change-Id: I63241a198040122fcc4f26b728795e39822dbdc8
Signed-off-by: Yuanyuan Liu <yuanliu@codeaurora.org>
RECOVERY_DISABLE,
SSR_ONLY,
PDR_ONLY,
+ VBATT_DISABLE,
};
-#define ICNSS_QUIRKS_DEFAULT 0
+#define ICNSS_QUIRKS_DEFAULT BIT(VBATT_DISABLE)
unsigned long quirks = ICNSS_QUIRKS_DEFAULT;
module_param(quirks, ulong, 0600);
{
int ret = 0;
+ if (test_bit(VBATT_DISABLE, &quirks))
+ goto out;
+
ret = icnss_get_phone_power(priv, &priv->vph_pwr);
if (ret)
goto out;
icnss_pr_info("QMI Service Disconnected: 0x%lx\n", penv->state);
- if (penv->adc_tm_dev)
+ if (!test_bit(VBATT_DISABLE, &quirks) && penv->adc_tm_dev)
qpnp_adc_tm_disable_chan_meas(penv->adc_tm_dev,
&penv->vph_monitor_params);