/* SPDX-License-Identifier: GPL-2.0-only */ /* * Copyright (c) 2021, Intel Corporation. */ #ifndef INTEL_SAR_H #define INTEL_SAR_H #define COMMAND_ID_DEV_MODE … #define COMMAND_ID_CONFIG_TABLE … #define DRVNAME … #define MAX_DEV_MODES … #define MAX_REGULATORY … #define SAR_DSM_UUID … #define SAR_EVENT … #define SYSFS_DATANAME … #define TOTAL_DATA … /** * Structure wwan_device_mode_info - device mode information * Holds the data that needs to be passed to userspace. * The data is updated from the BIOS sensor information. * @device_mode: Specific mode of the device * @bandtable_index: Index of RF band * @antennatable_index: Index of antenna * @sartable_index: Index of SAR */ struct wwan_device_mode_info { … }; /** * Structure wwan_device_mode_configuration - device configuration * Holds the data that is configured and obtained on probe event. * The data is updated from the BIOS sensor information. * @version: Mode configuration version * @total_dev_mode: Total number of device modes * @device_mode_info: pointer to structure wwan_device_mode_info */ struct wwan_device_mode_configuration { … }; /** * Structure wwan_supported_info - userspace datastore * Holds the data that is obtained from userspace * The data is updated from the userspace and send value back in the * structure format that is mentioned here. * @reg_mode_needed: regulatory mode set by user for tests * @bios_table_revision: Version of SAR table * @num_supported_modes: Total supported modes based on reg_mode */ struct wwan_supported_info { … }; /** * Structure wwan_sar_context - context of SAR * Holds the complete context as long as the driver is in existence * The context holds instance of the data used for different cases. * @guid: Group id * @handle: store acpi handle * @reg_value: regulatory value * Regulatory 0: FCC, 1: CE, 2: ISED * @sar_device: platform_device type * @sar_kobject: kobject for sysfs * @supported_data: wwan_supported_info struct * @sar_data: wwan_device_mode_info struct * @config_data: wwan_device_mode_configuration array struct */ struct wwan_sar_context { … }; #endif /* INTEL_SAR_H */