Advertisement
Guest User

Untitled

a guest
Aug 20th, 2017
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.36 KB | None | 0 0
  1. #ifndef __UAPI_USB_MSM_EXT_CHG_H
  2. #define __UAPI_USB_MSM_EXT_CHG_H
  3.  
  4. #include <linux/ioctl.h>
  5.  
  6. #define USB_CHG_BLOCK_ULPI 1
  7. #define USB_CHG_BLOCK_QSCRATCH 2
  8.  
  9. #define USB_REQUEST_5V 1
  10. #define USB_REQUEST_9V 2
  11. /**
  12. * struct msm_usb_chg_info - MSM USB charger block details.
  13. * @chg_block_type: The type of charger block. QSCRATCH/ULPI.
  14. * @page_offset: USB charger register base may not be aligned to
  15. * PAGE_SIZE. The kernel driver aligns the base
  16. * address and use it for memory mapping. This
  17. * page_offset is used by user space to calaculate
  18. * the corret charger register base address.
  19. * @length: The length of the charger register address space.
  20. */
  21. struct msm_usb_chg_info {
  22. uint32_t chg_block_type;
  23. __kernel_off_t page_offset;
  24. size_t length;
  25. };
  26.  
  27. /* Get the MSM USB charger block information */
  28. #define MSM_USB_EXT_CHG_INFO _IOW('M', 0, struct msm_usb_chg_info)
  29.  
  30. /* Vote against USB hardware low power mode */
  31. #define MSM_USB_EXT_CHG_BLOCK_LPM _IOW('M', 1, int)
  32.  
  33. /* To tell kernel about voltage being voted */
  34. #define MSM_USB_EXT_CHG_VOLTAGE_INFO _IOW('M', 2, int)
  35.  
  36. /* To tell kernel about voltage request result */
  37. #define MSM_USB_EXT_CHG_RESULT _IOW('M', 3, int)
  38.  
  39. /* To tell kernel whether charger connected is external charger or not */
  40. #define MSM_USB_EXT_CHG_TYPE _IOW('M', 4, int)
  41. #endif /* __UAPI_USB_MSM_EXT_CHG_H */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement