hx280enc.h 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. /*------------------------------------------------------------------------------
  2. -- --
  3. -- This software is confidential and proprietary and may be used --
  4. -- only as expressly authorized by a licensing agreement from --
  5. -- --
  6. -- Hantro Products Oy. --
  7. -- --
  8. -- (C) COPYRIGHT 2006 HANTRO PRODUCTS OY --
  9. -- ALL RIGHTS RESERVED --
  10. -- --
  11. -- The entire notice above must be reproduced --
  12. -- on all copies and should not be removed. --
  13. -- --
  14. --------------------------------------------------------------------------------
  15. --
  16. -- Abstract : 6280/7280/8270/8290 Encoder device driver (kernel module)
  17. --
  18. ------------------------------------------------------------------------------*/
  19. #ifndef _HX280ENC_H_
  20. #define _HX280ENC_H_
  21. #include <linux/ioctl.h> /* needed for the _IOW etc stuff used later */
  22. /*
  23. * Macros to help debugging
  24. */
  25. #undef PDEBUG /* undef it, just in case */
  26. #ifdef HX280ENC_DEBUG
  27. # ifdef __KERNEL__
  28. /* This one if debugging is on, and kernel space */
  29. # define PDEBUG(fmt, args...) printk( KERN_INFO "hmp4e: " fmt, ## args)
  30. # else
  31. /* This one for user space */
  32. # define PDEBUG(fmt, args...) printf(__FILE__ ":%d: " fmt, __LINE__ , ## args)
  33. # endif
  34. #else
  35. # define PDEBUG(fmt, args...) /* not debugging: nothing */
  36. #endif
  37. /*
  38. * Ioctl definitions
  39. */
  40. /* Use 'k' as magic number */
  41. #define HX280ENC_IOC_MAGIC 'k'
  42. /*
  43. * S means "Set" through a ptr,
  44. * T means "Tell" directly with the argument value
  45. * G means "Get": reply by setting through a pointer
  46. * Q means "Query": response is on the return value
  47. * X means "eXchange": G and S atomically
  48. * H means "sHift": T and Q atomically
  49. */
  50. /*
  51. * #define HX280ENC_IOCGBUFBUSADDRESS _IOR(HX280ENC_IOC_MAGIC, 1, unsigned long *)
  52. * #define HX280ENC_IOCGBUFSIZE _IOR(HX280ENC_IOC_MAGIC, 2, unsigned int *)
  53. */
  54. #define HX280ENC_IOCGHWOFFSET _IOR(HX280ENC_IOC_MAGIC, 3, unsigned long *)
  55. #define HX280ENC_IOCGHWIOSIZE _IOR(HX280ENC_IOC_MAGIC, 4, unsigned int *)
  56. #define HX280ENC_IOC_CLI _IO(HX280ENC_IOC_MAGIC, 5)
  57. #define HX280ENC_IOC_STI _IO(HX280ENC_IOC_MAGIC, 6)
  58. #define HX280ENC_IOCXVIRT2BUS _IOWR(HX280ENC_IOC_MAGIC, 7, unsigned long *)
  59. #define HX280ENC_IOCHARDRESET _IO(HX280ENC_IOC_MAGIC, 8) /* debugging tool */
  60. #define HX280ENC_IOC_MAXNR 8
  61. #endif /* !_HX280ENC_H_ */