Path: blob/main/sys/compat/linuxkpi/common/include/linux/acpi.h
39604 views
/*-1* SPDX-License-Identifier: BSD-2-Clause2*3* Copyright (c) 2020 Vladimir Kondratyev <[email protected]>4*5* Redistribution and use in source and binary forms, with or without6* modification, are permitted provided that the following conditions are7* met:8* 1. Redistributions of source code must retain the above copyright9* notice, this list of conditions and the following disclaimer.10* 2. Redistributions in binary form must reproduce the above copyright11* notice, this list of conditions and the following disclaimer in12* the documentation and/or other materials provided with the13* distribution.14*15* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND16* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE17* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE18* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE19* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL20* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS21* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)22* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT23* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY24* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF25* SUCH DAMAGE.26*/2728#ifndef _LINUXKPI_LINUX_ACPI_H_29#define _LINUXKPI_LINUX_ACPI_H_3031#include <linux/device.h>32#include <linux/uuid.h>3334#if defined(__aarch64__) || defined(__amd64__) || defined(__i386__)3536#include <acpi/acpi.h>37#include <acpi/acpi_bus.h>3839#define ACPI_HANDLE(dev) \40((dev)->bsddev != NULL ? bsd_acpi_get_handle((dev)->bsddev) : NULL)41#define acpi_device_handle(dev) \42((dev) != NULL ? bsd_acpi_get_handle(dev) : NULL)43static inline void acpi_dev_put(struct acpi_device *adev) {}44#define acpi_handle_debug(handle, fmt, ...)4546#endif4748#endif /* _LINUXKPI_LINUX_ACPI_H_ */495051