aboutsummaryrefslogtreecommitdiff
path: root/sys/compat/linuxkpi/common/include/acpi/acpi_bus.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/compat/linuxkpi/common/include/acpi/acpi_bus.h')
-rw-r--r--sys/compat/linuxkpi/common/include/acpi/acpi_bus.h31
1 files changed, 23 insertions, 8 deletions
diff --git a/sys/compat/linuxkpi/common/include/acpi/acpi_bus.h b/sys/compat/linuxkpi/common/include/acpi/acpi_bus.h
index abee5223af60..da50d25a63bb 100644
--- a/sys/compat/linuxkpi/common/include/acpi/acpi_bus.h
+++ b/sys/compat/linuxkpi/common/include/acpi/acpi_bus.h
@@ -1,5 +1,5 @@
/*-
- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ * SPDX-License-Identifier: BSD-2-Clause
*
* Copyright (c) 2020 Vladimir Kondratyev <wulf@FreeBSD.org>
*
@@ -24,12 +24,13 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
- *
- * $FreeBSD$
*/
-#ifndef _ACPI_ACPI_BUS_H_
-#define _ACPI_ACPI_BUS_H_
+#ifndef _LINUXKPI_ACPI_ACPI_BUS_H_
+#define _LINUXKPI_ACPI_ACPI_BUS_H_
+
+/* Aliase struct acpi_device to device_t */
+#define acpi_device _device
typedef char acpi_device_class[20];
@@ -39,14 +40,28 @@ struct acpi_bus_event {
uint32_t data;
};
+#define acpi_dev_present(...) lkpi_acpi_dev_present(__VA_ARGS__)
+#define acpi_dev_get_first_match_dev(...) \
+ lkpi_acpi_dev_get_first_match_dev(__VA_ARGS__)
+
ACPI_HANDLE bsd_acpi_get_handle(device_t bsddev);
-bool acpi_check_dsm(ACPI_HANDLE handle, const char *uuid, int rev,
+bool acpi_check_dsm(ACPI_HANDLE handle, const guid_t *uuid, int rev,
uint64_t funcs);
-ACPI_OBJECT * acpi_evaluate_dsm_typed(ACPI_HANDLE handle, const char *uuid,
+ACPI_OBJECT * acpi_evaluate_dsm_typed(ACPI_HANDLE handle, const guid_t *uuid,
int rev, int func, ACPI_OBJECT *argv4,
ACPI_OBJECT_TYPE type);
int register_acpi_notifier(struct notifier_block *nb);
int unregister_acpi_notifier(struct notifier_block *nb);
uint32_t acpi_target_system_state(void);
+bool lkpi_acpi_dev_present(const char *hid, const char *uid,
+ int64_t hrv);
+struct acpi_device *lkpi_acpi_dev_get_first_match_dev(const char *hid,
+ const char *uid, int64_t hrv);
+
+union linuxkpi_acpi_object;
+
+union linuxkpi_acpi_object *
+acpi_evaluate_dsm(ACPI_HANDLE ObjHandle, const guid_t *guid,
+ UINT64 rev, UINT64 func, union linuxkpi_acpi_object *arg);
-#endif /* !_ACPI_ACPI_BUS_H_ */
+#endif /* _LINUXKPI_ACPI_ACPI_BUS_H_ */