firmware.h revision 1.12
11.12Sriastrad/* $NetBSD: firmware.h,v 1.12 2021/12/19 12:01:04 riastradh Exp $ */ 21.2Sriastrad 31.2Sriastrad/*- 41.2Sriastrad * Copyright (c) 2013 The NetBSD Foundation, Inc. 51.2Sriastrad * All rights reserved. 61.2Sriastrad * 71.2Sriastrad * This code is derived from software contributed to The NetBSD Foundation 81.2Sriastrad * by Taylor R. Campbell. 91.2Sriastrad * 101.2Sriastrad * Redistribution and use in source and binary forms, with or without 111.2Sriastrad * modification, are permitted provided that the following conditions 121.2Sriastrad * are met: 131.2Sriastrad * 1. Redistributions of source code must retain the above copyright 141.2Sriastrad * notice, this list of conditions and the following disclaimer. 151.2Sriastrad * 2. Redistributions in binary form must reproduce the above copyright 161.2Sriastrad * notice, this list of conditions and the following disclaimer in the 171.2Sriastrad * documentation and/or other materials provided with the distribution. 181.2Sriastrad * 191.2Sriastrad * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 201.2Sriastrad * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 211.2Sriastrad * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 221.2Sriastrad * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 231.2Sriastrad * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 241.2Sriastrad * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 251.2Sriastrad * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 261.2Sriastrad * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 271.2Sriastrad * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 281.2Sriastrad * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 291.2Sriastrad * POSSIBILITY OF SUCH DAMAGE. 301.2Sriastrad */ 311.2Sriastrad 321.2Sriastrad#ifndef _LINUX_FIRMWARE_H_ 331.2Sriastrad#define _LINUX_FIRMWARE_H_ 341.2Sriastrad 351.3Sriastrad#include <sys/types.h> 361.3Sriastrad 371.3Sriastrad#include <dev/firmload.h> 381.3Sriastrad 391.8Sriastrad#include <linux/slab.h> 401.8Sriastrad 411.3Sriastradstruct device; 421.11Sriastradstruct module; 431.3Sriastrad 441.3Sriastradstruct firmware { 451.7Sriastrad char *data; 461.3Sriastrad size_t size; 471.3Sriastrad}; 481.3Sriastrad 491.11Sriastrad#define firmware_request_nowarn linux_firmware_request_nowarn 501.11Sriastrad#define release_firmware linux_release_firmware 511.11Sriastrad#define request_firmware linux_request_firmware 521.12Sriastrad#define request_firmware_direct linux_request_firmware_direct 531.11Sriastrad#define request_firmware_nowait linux_request_firmware_nowait 541.11Sriastrad 551.11Sriastradint request_firmware(const struct firmware **, const char *, 561.11Sriastrad struct device *); 571.12Sriastradint request_firmware_direct(const struct firmware **, const char *, 581.12Sriastrad struct device *); 591.11Sriastradint firmware_request_nowarn(const struct firmware **, const char *, 601.11Sriastrad struct device *); 611.11Sriastradint request_firmware_nowait(struct module *, bool, const char *, 621.11Sriastrad struct device *, gfp_t, void *, 631.11Sriastrad void (*)(const struct firmware *, void *)); 641.11Sriastradvoid release_firmware(const struct firmware *); 651.3Sriastrad 661.2Sriastrad#endif /* _LINUX_FIRMWARE_H_ */ 67