drivers/net/wireless/intel/iwlwifi/fw/acpi.h

Source file repositories/reference/linux-study-clean/drivers/net/wireless/intel/iwlwifi/fw/acpi.h

File Facts

System
Linux kernel
Corpus path
drivers/net/wireless/intel/iwlwifi/fw/acpi.h
Extension
.h
Size
7799 bytes
Lines
282
Domain
Driver Families
Bucket
drivers/net
Inferred role
Driver Families: implementation source
Status
source implementation candidate

Why This File Exists

Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.

Dependency Surface

Detected Declarations

Annotated Snippet

struct iwl_dsm_internal_product_reset_cmd {
	/* cmd is from enum iwl_dsm_internal_product_reset_cmds */
	u16 cmd;
	u16 value;
} __packed;

#define IWL_ACPI_WBEM_REV0_MASK (BIT(0) | BIT(1))
#define IWL_ACPI_WBEM_REVISION 0

#ifdef CONFIG_ACPI

struct iwl_fw_runtime;

union acpi_object *iwl_acpi_get_dsm_object(struct device *dev, int rev,
					   int func, union acpi_object *args,
					   const guid_t *guid);

/**
 * iwl_acpi_get_mcc - read MCC from ACPI, if available
 *
 * @fwrt: the fw runtime struct
 * @mcc: output buffer (3 bytes) that will get the MCC
 *
 * This function tries to read the current MCC from ACPI if available.
 * Return: 0 on success, or a negative error code
 */
int iwl_acpi_get_mcc(struct iwl_fw_runtime *fwrt, char *mcc);

int iwl_acpi_get_pwr_limit(struct iwl_fw_runtime *fwrt, u64 *dflt_pwr_limit);

/*
 * iwl_acpi_get_eckv - read external clock validation from ACPI, if available
 *
 * @fwrt: the fw runtime struct
 * @extl_clk: output var (2 bytes) that will get the clk indication.
 *
 * This function tries to read the external clock indication
 * from ACPI if available.
 */
int iwl_acpi_get_eckv(struct iwl_fw_runtime *fwrt, u32 *extl_clk);

int iwl_acpi_get_wrds_table(struct iwl_fw_runtime *fwrt);

int iwl_acpi_get_ewrd_table(struct iwl_fw_runtime *fwrt);

int iwl_acpi_get_wgds_table(struct iwl_fw_runtime *fwrt);

int iwl_acpi_get_tas_table(struct iwl_fw_runtime *fwrt,
			   struct iwl_tas_data *data);

int iwl_acpi_get_ppag_table(struct iwl_fw_runtime *fwrt);

int iwl_acpi_get_phy_filters(struct iwl_fw_runtime *fwrt);

void iwl_acpi_get_guid_lock_status(struct iwl_fw_runtime *fwrt);

int iwl_acpi_get_dsm(struct iwl_fw_runtime *fwrt,
		     enum iwl_dsm_funcs func, u32 *value);

int iwl_acpi_get_wbem(struct iwl_fw_runtime *fwrt, u32 *value);

int iwl_acpi_get_dsbr(struct iwl_fw_runtime *fwrt, u32 *value);

#else /* CONFIG_ACPI */

static inline union acpi_object *
iwl_acpi_get_dsm_object(struct device *dev, int rev, int func,
			union acpi_object *args, const guid_t *guid)
{
	return ERR_PTR(-ENOENT);
}

static inline int iwl_acpi_get_mcc(struct iwl_fw_runtime *fwrt, char *mcc)
{
	return -ENOENT;
}

static inline int iwl_acpi_get_pwr_limit(struct iwl_fw_runtime *fwrt,
					 u64 *dflt_pwr_limit)
{
	*dflt_pwr_limit = 0;
	return 0;
}

static inline int iwl_acpi_get_eckv(struct iwl_fw_runtime *fwrt, u32 *extl_clk)
{
	return -ENOENT;
}

static inline int iwl_acpi_get_wrds_table(struct iwl_fw_runtime *fwrt)

Annotation

Implementation Notes