Lines Matching +full:integer +full:- +full:n
1 // SPDX-License-Identifier: GPL-2.0
3 * Functions corresponding to integer type attributes under BIOS Integer GUID for use with
4 * dell-wmi-sysman
9 #include "dell-wmi-sysman.h"
13 get_instance_id(integer);
27 return -EIO; in current_value_show()
28 if (obj->package.elements[CURRENT_VAL].type != ACPI_TYPE_INTEGER) { in current_value_show()
30 return -EINVAL; in current_value_show()
32 ret = snprintf(buf, PAGE_SIZE, "%lld\n", obj->package.elements[CURRENT_VAL].integer.value); in current_value_show()
38 * validate_integer_input() - Validate input of current_value against lower and upper bound
52 return -EINVAL; in validate_integer_input()
55 * validate input to avoid setting 0 when integer input passed with + sign in validate_integer_input()
63 attribute_s_property_show(display_name_language_code, integer);
67 attribute_s_property_show(display_name, integer);
71 attribute_n_property_show(default_value, integer);
75 attribute_property_store(current_value, integer);
79 attribute_s_property_show(dell_modifier, integer);
83 attribute_n_property_show(min_value, integer);
87 attribute_n_property_show(max_value, integer);
91 attribute_n_property_show(scalar_increment, integer);
98 return sprintf(buf, "integer\n"); in type_show()
129 ret = -ENOMEM; in alloc_int_data()
135 * populate_int_data() - Populate all properties of an instance under integer attribute
136 * @integer_obj: ACPI object with integer data
144 if (check_property_type(integer, ATTR_NAME, ACPI_TYPE_STRING)) in populate_int_data()
145 return -EINVAL; in populate_int_data()
148 if (check_property_type(integer, DISPL_NAME_LANG_CODE, ACPI_TYPE_STRING)) in populate_int_data()
149 return -EINVAL; in populate_int_data()
152 if (check_property_type(integer, DISPLAY_NAME, ACPI_TYPE_STRING)) in populate_int_data()
153 return -EINVAL; in populate_int_data()
156 if (check_property_type(integer, DEFAULT_VAL, ACPI_TYPE_INTEGER)) in populate_int_data()
157 return -EINVAL; in populate_int_data()
160 if (check_property_type(integer, MODIFIER, ACPI_TYPE_STRING)) in populate_int_data()
161 return -EINVAL; in populate_int_data()
164 if (check_property_type(integer, MIN_VALUE, ACPI_TYPE_INTEGER)) in populate_int_data()
165 return -EINVAL; in populate_int_data()
168 if (check_property_type(integer, MAX_VALUE, ACPI_TYPE_INTEGER)) in populate_int_data()
169 return -EINVAL; in populate_int_data()
172 if (check_property_type(integer, SCALAR_INCR, ACPI_TYPE_INTEGER)) in populate_int_data()
173 return -EINVAL; in populate_int_data()
181 * exit_int_attributes() - Clear all attribute data