stm.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
  2. /*
  3. * System Trace Module (STM) userspace interfaces
  4. * Copyright (c) 2014, Intel Corporation.
  5. *
  6. * STM class implements generic infrastructure for System Trace Module devices
  7. * as defined in MIPI STPv2 specification.
  8. */
  9. #ifndef _LINUX_STM_H
  10. #define _LINUX_STM_H
  11. #include <linux/types.h>
  12. /* Maximum allowed master and channel values */
  13. #define STP_MASTER_MAX 0xffff
  14. #define STP_CHANNEL_MAX 0xffff
  15. /**
  16. * struct stp_policy_id - identification for the STP policy
  17. * @size: size of the structure including real id[] length
  18. * @master: assigned master
  19. * @channel: first assigned channel
  20. * @width: number of requested channels
  21. * @id: identification string
  22. *
  23. * User must calculate the total size of the structure and put it into
  24. * @size field, fill out the @id and desired @width. In return, kernel
  25. * fills out @master, @channel and @width.
  26. */
  27. struct stp_policy_id {
  28. __u32 size;
  29. __u16 master;
  30. __u16 channel;
  31. __u16 width;
  32. /* padding */
  33. __u16 __reserved_0;
  34. __u32 __reserved_1;
  35. char id[];
  36. };
  37. #define STP_POLICY_ID_SET _IOWR('%', 0, struct stp_policy_id)
  38. #define STP_POLICY_ID_GET _IOR('%', 1, struct stp_policy_id)
  39. #define STP_SET_OPTIONS _IOW('%', 2, __u64)
  40. #endif /* _LINUX_STM_H */