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

// SPDX-License-Identifier: GPL-2.0
/*
 * Functions corresponding to integer type attributes under
 * BIOS Enumeration GUID for use with hp-bioscfg driver.
 *
 * Copyright (c) 2022 Hewlett-Packard Inc.
 */

#include "bioscfg.h"

GET_INSTANCE_ID(integer);

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

/**
 * validate_integer_input() -
 * Validate input of current_value against lower and upper bound
 *
 * @instance_id: The instance on which input is validated
 * @buf: Input value
 */
static int validate_integer_input(int instance_id, char *buf)
{}

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

ATTRIBUTE_S_COMMON_PROPERTY_SHOW(display_name, integer);
static struct kobj_attribute integer_display_name =;

ATTRIBUTE_PROPERTY_STORE(current_value, integer);
static struct kobj_attribute integer_current_val =;

ATTRIBUTE_N_PROPERTY_SHOW(lower_bound, integer);
static struct kobj_attribute integer_lower_bound =;

ATTRIBUTE_N_PROPERTY_SHOW(upper_bound, integer);
static struct kobj_attribute integer_upper_bound =;

ATTRIBUTE_N_PROPERTY_SHOW(scalar_increment, integer);
static struct kobj_attribute integer_scalar_increment =;

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

static struct kobj_attribute integer_type =;

static struct attribute *integer_attrs[] =;

static const struct attribute_group integer_attr_group =;

int hp_alloc_integer_data(void)
{}

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

static int hp_populate_integer_elements_from_package(union acpi_object *integer_obj,
						     int integer_obj_count,
						     int instance_id)
{}

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

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

/**
 * hp_populate_integer_buffer_data() -
 * Populate all properties of an instance under integer 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_integer_buffer_data(u8 *buffer_ptr, u32 *buffer_size, int instance_id,
				    struct kobject *attr_name_kobj)
{}

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