diff options
author | Karthikeyan Ramasubramanian <kramasub@google.com> | 2020-07-23 00:25:25 -0600 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2020-07-28 16:07:47 +0000 |
commit | afeb7b3f6864f74bbcf22c8744998e55db219be2 (patch) | |
tree | a6b50fad0064ccccf26691e3b947cd86cbd7a812 /src/drivers/wifi/generic/chip.h | |
parent | ff7b9970f422735c9289768b0572b6ee49f68dfb (diff) |
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 <kramasub@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/43768
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/drivers/wifi/generic/chip.h')
-rw-r--r-- | src/drivers/wifi/generic/chip.h | 38 |
1 files changed, 38 insertions, 0 deletions
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_ */ |