usb: gadget: Move CONFIG_USB_GADGET_VBUS_DRAW to Kconfig
Subsystems (7)
PATCH v2 1/8 usb: gadget: Move CONFIG_USB_GADGET_VBUS_DRAW to Kconfig
From: Sam Protsenko <[email protected]>
The description was borrowed from kernel. Definitions were added to defconfig files in a way that "make savedefconfig" generates exactly the same file as used defconfig.
Boards using 0 mA as CONFIG_USB_GADGET_VBUS_DRAW value were moved to use 2 mA (as minimal allowed by Kconfig).
---
Changes for v2:
- set minimal VBUS_DRAW value to 2 mA in range in Kconfig
- set minimal VBUS_DRAW values to 2 mA for all boards (even for ones that are using 0 mA)
drivers/usb/gadget/Kconfig | 21 +++++++++++++++++++++ include/configs/am335x_evm.h | 1 - include/configs/am43xx_evm.h | 5 ++++- include/configs/baltos.h | 1 - include/configs/bav335x.h | 1 - include/configs/bcm28155_ap.h | 1 - include/configs/cgtqmx6eval.h | 1 - include/configs/colibri_vf.h | 1 - include/configs/corvus.h | 1 - include/configs/dra7xx_evm.h | 1 - include/configs/exynos4-common.h | 1 - include/configs/gw_ventana.h | 1 - include/configs/kc1.h | 1 - include/configs/mx6sabre_common.h | 1 - include/configs/mx7dsabresd.h | 1 - include/configs/nitrogen6x.h | 1 - include/configs/odroid_xu3.h | 1 - include/configs/omap3_beagle.h | 1 - include/configs/omap3_logic.h | 1 - include/configs/omap5_uevm.h | 1 - include/configs/pengwyn.h | 1 - include/configs/s5p_goni.h | 1 - include/configs/siemens-am33x-common.h | 1 - include/configs/smartweb.h | 1 - include/configs/sniper.h | 1 - include/configs/socfpga_common.h | 1 - include/configs/sunxi-common.h | 1 - include/configs/taurus.h | 1 - include/configs/tbs2910.h | 1 - include/configs/tegra-common-usb-gadget.h | 1 - include/configs/warp.h | 1 - include/configs/xilinx_zynqmp.h | 1 - include/configs/zynq-common.h | 1 - 33 files changed, 25 insertions(+), 32 deletions(-)
drivers/usb/gadget/Kconfig +21 -0
@@ -33,3 +33,24 @@ menuconfig USB_GADGET a USB peripheral device. Configure one hardware driver for your peripheral/device side bus controller, and a "gadget driver" for your peripheral protocol. + +if USB_GADGET + +config USB_GADGET_VBUS_DRAW + int "Maximum VBUS Power usage (2-500 mA)" + range 2 500 + default 2 + help + Some devices need to draw power from USB when they are + configured, perhaps to operate circuitry or to recharge + batteries. This is in addition to any local power supply, + such as an AC adapter or batteries. + + Enter the maximum power your device draws through USB, in + milliAmperes. The permitted range of values is 2 - 500 mA; + 0 mA would be legal, but can make some hosts misbehave. + + This value will be used except for system-specific gadget + drivers that have more specific information. + +endif # USB_GADGET
include/configs/am335x_evm.h +0 -1
@@ -290,7 +290,6 @@#define CONFIG_USB_MUSB_DISABLE_BULK_COMBINE_SPLIT #define CONFIG_USB_GADGET_DOWNLOAD #define CONFIG_USB_GADGET_DUALSPEED -#define CONFIG_USB_GADGET_VBUS_DRAW 2#define CONFIG_USB_MUSB_HOST #define CONFIG_AM335X_USB0 #define CONFIG_AM335X_USB0_MODE MUSB_PERIPHERAL
include/configs/am43xx_evm.h +4 -1
@@ -122,6 +122,10 @@#endif /* USB GADGET */ +#if defined(CONFIG_SPL_BUILD ) && !defined(CONFIG_SPL_USBETH_SUPPORT ) +#undef CONFIG_USB_GADGET_VBUS_DRAW +#endif +#if !defined(CONFIG_SPL_BUILD ) || \ (defined(CONFIG_SPL_BUILD ) && defined(CONFIG_SPL_USBETH_SUPPORT ))#define CONFIG_USB_DWC3_PHY_OMAP
@@ -130,7 +134,6 @@#define CONFIG_USB_DWC3_GADGET #define CONFIG_USB_GADGET_DOWNLOAD -#define CONFIG_USB_GADGET_VBUS_DRAW 2#define CONFIG_G_DNL_MANUFACTURER "Texas Instruments"#define CONFIG_G_DNL_VENDOR_NUM 0x0403#define CONFIG_G_DNL_PRODUCT_NUM 0xBD00
include/configs/baltos.h +0 -1
@@ -276,7 +276,6 @@#define CONFIG_USB_MUSB_DISABLE_BULK_COMBINE_SPLIT #define CONFIG_USBDOWNLOAD_GADGET #define CONFIG_USB_GADGET_DUALSPEED -#define CONFIG_USB_GADGET_VBUS_DRAW 2#define CONFIG_USB_MUSB_HOST #define CONFIG_AM335X_USB0 #define CONFIG_AM335X_USB0_MODE MUSB_HOST
include/configs/bav335x.h +0 -1
@@ -441,7 +441,6 @@ DEFAULT_LINUX_BOOT_ENV \#define CONFIG_USB_MUSB_DISABLE_BULK_COMBINE_SPLIT #define CONFIG_USB_GADGET_DOWNLOAD #define CONFIG_USB_GADGET_DUALSPEED -#define CONFIG_USB_GADGET_VBUS_DRAW 2#define CONFIG_USB_MUSB_HOST #define CONFIG_AM335X_USB0 #define CONFIG_AM335X_USB0_MODE MUSB_PERIPHERAL
include/configs/bcm28155_ap.h +0 -1
@@ -139,7 +139,6 @@#define CONFIG_FASTBOOT_BUF_SIZE (CONFIG_SYS_SDRAM_SIZE - SZ_1M)#define CONFIG_FASTBOOT_BUF_ADDR CONFIG_SYS_SDRAM_BASE#define CONFIG_USB_GADGET_DUALSPEED -#define CONFIG_USB_GADGET_VBUS_DRAW 0#define CONFIG_USB_GADGET_DWC2_OTG #define CONFIG_USB_GADGET_BCM_UDC_OTG_PHY #define CONFIG_USB_GADGET_DOWNLOAD
include/configs/cgtqmx6eval.h +0 -1
@@ -93,7 +93,6 @@#define CONFIG_CMD_USB_MASS_STORAGE #define CONFIG_USB_FUNCTION_MASS_STORAGE #define CONFIG_USB_GADGET_DOWNLOAD -#define CONFIG_USB_GADGET_VBUS_DRAW 2#define CONFIG_G_DNL_VENDOR_NUM 0x0525#define CONFIG_G_DNL_PRODUCT_NUM 0xa4a5
include/configs/colibri_vf.h +0 -1
@@ -235,7 +235,6 @@/* USB Client Support */ #define CONFIG_CI_UDC #define CONFIG_USB_GADGET_DUALSPEED -#define CONFIG_USB_GADGET_VBUS_DRAW 2#define CONFIG_TRDX_VID 0x1B67#define CONFIG_TRDX_PID_COLIBRI_VF50 0x0016#define CONFIG_TRDX_PID_COLIBRI_VF61 0x0017
include/configs/corvus.h +0 -1
@@ -125,7 +125,6 @@#define CONFIG_USB_FUNCTION_DFU #define CONFIG_DFU_NAND #define CONFIG_USB_GADGET_DOWNLOAD -#define CONFIG_USB_GADGET_VBUS_DRAW 2#define CONFIG_SYS_DFU_DATA_BUF_SIZE (SZ_1M)#define DFU_MANIFEST_POLL_TIMEOUT 25000
include/configs/dra7xx_evm.h +0 -1
@@ -233,7 +233,6 @@#define CONFIG_USB_DWC3_GADGET #define CONFIG_USB_GADGET_DOWNLOAD -#define CONFIG_USB_GADGET_VBUS_DRAW 2#define CONFIG_G_DNL_MANUFACTURER "Texas Instruments"#define CONFIG_G_DNL_VENDOR_NUM 0x0451#define CONFIG_G_DNL_PRODUCT_NUM 0xd022
include/configs/exynos4-common.h +0 -1
@@ -53,7 +53,6 @@#define CONFIG_USB_GADGET_DWC2_OTG #define CONFIG_USB_GADGET_DWC2_OTG_PHY #define CONFIG_USB_GADGET_DUALSPEED -#define CONFIG_USB_GADGET_VBUS_DRAW 2#define CONFIG_CMD_USB_MASS_STORAGE #define CONFIG_USB_FUNCTION_MASS_STORAGE
include/configs/gw_ventana.h +0 -1
@@ -196,7 +196,6 @@#define CONFIG_CMD_USB_MASS_STORAGE #define CONFIG_USB_FUNCTION_MASS_STORAGE #define CONFIG_USB_GADGET_DOWNLOAD -#define CONFIG_USB_GADGET_VBUS_DRAW 2/* Netchip IDs */ #define CONFIG_G_DNL_VENDOR_NUM 0x0525
include/configs/kc1.h +0 -1
@@ -185,7 +185,6 @@#define CONFIG_USB_MUSB_OMAP2PLUS #define CONFIG_USB_GADGET_DUALSPEED -#define CONFIG_USB_GADGET_VBUS_DRAW 0/* * Download
include/configs/mx6sabre_common.h +0 -1
@@ -241,7 +241,6 @@#define CONFIG_CMD_USB_MASS_STORAGE #define CONFIG_USB_FUNCTION_MASS_STORAGE #define CONFIG_USB_GADGET_DOWNLOAD -#define CONFIG_USB_GADGET_VBUS_DRAW 2#define CONFIG_G_DNL_VENDOR_NUM 0x0525#define CONFIG_G_DNL_PRODUCT_NUM 0xa4a5
include/configs/mx7dsabresd.h +0 -1
@@ -256,7 +256,6 @@#define CONFIG_CMD_USB_MASS_STORAGE #define CONFIG_USB_FUNCTION_MASS_STORAGE #define CONFIG_USB_GADGET_DOWNLOAD -#define CONFIG_USB_GADGET_VBUS_DRAW 2#define CONFIG_G_DNL_VENDOR_NUM 0x0525#define CONFIG_G_DNL_PRODUCT_NUM 0xa4a5
include/configs/nitrogen6x.h +0 -1
@@ -333,7 +333,6 @@#define CONFIG_CMD_USB_MASS_STORAGE #define CONFIG_USB_FUNCTION_MASS_STORAGE #define CONFIG_USB_GADGET_DOWNLOAD -#define CONFIG_USB_GADGET_VBUS_DRAW 2/* Netchip IDs */ #define CONFIG_G_DNL_VENDOR_NUM 0x0525
include/configs/odroid_xu3.h +0 -1
@@ -54,7 +54,6 @@/* USB gadget */ #define CONFIG_USB_GADGET_DUALSPEED -#define CONFIG_USB_GADGET_VBUS_DRAW 2/* Downloader */ #define CONFIG_G_DNL_VENDOR_NUM 0x04E8
include/configs/omap3_beagle.h +0 -1
@@ -66,7 +66,6 @@#define CONFIG_TWL4030_USB 1#define CONFIG_USB_ETHER #define CONFIG_USB_ETHER_RNDIS -#define CONFIG_USB_GADGET_VBUS_DRAW 0#define CONFIG_USB_GADGET_DOWNLOAD #define CONFIG_G_DNL_VENDOR_NUM 0x0451#define CONFIG_G_DNL_PRODUCT_NUM 0xd022
include/configs/omap3_logic.h +0 -1
@@ -85,7 +85,6 @@#define CONFIG_USB_GADGET_DUALSPEED #define CONFIG_USB_ETHER #define CONFIG_USB_ETHER_RNDIS -#define CONFIG_USB_GADGET_VBUS_DRAW 0#define CONFIG_USB_GADGET_DOWNLOAD #define CONFIG_G_DNL_VENDOR_NUM 0x0451#define CONFIG_G_DNL_PRODUCT_NUM 0xd022
include/configs/omap5_uevm.h +0 -1
@@ -106,7 +106,6 @@#define CONFIG_USB_DWC3_GADGET #define CONFIG_USB_GADGET_DOWNLOAD -#define CONFIG_USB_GADGET_VBUS_DRAW 2#define CONFIG_G_DNL_MANUFACTURER "Texas Instruments"#define CONFIG_G_DNL_VENDOR_NUM 0x0403#define CONFIG_G_DNL_PRODUCT_NUM 0xBD00
include/configs/pengwyn.h +0 -1
@@ -200,7 +200,6 @@#define CONFIG_USB_MUSB_PIO_ONLY #define CONFIG_USB_MUSB_DISABLE_BULK_COMBINE_SPLIT #define CONFIG_USB_GADGET_DUALSPEED -#define CONFIG_USB_GADGET_VBUS_DRAW 2#define CONFIG_USB_MUSB_HOST #define CONFIG_AM335X_USB0 #define CONFIG_AM335X_USB0_MODE MUSB_PERIPHERAL
include/configs/s5p_goni.h +0 -1
@@ -273,7 +273,6 @@#define CONFIG_USB_GADGET_DWC2_OTG #define CONFIG_USB_GADGET_DWC2_OTG_PHY #define CONFIG_USB_GADGET_DUALSPEED -#define CONFIG_USB_GADGET_VBUS_DRAW 2#define CONFIG_CMD_USB_MASS_STORAGE #define CONFIG_USB_FUNCTION_MASS_STORAGE
include/configs/siemens-am33x-common.h +0 -1
@@ -225,7 +225,6 @@#define CONFIG_USB_MUSB_PIO_ONLY #define CONFIG_USB_MUSB_DISABLE_BULK_COMBINE_SPLIT #undef CONFIG_USB_GADGET_DUALSPEED -#define CONFIG_USB_GADGET_VBUS_DRAW 2#define CONFIG_USB_MUSB_HOST #define CONFIG_AM335X_USB0
include/configs/smartweb.h +0 -1
@@ -176,7 +176,6 @@#define CONFIG_USB_FUNCTION_DFU #define CONFIG_DFU_NAND #define CONFIG_USB_GADGET_DOWNLOAD -#define CONFIG_USB_GADGET_VBUS_DRAW 2#define CONFIG_SYS_DFU_DATA_BUF_SIZE SZ_1M#define DFU_MANIFEST_POLL_TIMEOUT 25000
include/configs/sniper.h +0 -1
@@ -202,7 +202,6 @@#define CONFIG_TWL4030_USB #define CONFIG_USB_GADGET_DUALSPEED -#define CONFIG_USB_GADGET_VBUS_DRAW 0/* * Download
include/configs/socfpga_common.h +0 -1
@@ -254,7 +254,6 @@ unsigned int cm_get_qspi_controller_clk_hz(void);#if defined(CONFIG_CMD_DFU ) || defined(CONFIG_CMD_USB_MASS_STORAGE )#define CONFIG_USB_GADGET_DWC2_OTG #define CONFIG_USB_GADGET_DUALSPEED -#define CONFIG_USB_GADGET_VBUS_DRAW 2/* USB Composite download gadget - g_dnl */ #define CONFIG_USB_GADGET_DOWNLOAD
include/configs/sunxi-common.h +0 -1
@@ -343,7 +343,6 @@ extern int soft_i2c_gpio_scl;#ifdef CONFIG_USB_MUSB_GADGET #define CONFIG_USB_GADGET_DUALSPEED -#define CONFIG_USB_GADGET_VBUS_DRAW 0#define CONFIG_USB_GADGET_DOWNLOAD #define CONFIG_USB_FUNCTION_DFU
include/configs/taurus.h +0 -1
@@ -140,7 +140,6 @@#define CONFIG_USB_FUNCTION_DFU #define CONFIG_DFU_NAND #define CONFIG_USB_GADGET_DOWNLOAD -#define CONFIG_USB_GADGET_VBUS_DRAW 2#define CONFIG_SYS_DFU_DATA_BUF_SIZE (SZ_1M)#define DFU_MANIFEST_POLL_TIMEOUT 25000
include/configs/tbs2910.h +0 -1
@@ -132,7 +132,6 @@#define CONFIG_USBD_HS #define CONFIG_USB_FUNCTION_MASS_STORAGE #define CONFIG_USB_GADGET_DUALSPEED -#define CONFIG_USB_GADGET_VBUS_DRAW 0#define CONFIG_USB_GADGET_DOWNLOAD #define CONFIG_G_DNL_VENDOR_NUM 0x0525#define CONFIG_G_DNL_PRODUCT_NUM 0xa4a5
include/configs/tegra-common-usb-gadget.h +0 -1
@@ -10,7 +10,6 @@#ifndef CONFIG_SPL_BUILD /* USB gadget mode support*/ -#define CONFIG_USB_GADGET_VBUS_DRAW 2#define CONFIG_CI_UDC #define CONFIG_CI_UDC_HAS_HOSTPC #define CONFIG_USB_GADGET_DUALSPEED
include/configs/warp.h +0 -1
@@ -81,7 +81,6 @@#define CONFIG_CMD_USB_MASS_STORAGE #define CONFIG_USB_FUNCTION_MASS_STORAGE #define CONFIG_USB_GADGET_DOWNLOAD -#define CONFIG_USB_GADGET_VBUS_DRAW 2#define CONFIG_G_DNL_VENDOR_NUM 0x0525#define CONFIG_G_DNL_PRODUCT_NUM 0xa4a5
include/configs/xilinx_zynqmp.h +0 -1
@@ -130,7 +130,6 @@#define CONFIG_USB_GADGET_DOWNLOAD #define CONFIG_USB_GADGET_DUALSPEED -#define CONFIG_USB_GADGET_VBUS_DRAW 2#define CONFIG_USBDOWNLOAD_GADGET #define CONFIG_SYS_DFU_DATA_BUF_SIZE 0x1800000#define DFU_DEFAULT_POLL_TIMEOUT 300
include/configs/zynq-common.h +0 -1
@@ -107,7 +107,6 @@# define DFU_DEFAULT_POLL_TIMEOUT 300# define CONFIG_USB_FUNCTION_DFU # define CONFIG_DFU_RAM -# define CONFIG_USB_GADGET_VBUS_DRAW 2# define CONFIG_G_DNL_VENDOR_NUM 0x03FD# define CONFIG_G_DNL_PRODUCT_NUM 0x0300# define CONFIG_G_DNL_MANUFACTURER "Xilinx"
Signature · 1 line
2.8.0.rc3
PATCH v2 1/8 usb: gadget: Move CONFIG_USB_GADGET_VBUS_DRAW to Kconfig
Quoted 8 lines · Semen Protsenko
From: Sam Protsenko <[email protected]>
The description was borrowed from kernel. Definitions were added to defconfig files in a way that "make savedefconfig" generates exactly the same file as used defconfig.
Boards using 0 mA as
CONFIG_USB_GADGET_VBUS_DRAWvalue were moved to use 2 mA (as minimal allowed byKconfig).
(although I only got patch 1/8 and not patches 2-8 this time around)
PATCH v2 1/8 usb: gadget: Move CONFIG_USB_GADGET_VBUS_DRAW to Kconfig
Quoted 8 lines · Stephen Warren
Quoted 7 lines · Semen Protsenko
From: Sam Protsenko <[email protected]>
The description was borrowed from kernel. Definitions were added to defconfig files in a way that "make savedefconfig" generates exactly the same file as used defconfig.
Quoted 8 lines
Quoted 2 lines
Boards using 0 mA as
CONFIG_USB_GADGET_VBUS_DRAWvalue were moved to use 2 mA (as minimal allowed byKconfig).Acked-by Stephen Warren <[email protected]>(although I only got patch 1/8 and not patches 2-8 this time around)
Thanks. I will resend others too, soon enough. Just continue working on other patch v2 right now.
PATCH v2 1/8 usb: gadget: Move CONFIG_USB_GADGET_VBUS_DRAW to Kconfig
Quoted 13 lines · Sam Protsenko
Quoted 12 lines · Stephen Warren
Quoted 9 lines · Semen Protsenko
From: Sam Protsenko <[email protected]>
The description was borrowed from kernel. Definitions were added to defconfig files in a way that "make savedefconfig" generates exactly the same file as used defconfig.
Boards using 0 mA as
CONFIG_USB_GADGET_VBUS_DRAWvalue were moved to use 2 mA (as minimal allowed byKconfig).
Quoted 8 lines
Quoted 4 lines
Acked-by Stephen Warren <[email protected]>(although I only got patch 1/8 and not patches 2-8 this time around)
Thanks. I will resend others too, soon enough. Just continue working on other patch v2 right now.
OK, send the whole series please
Signature · 2 lines
Best regards, Marek Vasut
PATCH v2 1/8 usb: gadget: Move CONFIG_USB_GADGET_VBUS_DRAW to Kconfig
Quoted 16 lines · Marek Vasut
Quoted 15 lines · Sam Protsenko
Quoted 14 lines · Stephen Warren
Quoted 9 lines · Semen Protsenko
From: Sam Protsenko <[email protected]>
The description was borrowed from kernel. Definitions were added to defconfig files in a way that "make savedefconfig" generates exactly the same file as used defconfig.
Boards using 0 mA as
CONFIG_USB_GADGET_VBUS_DRAWvalue were moved to use 2 mA (as minimal allowed byKconfig).Acked-by Stephen Warren <[email protected]>
Quoted 8 lines
Quoted 6 lines
Quoted 2 lines
(although I only got patch 1/8 and not patches 2-8 this time around)
Thanks. I will resend others too, soon enough. Just continue working on other patch v2 right now.
OK, send the whole series please
Sure. I'll send v3, as all patches were rebased on top of current master.
Quoted 3 lines
--
Best regards,
Marek Vasut