shf_kernel.h 829 B

123456789101112131415161718192021222324252627282930313233
  1. #ifndef SHF_KERNEL_H
  2. #define SHF_KERNEL_H
  3. #include <linux/types.h>
  4. /* IPI received data cache */
  5. #define SHF_IPI_PROTOCOL_BYTES (48)
  6. struct ipi_data_t {
  7. uint8_t data[SHF_IPI_PROTOCOL_BYTES];
  8. size_t size;
  9. };
  10. struct ipi_buffer_t {
  11. size_t head;
  12. size_t tail;
  13. size_t size; /* data count */
  14. struct ipi_data_t *data;
  15. };
  16. #define SHF_IOW(num, dtype) _IOW('S', num, dtype)
  17. #define SHF_IOR(num, dtype) _IOR('S', num, dtype)
  18. #define SHF_IOWR(num, dtype) _IOWR('S', num, dtype)
  19. #define SHF_IO(num) _IO('S', num)
  20. #define SHF_IPI_SEND SHF_IOW(1, struct ipi_data_t)
  21. #define SHF_IPI_POLL SHF_IOR(2, struct ipi_data_t)
  22. #define SHF_GESTURE_ENABLE SHF_IOW(3, int)
  23. #ifdef CONFIG_MTK_SENSOR_HUB_SUPPORT
  24. extern void tpd_scp_wakeup_enable(bool enable);
  25. #endif
  26. #endif /* SHF_KERNEL_H */