Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3a3cee06 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "defconfig: Enable icnss2 config for holi"

parents 413bb9ed 1a81d851
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -126,3 +126,9 @@ CONFIG_HEADER_TEST=y
CONFIG_HEADERS_INSTALL=y
CONFIG_KERNEL_HEADER_TEST=y
CONFIG_QCOM_MPM=m
CONFIG_CNSS_GENL=m
CONFIG_WCNSS_MEM_PRE_ALLOC=m
CONFIG_ICNSS2=m
CONFIG_ICNSS2_QMI=y
# CONFIG_ICNSS2_DEBUG is not set
# CONFIG_CNSS_QCA6750 is not set
+1 −0
Original line number Diff line number Diff line
@@ -133,3 +133,4 @@ CONFIG_MSM_RPM_SMD=y
CONFIG_QCOM_MPM=y
CONFIG_IOSCHED_BFQ=y
CONFIG_BFQ_GROUP_IOSCHED=y
CONFIG_CLD_LL_CORE=y
+3 −1
Original line number Diff line number Diff line
@@ -43,7 +43,6 @@ CONFIG_I3C_MASTER_MSM_GENI=y
# CONFIG_DW_I3C_MASTER is not set
CONFIG_CORESIGHT_SOURCE_ETM4X=y
CONFIG_PCI_MSM_MSI=y
CONFIG_CLD_LL_CORE=y
# CONFIG_QCOM_SPMI_TEMP_ALARM is not set
CONFIG_MHI_BUS=y
CONFIG_MHI_DEBUG=y
@@ -113,3 +112,6 @@ CONFIG_KPROBES=y
CONFIG_QCOM_CLK_SMD_RPM=y
CONFIG_QCOM_MPM=y
CONFIG_SM_GPUCC_HOLI=y
CONFIG_ICNSS2_DEBUG=y
# CONFIG_CLD_LL_CORE is not set
# CONFIG_NL80211_TESTMODE is not set
+0 −54
Original line number Diff line number Diff line
@@ -26,8 +26,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>
@@ -633,9 +631,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;

err_power_on:
@@ -657,10 +652,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;
}

@@ -2745,44 +2736,6 @@ static void icnss_sysfs_destroy(struct icnss_priv *priv)
		kobject_put(icnss_kobject);
}

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 = 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;
@@ -2791,13 +2744,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);
+0 −11
Original line number Diff line number Diff line
@@ -6,13 +6,10 @@
#ifndef __MAIN_H__
#define __MAIN_H__

#include <linux/adc-tm-clients.h>
#include <linux/iio/consumer.h>
#include <linux/irqreturn.h>
#include <linux/kobject.h>
#include <linux/platform_device.h>
#include <linux/ipc_logging.h>
#include <dt-bindings/iio/qcom,spmi-vadc.h>
#include <soc/qcom/icnss2.h>
#include <soc/qcom/service-locator.h>
#include <soc/qcom/service-notifier.h>
@@ -221,9 +218,6 @@ struct icnss_stats {
	uint32_t rejuvenate_ack_req;
	uint32_t rejuvenate_ack_resp;
	uint32_t rejuvenate_ack_err;
	uint32_t vbatt_req;
	uint32_t vbatt_resp;
	uint32_t vbatt_req_err;
	uint32_t device_info_req;
	uint32_t device_info_resp;
	uint32_t device_info_err;
@@ -360,11 +354,6 @@ struct icnss_priv {
	uint32_t fw_error_fatal_irq;
	uint32_t fw_early_crash_irq;
	struct completion unblock_shutdown;
	struct adc_tm_param vph_monitor_params;
	struct adc_tm_chip *adc_tm_dev;
	struct iio_channel *channel;
	uint64_t vph_pwr;
	bool vbatt_supported;
	char function_name[WLFW_FUNCTION_NAME_LEN + 1];
	bool is_ssr;
	struct kobject *icnss_kobject;
Loading