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

Commit 30c85a17 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "cnss: Add optional property to control wlan_en gpio for Dual-Wifi platforms"

parents 9c8a4fc6 dbc3221f
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -42,6 +42,8 @@ Optional properties:
  - reg-names: Names of the memory regions defined in reg entry
  - wlan-bootstrap-gpio: WLAN_BOOTSTRAP GPIO signal specified by QCA6174
                         which should be drived depending on platforms
  - qcom,is-dual-wifi-enabled: Boolean property to control wlan enable(wlan-en)
                               gpio on dual-wifi platforms.

Example:

+13 −0
Original line number Diff line number Diff line
@@ -227,6 +227,10 @@ struct index_file {
	u8 file_name[13];
};

struct cnss_dual_wifi {
	bool is_dual_wifi_enabled;
};

/**
 * struct wlan_mac_addr - Structure to hold WLAN MAC Address
 * @mac_addr: MAC address
@@ -304,6 +308,7 @@ static struct cnss_data {
	int wlan_bootstrap_gpio;
	atomic_t auto_suspended;
	bool monitor_wake_intr;
	struct cnss_dual_wifi dual_wifi_info;
} *penv;

static unsigned int pcie_link_down_panic;
@@ -580,6 +585,11 @@ static void cnss_wlan_gpio_set(struct cnss_wlan_gpio_info *info, bool state)
		return;
	}

	if (state == WLAN_EN_LOW && penv->dual_wifi_info.is_dual_wifi_enabled) {
		pr_debug("%s Dual WiFi enabled\n", __func__);
		return;
	}

	gpio_set_value(info->num, state);
	info->state = state;

@@ -2728,6 +2738,9 @@ static int cnss_probe(struct platform_device *pdev)

	penv->subsys_handle = subsystem_get(penv->subsysdesc.name);

	if (of_property_read_bool(dev->of_node, "qcom,is-dual-wifi-enabled"))
		penv->dual_wifi_info.is_dual_wifi_enabled = true;

	if (of_property_read_u32(dev->of_node, "qcom,wlan-ramdump-dynamic",
				&ramdump_size) == 0) {
		penv->ramdump_addr = dma_alloc_coherent(&pdev->dev,