Lines Matching +full:firmware +full:- +full:name

1 // SPDX-License-Identifier: GPL-2.0
2 /* Builtin firmware support */
4 #include <linux/firmware.h>
5 #include "../firmware.h"
11 char *name; member
19 static bool fw_copy_to_prealloc_buf(struct firmware *fw, in fw_copy_to_prealloc_buf()
24 if (size < fw->size) in fw_copy_to_prealloc_buf()
26 memcpy(buf, fw->data, fw->size); in fw_copy_to_prealloc_buf()
31 * firmware_request_builtin() - load builtin firmware
32 * @fw: pointer to firmware struct
33 * @name: name of firmware file
38 * if the firmware was built-in and if so use it right away. This can be used
41 * This looks for the firmware in the built-in kernel. Only if the kernel was
42 * built-in with the firmware you are looking for will this return successfully.
45 * the firmware is expected to be provided locally on the stack of the caller.
47 bool firmware_request_builtin(struct firmware *fw, const char *name) in firmware_request_builtin() argument
55 if (strcmp(name, b_fw->name) == 0) { in firmware_request_builtin()
56 fw->size = b_fw->size; in firmware_request_builtin()
57 fw->data = b_fw->data; in firmware_request_builtin()
67 * firmware_request_builtin_buf() - load builtin firmware into optional buffer
68 * @fw: pointer to firmware struct
69 * @name: name of firmware file
70 * @buf: If set this lets you use a pre-allocated buffer so that the built-in
71 * firmware into is copied into. This field can be NULL. It is used by
75 * If the built-in firmware does not fit into the pre-allocated @buf this
78 * This looks for the firmware in the built-in kernel. Only if the kernel was
79 * built-in with the firmware you are looking for will this call possibly
80 * succeed. If you passed a @buf the firmware will be copied into it *iff* the
81 * built-in firmware fits into the pre-allocated buffer size specified in
86 bool firmware_request_builtin_buf(struct firmware *fw, const char *name, in firmware_request_builtin_buf() argument
89 if (!firmware_request_builtin(fw, name)) in firmware_request_builtin_buf()
95 bool firmware_is_builtin(const struct firmware *fw) in firmware_is_builtin()
100 if (fw->data == b_fw->data) in firmware_is_builtin()