1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
2 | /* |
3 | * Interface for Surface ACPI Notify (SAN) driver. |
4 | * |
5 | * Provides access to discrete GPU notifications sent from ACPI via the SAN |
6 | * driver, which are not handled by this driver directly. |
7 | * |
8 | * Copyright (C) 2019-2020 Maximilian Luz <luzmaximilian@gmail.com> |
9 | */ |
10 | |
11 | #ifndef _LINUX_SURFACE_ACPI_NOTIFY_H |
12 | #define _LINUX_SURFACE_ACPI_NOTIFY_H |
13 | |
14 | #include <linux/notifier.h> |
15 | #include <linux/types.h> |
16 | |
17 | /** |
18 | * struct san_dgpu_event - Discrete GPU ACPI event. |
19 | * @category: Category of the event. |
20 | * @target: Target ID of the event source. |
21 | * @command: Command ID of the event. |
22 | * @instance: Instance ID of the event source. |
23 | * @length: Length of the event's payload data (in bytes). |
24 | * @payload: Pointer to the event's payload data. |
25 | */ |
26 | struct san_dgpu_event { |
27 | u8 category; |
28 | u8 target; |
29 | u8 command; |
30 | u8 instance; |
31 | u16 length; |
32 | u8 *payload; |
33 | }; |
34 | |
35 | int san_client_link(struct device *client); |
36 | int san_dgpu_notifier_register(struct notifier_block *nb); |
37 | int san_dgpu_notifier_unregister(struct notifier_block *nb); |
38 | |
39 | #endif /* _LINUX_SURFACE_ACPI_NOTIFY_H */ |
40 | |