linux/drivers/platform/x86/dell/dell-wmi-sysman/dell-wmi-sysman.h

/* SPDX-License-Identifier: GPL-2.0
 * Definitions for kernel modules using Dell WMI System Management Driver
 *
 *  Copyright (c) 2020 Dell Inc.
 */

#ifndef _DELL_WMI_BIOS_ATTR_H_
#define _DELL_WMI_BIOS_ATTR_H_

#include <linux/wmi.h>
#include <linux/device.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/capability.h>

#define DRIVER_NAME
#define MAX_BUFF

#define DELL_WMI_BIOS_ENUMERATION_ATTRIBUTE_GUID
#define DELL_WMI_BIOS_INTEGER_ATTRIBUTE_GUID
#define DELL_WMI_BIOS_STRING_ATTRIBUTE_GUID
#define DELL_WMI_BIOS_PASSOBJ_ATTRIBUTE_GUID
#define DELL_WMI_BIOS_ATTRIBUTES_INTERFACE_GUID
#define DELL_WMI_BIOS_PASSWORD_INTERFACE_GUID

struct enumeration_data {};

struct integer_data {};

struct str_data {};

struct po_data {};

struct wmi_sysman_priv {};

/* global structure used by multiple WMI interfaces */
extern struct wmi_sysman_priv wmi_priv;

enum {};

enum {};

#define get_instance_id(type)

#define attribute_s_property_show(name, type)

#define attribute_n_property_show(name, type)

#define attribute_property_store(curr_val, type)

#define check_property_type(attr, prop, valuetype)

union acpi_object *get_wmiobj_pointer(int instance_id, const char *guid_string);
int get_instance_count(const char *guid_string);
void strlcpy_attr(char *dest, char *src);

int populate_enum_data(union acpi_object *enumeration_obj, int instance_id,
			struct kobject *attr_name_kobj, u32 enum_property_count);
int alloc_enum_data(void);
void exit_enum_attributes(void);

int populate_int_data(union acpi_object *integer_obj, int instance_id,
			struct kobject *attr_name_kobj);
int alloc_int_data(void);
void exit_int_attributes(void);

int populate_str_data(union acpi_object *str_obj, int instance_id, struct kobject *attr_name_kobj);
int alloc_str_data(void);
void exit_str_attributes(void);

int populate_po_data(union acpi_object *po_obj, int instance_id, struct kobject *attr_name_kobj);
int alloc_po_data(void);
void exit_po_attributes(void);

int set_attribute(const char *a_name, const char *a_value);
int set_bios_defaults(u8 defType);

void exit_bios_attr_set_interface(void);
int init_bios_attr_set_interface(void);
int map_wmi_error(int error_code);
size_t calculate_string_buffer(const char *str);
size_t calculate_security_buffer(char *authentication);
void populate_security_buffer(char *buffer, char *authentication);
ssize_t populate_string_buffer(char *buffer, size_t buffer_len, const char *str);
int set_new_password(const char *password_type, const char *new);
int init_bios_attr_pass_interface(void);
void exit_bios_attr_pass_interface(void);

#endif