brintos

brintos / linux-shallow public Read only

0
0
Text · 2.6 KiB · b531051 Raw
87 lines · c
1/* SPDX-License-Identifier: GPL-2.0-only */2/*3 * Copyright (c) 2021, Intel Corporation.4 */5#ifndef INTEL_SAR_H6#define INTEL_SAR_H7 8#define COMMAND_ID_DEV_MODE 19#define COMMAND_ID_CONFIG_TABLE 210#define DRVNAME "intc_sar"11#define MAX_DEV_MODES 5012#define MAX_REGULATORY 313#define SAR_DSM_UUID "82737E72-3A33-4C45-A9C7-57C0411A5F13"14#define SAR_EVENT 0x8015#define SYSFS_DATANAME "intc_data"16#define TOTAL_DATA 417 18/**19 * Structure wwan_device_mode_info - device mode information20 * Holds the data that needs to be passed to userspace.21 * The data is updated from the BIOS sensor information.22 * @device_mode: Specific mode of the device23 * @bandtable_index: Index of RF band24 * @antennatable_index: Index of antenna25 * @sartable_index: Index of SAR26 */27struct wwan_device_mode_info {28	int device_mode;29	int bandtable_index;30	int antennatable_index;31	int sartable_index;32};33 34/**35 * Structure wwan_device_mode_configuration - device configuration36 * Holds the data that is configured and obtained on probe event.37 * The data is updated from the BIOS sensor information.38 * @version: Mode configuration version39 * @total_dev_mode: Total number of device modes40 * @device_mode_info: pointer to structure wwan_device_mode_info41 */42struct wwan_device_mode_configuration {43	int version;44	int total_dev_mode;45	struct wwan_device_mode_info *device_mode_info;46};47 48/**49 * Structure wwan_supported_info - userspace datastore50 * Holds the data that is obtained from userspace51 * The data is updated from the userspace and send value back in the52 * structure format that is mentioned here.53 * @reg_mode_needed: regulatory mode set by user for tests54 * @bios_table_revision: Version of SAR table55 * @num_supported_modes: Total supported modes based on reg_mode56 */57struct wwan_supported_info {58	int reg_mode_needed;59	int bios_table_revision;60	int num_supported_modes;61};62 63/**64 * Structure wwan_sar_context - context of SAR65 * Holds the complete context as long as the driver is in existence66 * The context holds instance of the data used for different cases.67 * @guid: Group id68 * @handle: store acpi handle69 * @reg_value: regulatory value70 * Regulatory 0: FCC, 1: CE, 2: ISED71 * @sar_device: platform_device type72 * @sar_kobject: kobject for sysfs73 * @supported_data: wwan_supported_info struct74 * @sar_data: wwan_device_mode_info struct75 * @config_data: wwan_device_mode_configuration array struct76 */77struct wwan_sar_context {78	guid_t guid;79	acpi_handle handle;80	int reg_value;81	struct platform_device *sar_device;82	struct wwan_supported_info supported_data;83	struct wwan_device_mode_info sar_data;84	struct wwan_device_mode_configuration config_data[MAX_REGULATORY];85};86#endif /* INTEL_SAR_H */87