Lines Matching +full:multi +full:- +full:instance
1 // SPDX-License-Identifier: GPL-2.0
4 * for use with hp-bioscfg driver.
6 * Copyright (c) 2022 Hewlett-Packard Inc.
14 * were introduced that exceeds 128-byte data size. Changes to handle
34 * -ENODEV if device is not found
35 * -EINVAL if the instance of 'Setup Admin' password is not found.
36 * -ENOMEM unable to allocate memory
44 int buffer_size, instance, ret; in hp_set_attribute() local
49 instance = hp_get_password_instance_for_type(SETUP_PASSWD); in hp_set_attribute()
50 if (instance < 0) { in hp_set_attribute()
51 ret = -EINVAL; in hp_set_attribute()
59 auth_token_choice = bioscfg_drv.password_data[instance].current_password; in hp_set_attribute()
68 ret = -ENOMEM; in hp_set_attribute()
76 ret = -EINVAL; in hp_set_attribute()
82 ret = -EINVAL; in hp_set_attribute()
109 * -EINVAL if the query was not successful at all
110 * -EINVAL if the output buffer size exceeds buffersize
136 return -ENOMEM; in hp_wmi_perform_query()
142 args->signature = 0x55434553; in hp_wmi_perform_query()
143 args->command = command; in hp_wmi_perform_query()
144 args->commandtype = query; in hp_wmi_perform_query()
145 args->datasize = insize; in hp_wmi_perform_query()
146 memcpy(args->data, buffer, flex_array_size(args, data, insize)); in hp_wmi_perform_query()
154 ret = -EINVAL; in hp_wmi_perform_query()
158 if (obj->type != ACPI_TYPE_BUFFER || in hp_wmi_perform_query()
159 obj->buffer.length < sizeof(*bios_return)) { in hp_wmi_perform_query()
161 ret = -EINVAL; in hp_wmi_perform_query()
165 bios_return = (struct bios_return *)obj->buffer.pointer; in hp_wmi_perform_query()
166 ret = bios_return->return_code; in hp_wmi_perform_query()
177 actual_outsize = min_t(u32, outsize, obj->buffer.length - sizeof(*bios_return)); in hp_wmi_perform_query()
178 memcpy_and_pad(buffer, outsize, obj->buffer.pointer + sizeof(*bios_return), in hp_wmi_perform_query()
197 * hp_ascii_to_utf16_unicode - Convert ascii string to UTF-16 unicode
199 * BIOS supports UTF-16 characters that are 2 bytes long. No variable
200 * multi-byte language supported.
237 * hp_wmi_set_bios_setting - Set setting's value in BIOS
243 * -ENOMEM unable to allocate memory
244 * -EINVAL buffer not allocated or too small
257 return -EINVAL; in hp_wmi_set_bios_setting()
259 if (obj->type != ACPI_TYPE_INTEGER) { in hp_wmi_set_bios_setting()
260 ret = -EINVAL; in hp_wmi_set_bios_setting()
264 ret = obj->integer.value; in hp_wmi_set_bios_setting()