icnss: Add support for disabling vbatt notification

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>
This commit is contained in:
Yuanyuan Liu 2016-09-22 16:34:43 -07:00
parent 626caf4e54
commit e11d240bc7

View file

@ -244,9 +244,10 @@ enum icnss_debug_quirks {
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);
@ -755,6 +756,9 @@ static int icnss_init_vph_monitor(struct icnss_priv *priv)
{
int ret = 0;
if (test_bit(VBATT_DISABLE, &quirks))
goto out;
ret = icnss_get_phone_power(priv, &priv->vph_pwr);
if (ret)
goto out;
@ -2288,7 +2292,7 @@ static int icnss_driver_event_server_exit(void *data)
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);