Loading Documentation/devicetree/bindings/usb/msm-hsusb.txt +2 −0 Original line number Diff line number Diff line Loading @@ -232,6 +232,8 @@ Optional properties : turnaround timeout is observed on enabling streaming. Hence it is required to see these errors and number of erros on enabling this at USB level to make final decision to enable this feature or not. - qcom,android-usb-cdrom : if this property is present then device creates a new LUN as CD-ROM. - qcom,android-usb-uicc-nluns : Number of mass storage LUNs (8 bits) required for the UICC card. Example Android USB device node : Loading drivers/usb/gadget/android.c +10 −0 Original line number Diff line number Diff line Loading @@ -2208,6 +2208,14 @@ static int mass_storage_function_init(struct android_usb_function *f, snprintf(name[0], MAX_LUN_NAME, "lun"); config->fsg.luns[0].removable = 1; if (dev->pdata && dev->pdata->cdrom) { config->fsg.luns[config->fsg.nluns].cdrom = 1; config->fsg.luns[config->fsg.nluns].ro = 1; config->fsg.luns[config->fsg.nluns].removable = 0; snprintf(name[config->fsg.nluns], MAX_LUN_NAME, "rom"); config->fsg.nluns++; } if (uicc_nluns > FSG_MAX_LUNS - config->fsg.nluns) { uicc_nluns = FSG_MAX_LUNS - config->fsg.nluns; pr_debug("limiting uicc luns to %d\n", uicc_nluns); Loading Loading @@ -3532,6 +3540,8 @@ static int android_probe(struct platform_device *pdev) pdata->streaming_func_count = len; pdata->cdrom = of_property_read_bool(pdev->dev.of_node, "qcom,android-usb-cdrom"); ret = of_property_read_u8(pdev->dev.of_node, "qcom,android-usb-uicc-nluns", &pdata->uicc_nluns); Loading include/linux/usb/android.h +1 −0 Original line number Diff line number Diff line Loading @@ -28,6 +28,7 @@ struct android_usb_platform_data { char streaming_func[MAX_STREAMING_FUNCS][FUNC_NAME_LEN]; int streaming_func_count; u8 uicc_nluns; bool cdrom; }; #ifndef CONFIG_TARGET_CORE Loading Loading
Documentation/devicetree/bindings/usb/msm-hsusb.txt +2 −0 Original line number Diff line number Diff line Loading @@ -232,6 +232,8 @@ Optional properties : turnaround timeout is observed on enabling streaming. Hence it is required to see these errors and number of erros on enabling this at USB level to make final decision to enable this feature or not. - qcom,android-usb-cdrom : if this property is present then device creates a new LUN as CD-ROM. - qcom,android-usb-uicc-nluns : Number of mass storage LUNs (8 bits) required for the UICC card. Example Android USB device node : Loading
drivers/usb/gadget/android.c +10 −0 Original line number Diff line number Diff line Loading @@ -2208,6 +2208,14 @@ static int mass_storage_function_init(struct android_usb_function *f, snprintf(name[0], MAX_LUN_NAME, "lun"); config->fsg.luns[0].removable = 1; if (dev->pdata && dev->pdata->cdrom) { config->fsg.luns[config->fsg.nluns].cdrom = 1; config->fsg.luns[config->fsg.nluns].ro = 1; config->fsg.luns[config->fsg.nluns].removable = 0; snprintf(name[config->fsg.nluns], MAX_LUN_NAME, "rom"); config->fsg.nluns++; } if (uicc_nluns > FSG_MAX_LUNS - config->fsg.nluns) { uicc_nluns = FSG_MAX_LUNS - config->fsg.nluns; pr_debug("limiting uicc luns to %d\n", uicc_nluns); Loading Loading @@ -3532,6 +3540,8 @@ static int android_probe(struct platform_device *pdev) pdata->streaming_func_count = len; pdata->cdrom = of_property_read_bool(pdev->dev.of_node, "qcom,android-usb-cdrom"); ret = of_property_read_u8(pdev->dev.of_node, "qcom,android-usb-uicc-nluns", &pdata->uicc_nluns); Loading
include/linux/usb/android.h +1 −0 Original line number Diff line number Diff line Loading @@ -28,6 +28,7 @@ struct android_usb_platform_data { char streaming_func[MAX_STREAMING_FUNCS][FUNC_NAME_LEN]; int streaming_func_count; u8 uicc_nluns; bool cdrom; }; #ifndef CONFIG_TARGET_CORE Loading