Loading drivers/usb/dwc3/dwc3-msm.c +24 −0 Original line number Diff line number Diff line Loading @@ -2043,6 +2043,30 @@ dwc3_msm_ext_chg_ioctl(struct file *file, unsigned int cmd, unsigned long arg) pm_runtime_put(mdwc->dev); } break; case MSM_USB_EXT_CHG_VOLTAGE_INFO: if (get_user(val, (int __user *)arg)) { pr_err("%s: get_user failed\n\n", __func__); ret = -EFAULT; break; } if (val == USB_REQUEST_5V) pr_debug("%s:voting 5V voltage request\n", __func__); else if (val == USB_REQUEST_9V) pr_debug("%s:voting 9V voltage request\n", __func__); break; case MSM_USB_EXT_CHG_RESULT: if (get_user(val, (int __user *)arg)) { pr_err("%s: get_user failed\n\n", __func__); ret = -EFAULT; break; } if (!val) pr_debug("%s:voltage request successful\n", __func__); else pr_debug("%s:voltage request failed\n", __func__); break; default: ret = -EINVAL; } Loading include/uapi/linux/usb/msm_ext_chg.h +7 −0 Original line number Diff line number Diff line Loading @@ -6,6 +6,8 @@ #define USB_CHG_BLOCK_ULPI 1 #define USB_CHG_BLOCK_QSCRATCH 2 #define USB_REQUEST_5V 1 #define USB_REQUEST_9V 2 /** * struct msm_usb_chg_info - MSM USB charger block details. * @chg_block_type: The type of charger block. QSCRATCH/ULPI. Loading @@ -28,4 +30,9 @@ struct msm_usb_chg_info { /* Vote against USB hardware low power mode */ #define MSM_USB_EXT_CHG_BLOCK_LPM _IOW('M', 1, int) /* To tell kernel about voltage being voted */ #define MSM_USB_EXT_CHG_VOLTAGE_INFO _IOW('M', 2, int) /* To tell kernel about voltage request result */ #define MSM_USB_EXT_CHG_RESULT _IOW('M', 3, int) #endif /* __UAPI_USB_MSM_EXT_CHG_H */ Loading
drivers/usb/dwc3/dwc3-msm.c +24 −0 Original line number Diff line number Diff line Loading @@ -2043,6 +2043,30 @@ dwc3_msm_ext_chg_ioctl(struct file *file, unsigned int cmd, unsigned long arg) pm_runtime_put(mdwc->dev); } break; case MSM_USB_EXT_CHG_VOLTAGE_INFO: if (get_user(val, (int __user *)arg)) { pr_err("%s: get_user failed\n\n", __func__); ret = -EFAULT; break; } if (val == USB_REQUEST_5V) pr_debug("%s:voting 5V voltage request\n", __func__); else if (val == USB_REQUEST_9V) pr_debug("%s:voting 9V voltage request\n", __func__); break; case MSM_USB_EXT_CHG_RESULT: if (get_user(val, (int __user *)arg)) { pr_err("%s: get_user failed\n\n", __func__); ret = -EFAULT; break; } if (!val) pr_debug("%s:voltage request successful\n", __func__); else pr_debug("%s:voltage request failed\n", __func__); break; default: ret = -EINVAL; } Loading
include/uapi/linux/usb/msm_ext_chg.h +7 −0 Original line number Diff line number Diff line Loading @@ -6,6 +6,8 @@ #define USB_CHG_BLOCK_ULPI 1 #define USB_CHG_BLOCK_QSCRATCH 2 #define USB_REQUEST_5V 1 #define USB_REQUEST_9V 2 /** * struct msm_usb_chg_info - MSM USB charger block details. * @chg_block_type: The type of charger block. QSCRATCH/ULPI. Loading @@ -28,4 +30,9 @@ struct msm_usb_chg_info { /* Vote against USB hardware low power mode */ #define MSM_USB_EXT_CHG_BLOCK_LPM _IOW('M', 1, int) /* To tell kernel about voltage being voted */ #define MSM_USB_EXT_CHG_VOLTAGE_INFO _IOW('M', 2, int) /* To tell kernel about voltage request result */ #define MSM_USB_EXT_CHG_RESULT _IOW('M', 3, int) #endif /* __UAPI_USB_MSM_EXT_CHG_H */