surface_acpi_notify.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  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 <[email protected]>
  9. */
  10. #ifndef _LINUX_SURFACE_ACPI_NOTIFY_H
  11. #define _LINUX_SURFACE_ACPI_NOTIFY_H
  12. #include <linux/notifier.h>
  13. #include <linux/types.h>
  14. /**
  15. * struct san_dgpu_event - Discrete GPU ACPI event.
  16. * @category: Category of the event.
  17. * @target: Target ID of the event source.
  18. * @command: Command ID of the event.
  19. * @instance: Instance ID of the event source.
  20. * @length: Length of the event's payload data (in bytes).
  21. * @payload: Pointer to the event's payload data.
  22. */
  23. struct san_dgpu_event {
  24. u8 category;
  25. u8 target;
  26. u8 command;
  27. u8 instance;
  28. u16 length;
  29. u8 *payload;
  30. };
  31. int san_client_link(struct device *client);
  32. int san_dgpu_notifier_register(struct notifier_block *nb);
  33. int san_dgpu_notifier_unregister(struct notifier_block *nb);
  34. #endif /* _LINUX_SURFACE_ACPI_NOTIFY_H */