linux/drivers/platform/x86/hp/hp-bioscfg/string-attributes.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Functions corresponding to string type attributes under
 * HP_WMI_BIOS_STRING_GUID for use with hp-bioscfg driver.
 *
 * Copyright (c) 2022 HP Development Company, L.P.
 */

#include "bioscfg.h"

#define WMI_STRING_TYPE

GET_INSTANCE_ID(string);

static ssize_t current_value_show(struct kobject *kobj, struct kobj_attribute *attr, char *buf)
{}

/**
 * validate_string_input() -
 * Validate input of current_value against min and max lengths
 *
 * @instance_id: The instance on which input is validated
 * @buf: Input value
 */
static int validate_string_input(int instance_id, const char *buf)
{}

static void update_string_value(int instance_id, char *attr_value)
{}

/*
 * ATTRIBUTE_S_COMMON_PROPERTY_SHOW(display_name_language_code, string);
 * static struct kobj_attribute string_display_langcode =
 *	__ATTR_RO(display_name_language_code);
 */

ATTRIBUTE_S_COMMON_PROPERTY_SHOW(display_name, string);
static struct kobj_attribute string_display_name =;

ATTRIBUTE_PROPERTY_STORE(current_value, string);
static struct kobj_attribute string_current_val =;

ATTRIBUTE_N_PROPERTY_SHOW(min_length, string);
static struct kobj_attribute string_min_length =;

ATTRIBUTE_N_PROPERTY_SHOW(max_length, string);
static struct kobj_attribute string_max_length =;

static ssize_t type_show(struct kobject *kobj, struct kobj_attribute *attr,
			 char *buf)
{}

static struct kobj_attribute string_type =;

static struct attribute *string_attrs[] =;

static const struct attribute_group string_attr_group =;

int hp_alloc_string_data(void)
{}

/* Expected Values types associated with each element */
static const acpi_object_type expected_string_types[] =;

static int hp_populate_string_elements_from_package(union acpi_object *string_obj,
						    int string_obj_count,
						    int instance_id)
{}

/**
 * hp_populate_string_package_data() -
 * Populate all properties of an instance under string attribute
 *
 * @string_obj: ACPI object with string data
 * @instance_id: The instance to enumerate
 * @attr_name_kobj: The parent kernel object
 */
int hp_populate_string_package_data(union acpi_object *string_obj,
				    int instance_id,
				    struct kobject *attr_name_kobj)
{}

static int hp_populate_string_elements_from_buffer(u8 *buffer_ptr, u32 *buffer_size,
						   int instance_id)
{}

/**
 * hp_populate_string_buffer_data() -
 * Populate all properties of an instance under string attribute
 *
 * @buffer_ptr: Buffer pointer
 * @buffer_size: Buffer size
 * @instance_id: The instance to enumerate
 * @attr_name_kobj: The parent kernel object
 */
int hp_populate_string_buffer_data(u8 *buffer_ptr, u32 *buffer_size,
				   int instance_id,
				   struct kobject *attr_name_kobj)
{}

/**
 * hp_exit_string_attributes() - Clear all attribute data
 *
 * Clears all data allocated for this group of attributes
 */
void hp_exit_string_attributes(void)
{}