blob: dcc786dfbc5249cc3249cf431c38bd4cb652421b [file] [log] [blame]
Pavankumar Kondeti17b52e72013-06-28 10:54:18 +05301#ifndef __LINUX_USB_MSM_EXT_CHG_H
2#define __LINUX_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/**
10 * struct msm_usb_chg_info - MSM USB charger block details.
11 * @chg_block_type: The type of charger block. QSCRATCH/ULPI.
12 * @page_offset: USB charger register base may not be aligned to
13 * PAGE_SIZE. The kernel driver aligns the base
14 * address and use it for memory mapping. This
15 * page_offset is used by user space to calaculate
16 * the corret charger register base address.
17 * @length: The length of the charger register address space.
18 */
19struct msm_usb_chg_info {
20 uint32_t chg_block_type;
21 off_t page_offset;
22 size_t length;
23};
24
25/* Get the MSM USB charger block information */
26#define MSM_USB_EXT_CHG_INFO _IOW('M', 0, struct msm_usb_chg_info)
27
28/* Vote against USB hardware low power mode */
29#define MSM_USB_EXT_CHG_BLOCK_LPM _IOW('M', 1, int)
30
31#endif /* __LINUX_USB_MSM_EXT_CHG_H */