From afeb7b3f6864f74bbcf22c8744998e55db219be2 Mon Sep 17 00:00:00 2001 From: Karthikeyan Ramasubramanian Date: Thu, 23 Jul 2020 00:25:25 -0600 Subject: drivers/wifi: Adapt generic wifi driver into a chip driver Re-organize the existing generic wifi driver into a generic wifi chip driver. This allows generic wifi chip information to be added to the devicetree. BUG=None TEST=./util/abuild/abuild Change-Id: I63f957a008ecf4a6a810c2a135ed62ea81a79fe0 Signed-off-by: Karthikeyan Ramasubramanian Reviewed-on: https://review.coreboot.org/c/coreboot/+/43768 Reviewed-by: Angel Pons Reviewed-by: Tim Wawrzynczak Tested-by: build bot (Jenkins) --- src/drivers/wifi/generic/chip.h | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 src/drivers/wifi/generic/chip.h (limited to 'src/drivers/wifi/generic/chip.h') diff --git a/src/drivers/wifi/generic/chip.h b/src/drivers/wifi/generic/chip.h new file mode 100644 index 0000000000..fe3a1d1b99 --- /dev/null +++ b/src/drivers/wifi/generic/chip.h @@ -0,0 +1,38 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#ifndef _WIFI_GENERIC_H_ +#define _WIFI_GENERIC_H_ + +/** + * struct drivers_wifi_generic_config - Data structure to contain generic wifi config + * @wake: Wake pin for ACPI _PRW + * @maxsleep: Maximum sleep state to wake from + */ +struct drivers_wifi_generic_config { + unsigned int wake; + unsigned int maxsleep; +}; + +/** + * wifi_generic_fill_ssdt() - Fill ACPI SSDT table for WiFi controller + * @dev: Device structure corresponding to WiFi controller. + * @config: Generic wifi config required to fill ACPI SSDT table. + * + * This function implements common device operation to help fill ACPI SSDT + * table for WiFi controller. + */ +void wifi_generic_fill_ssdt(const struct device *dev, + const struct drivers_wifi_generic_config *config); + +/** + * wifi_generic_acpi_name() - Get ACPI name for WiFi controller + * @dev: Device structure corresponding to WiFi controller. + * + * This function implements common device operation to get the ACPI name for + * WiFi controller. + * + * Return: string representing the ACPI name for WiFi controller. + */ +const char *wifi_generic_acpi_name(const struct device *dev); + +#endif /* _GENERIC_WIFI_H_ */ -- cgit v1.2.3