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

Commit ce4022ed authored by Maya Erez's avatar Maya Erez Committed by Alexei Avshalom Lazar
Browse files

wil6210: add support for sensing over SPI



Add new module param (support_sensing_over_spi) to notify FW
to enable SPI for sensing.
The device will handle the sensing data in parallel to the
networking data.

Change-Id: Ib6638096318016295e631cd0ffbeaf49ed08bda0
Signed-off-by: default avatarMaya Erez <merez@codeaurora.org>
parent 039432d3
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -104,6 +104,11 @@ MODULE_PARM_DESC(tx_ring_order, " Tx ring order; size = 1 << order");
module_param_cb(bcast_ring_order, &ring_order_ops, &bcast_ring_order, 0444);
MODULE_PARM_DESC(bcast_ring_order, " Bcast ring order; size = 1 << order");

static u8 support_sensing_over_spi;
module_param(support_sensing_over_spi, byte, 0444);
MODULE_PARM_DESC(support_sensing_over_spi,
		 " notify FW to enable SPI for sensing");

enum {
	WIL_BOOT_ERR,
	WIL_BOOT_VANILLA,
@@ -1675,6 +1680,14 @@ int wil_reset(struct wil6210_priv *wil, bool load_fw)
		wil_s(wil, RGF_USER_USAGE_8, BIT_USER_EXT_CLK);
	}

	if (support_sensing_over_spi) {
		wil_dbg_misc(wil, "notify FW to enable SPI for sensing\n");
		wil_s(wil, RGF_USER_USAGE_6, BIT_SPI_SENSING_SUPPORT);
	} else {
		wil_dbg_misc(wil, "notify FW to disable SPI for sensing\n");
		wil_c(wil, RGF_USER_USAGE_6, BIT_SPI_SENSING_SUPPORT);
	}

	if (wil->platform_ops.notify) {
		rc = wil->platform_ops.notify(wil->platform_handle,
					      WIL_PLATFORM_EVT_PRE_RESET);
+1 −0
Original line number Diff line number Diff line
@@ -181,6 +181,7 @@ struct RGF_ICR {
#define RGF_USER_USAGE_1		(0x880004)
#define RGF_USER_USAGE_2		(0x880008)
#define RGF_USER_USAGE_6		(0x880018)
	#define BIT_SPI_SENSING_SUPPORT		BIT(28)
	#define BIT_USER_OOB_MODE		BIT(31)
	#define BIT_USER_OOB_R2_MODE		BIT(30)
#define RGF_USER_USAGE_8		(0x880020)