icnss2: Remove vbatt feature code from icnss2
This change removes vbatt feature code as adc tm api's functionalities has been changed and no longer supports vbatt feature. Change-Id: I431c1dfe1a5529809fd7d68d1cb15632de3b801b Signed-off-by: Sandeep Singh <quic_sandsing@quicinc.com>
This commit is contained in:

committed by
Gerrit - the friendly Code Review server

parent
09128bd57d
commit
3974704e22
@@ -27,8 +27,6 @@
|
||||
#include <linux/dma-mapping.h>
|
||||
#include <linux/thread_info.h>
|
||||
#include <linux/uaccess.h>
|
||||
#include <linux/adc-tm-clients.h>
|
||||
#include <linux/iio/consumer.h>
|
||||
#include <linux/etherdevice.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/of_irq.h>
|
||||
@@ -876,9 +874,6 @@ static int icnss_driver_event_server_arrive(struct icnss_priv *priv,
|
||||
if (!priv->fw_early_crash_irq)
|
||||
register_early_crash_notifications(&priv->pdev->dev);
|
||||
|
||||
if (priv->vbatt_supported)
|
||||
icnss_init_vph_monitor(priv);
|
||||
|
||||
return ret;
|
||||
|
||||
device_info_failure:
|
||||
@@ -898,10 +893,6 @@ static int icnss_driver_event_server_exit(struct icnss_priv *priv)
|
||||
|
||||
icnss_clear_server(priv);
|
||||
|
||||
if (priv->adc_tm_dev && priv->vbatt_supported)
|
||||
adc_tm_disable_chan_meas(priv->adc_tm_dev,
|
||||
&priv->vph_monitor_params);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -3743,44 +3734,6 @@ static void icnss_sysfs_destroy(struct icnss_priv *priv)
|
||||
devm_device_remove_group(&priv->pdev->dev, &icnss_attr_group);
|
||||
}
|
||||
|
||||
static int icnss_get_vbatt_info(struct icnss_priv *priv)
|
||||
{
|
||||
struct adc_tm_chip *adc_tm_dev = NULL;
|
||||
struct iio_channel *channel = NULL;
|
||||
int ret = 0;
|
||||
|
||||
adc_tm_dev = get_adc_tm(&priv->pdev->dev, "icnss");
|
||||
if (PTR_ERR(adc_tm_dev) == -EPROBE_DEFER) {
|
||||
icnss_pr_err("adc_tm_dev probe defer\n");
|
||||
return -EPROBE_DEFER;
|
||||
}
|
||||
|
||||
if (IS_ERR(adc_tm_dev)) {
|
||||
ret = PTR_ERR(adc_tm_dev);
|
||||
icnss_pr_err("Not able to get ADC dev, VBATT monitoring is disabled: %d\n",
|
||||
ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
channel = devm_iio_channel_get(&priv->pdev->dev, "icnss");
|
||||
if (PTR_ERR(channel) == -EPROBE_DEFER) {
|
||||
icnss_pr_err("channel probe defer\n");
|
||||
return -EPROBE_DEFER;
|
||||
}
|
||||
|
||||
if (IS_ERR(channel)) {
|
||||
ret = PTR_ERR(channel);
|
||||
icnss_pr_err("Not able to get VADC dev, VBATT monitoring is disabled: %d\n",
|
||||
ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
priv->adc_tm_dev = adc_tm_dev;
|
||||
priv->channel = channel;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int icnss_resource_parse(struct icnss_priv *priv)
|
||||
{
|
||||
int ret = 0, i = 0;
|
||||
@@ -3789,13 +3742,6 @@ static int icnss_resource_parse(struct icnss_priv *priv)
|
||||
struct resource *res;
|
||||
u32 int_prop;
|
||||
|
||||
if (of_property_read_bool(pdev->dev.of_node, "qcom,icnss-adc_tm")) {
|
||||
ret = icnss_get_vbatt_info(priv);
|
||||
if (ret == -EPROBE_DEFER)
|
||||
goto out;
|
||||
priv->vbatt_supported = true;
|
||||
}
|
||||
|
||||
ret = icnss_get_vreg(priv);
|
||||
if (ret) {
|
||||
icnss_pr_err("Failed to get vreg, err = %d\n", ret);
|
||||
|
Reference in New Issue
Block a user