~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/linux/acpi_amd_wbrf.h

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0 */
  2 /*
  3  * Wifi Band Exclusion Interface (AMD ACPI Implementation)
  4  * Copyright (C) 2023 Advanced Micro Devices
  5  */
  6 
  7 #ifndef _ACPI_AMD_WBRF_H
  8 #define _ACPI_AMD_WBRF_H
  9 
 10 #include <linux/device.h>
 11 #include <linux/notifier.h>
 12 
 13 /* The maximum number of frequency band ranges */
 14 #define MAX_NUM_OF_WBRF_RANGES          11
 15 
 16 /* Record actions */
 17 #define WBRF_RECORD_ADD         0x0
 18 #define WBRF_RECORD_REMOVE      0x1
 19 
 20 /**
 21  * struct freq_band_range - Wifi frequency band range definition
 22  * @start: start frequency point (in Hz)
 23  * @end: end frequency point (in Hz)
 24  */
 25 struct freq_band_range {
 26         u64             start;
 27         u64             end;
 28 };
 29 
 30 /**
 31  * struct wbrf_ranges_in_out - wbrf ranges info
 32  * @num_of_ranges: total number of band ranges in this struct
 33  * @band_list: array of Wifi band ranges
 34  */
 35 struct wbrf_ranges_in_out {
 36         u64                     num_of_ranges;
 37         struct freq_band_range  band_list[MAX_NUM_OF_WBRF_RANGES];
 38 };
 39 
 40 /**
 41  * enum wbrf_notifier_actions - wbrf notifier actions index
 42  * @WBRF_CHANGED: there was some frequency band updates. The consumers
 43  *               should retrieve the latest active frequency bands.
 44  */
 45 enum wbrf_notifier_actions {
 46         WBRF_CHANGED,
 47 };
 48 
 49 #if IS_ENABLED(CONFIG_AMD_WBRF)
 50 bool acpi_amd_wbrf_supported_producer(struct device *dev);
 51 int acpi_amd_wbrf_add_remove(struct device *dev, uint8_t action, struct wbrf_ranges_in_out *in);
 52 bool acpi_amd_wbrf_supported_consumer(struct device *dev);
 53 int amd_wbrf_retrieve_freq_band(struct device *dev, struct wbrf_ranges_in_out *out);
 54 int amd_wbrf_register_notifier(struct notifier_block *nb);
 55 int amd_wbrf_unregister_notifier(struct notifier_block *nb);
 56 #else
 57 static inline
 58 bool acpi_amd_wbrf_supported_consumer(struct device *dev)
 59 {
 60         return false;
 61 }
 62 
 63 static inline
 64 int acpi_amd_wbrf_add_remove(struct device *dev, uint8_t action, struct wbrf_ranges_in_out *in)
 65 {
 66         return -ENODEV;
 67 }
 68 
 69 static inline
 70 bool acpi_amd_wbrf_supported_producer(struct device *dev)
 71 {
 72         return false;
 73 }
 74 static inline
 75 int amd_wbrf_retrieve_freq_band(struct device *dev, struct wbrf_ranges_in_out *out)
 76 {
 77         return -ENODEV;
 78 }
 79 static inline
 80 int amd_wbrf_register_notifier(struct notifier_block *nb)
 81 {
 82         return -ENODEV;
 83 }
 84 static inline
 85 int amd_wbrf_unregister_notifier(struct notifier_block *nb)
 86 {
 87         return -ENODEV;
 88 }
 89 #endif /* CONFIG_AMD_WBRF */
 90 
 91 #endif /* _ACPI_AMD_WBRF_H */
 92 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php