sunxi: provide default USB gadget setup
authorMaxime Ripard <maxime.ripard@free-electrons.com>
Tue, 12 Sep 2017 17:41:15 +0000 (19:41 +0200)
committerMaxime Ripard <maxime.ripard@free-electrons.com>
Tue, 3 Oct 2017 17:12:05 +0000 (19:12 +0200)
All the Allwinner boards use the same manufacturer, VID and PID for the
gadgets. Make them the defaults to remove some boilerplate from our
defconfigs.

Reviewed-by: Ɓukasz Majewski <lukma@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
configs/A13-OLinuXino_defconfig
configs/A20-OLinuXino-Lime2-eMMC_defconfig
configs/A20-OLinuXino-Lime2_defconfig
configs/CHIP_defconfig
configs/CHIP_pro_defconfig
configs/Cubietruck_defconfig
configs/Nintendo_NES_Classic_Edition_defconfig
configs/Sinlinx_SinA33_defconfig
configs/parrot_r16_defconfig
drivers/usb/gadget/Kconfig

index 2574018d821325dae51c4d451fad7d431b40a1d6..ae790164dff7d4b32f5eab25223b1a3585e0a18a 100644 (file)
@@ -32,7 +32,4 @@ CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_MUSB_GADGET=y
 CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
 CONFIG_USB_GADGET=y
-CONFIG_USB_GADGET_MANUFACTURER="Allwinner Technology"
-CONFIG_USB_GADGET_VENDOR_NUM=0x1f3a
-CONFIG_USB_GADGET_PRODUCT_NUM=0x1010
 CONFIG_USB_GADGET_DOWNLOAD=y
index 5663a824e71b11b413434d172a25e7f421e0dd1a..b136af66b71f7b34fdbf261ec6773ed2a4542eda 100644 (file)
@@ -34,7 +34,4 @@ CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_MUSB_GADGET=y
 CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
 CONFIG_USB_GADGET=y
-CONFIG_USB_GADGET_MANUFACTURER="Allwinner Technology"
-CONFIG_USB_GADGET_VENDOR_NUM=0x1f3a
-CONFIG_USB_GADGET_PRODUCT_NUM=0x1010
 CONFIG_USB_GADGET_DOWNLOAD=y
index 63d013293690313843f085a23e53d243e7867a9e..ebb435f3095637917a4e9f4ee514bcf5285666c9 100644 (file)
@@ -33,7 +33,4 @@ CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_MUSB_GADGET=y
 CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
 CONFIG_USB_GADGET=y
-CONFIG_USB_GADGET_MANUFACTURER="Allwinner Technology"
-CONFIG_USB_GADGET_VENDOR_NUM=0x1f3a
-CONFIG_USB_GADGET_PRODUCT_NUM=0x1010
 CONFIG_USB_GADGET_DOWNLOAD=y
index 278039c055731d062ae0f63f2ac296dfd0c00cf6..7d50d0533dcdcbf98144057bfa4e379e68f017cf 100644 (file)
@@ -23,8 +23,5 @@ CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_MUSB_GADGET=y
 CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
 CONFIG_USB_GADGET=y
-CONFIG_USB_GADGET_MANUFACTURER="Allwinner Technology"
-CONFIG_USB_GADGET_VENDOR_NUM=0x1f3a
-CONFIG_USB_GADGET_PRODUCT_NUM=0x1010
 CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_OF_LIBFDT_OVERLAY=y
index edbdefc69ddfc438c14de32b6a1c92865f07d1b0..76daf477ec879ce90db498472b86e73f21adb402 100644 (file)
@@ -28,8 +28,5 @@ CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_MUSB_GADGET=y
 CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
 CONFIG_USB_GADGET=y
-CONFIG_USB_GADGET_MANUFACTURER="Allwinner Technology"
-CONFIG_USB_GADGET_VENDOR_NUM=0x1f3a
-CONFIG_USB_GADGET_PRODUCT_NUM=0x1010
 CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_OF_LIBFDT_OVERLAY=y
index 2d1753645b0f76dc7095e6bd06064f38bb003516..1b2989d364f680ca3fa50c83e69f7f1dacfae09f 100644 (file)
@@ -33,7 +33,4 @@ CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_MUSB_GADGET=y
 CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
 CONFIG_USB_GADGET=y
-CONFIG_USB_GADGET_MANUFACTURER="Allwinner Technology"
-CONFIG_USB_GADGET_VENDOR_NUM=0x1f3a
-CONFIG_USB_GADGET_PRODUCT_NUM=0x1010
 CONFIG_USB_GADGET_DOWNLOAD=y
index 99f7d30f150d0dce49995ff4797b5b94c283c486..5986764a14b98deef17c9cf606447720cadd7d1d 100644 (file)
@@ -23,7 +23,4 @@ CONFIG_AXP_ELDO2_VOLT=1800
 CONFIG_USB_MUSB_GADGET=y
 CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
 CONFIG_USB_GADGET=y
-CONFIG_USB_GADGET_MANUFACTURER="Allwinner Technology"
-CONFIG_USB_GADGET_VENDOR_NUM=0x1f3a
-CONFIG_USB_GADGET_PRODUCT_NUM=0x1010
 CONFIG_USB_GADGET_DOWNLOAD=y
index 8c5fc758790999aad217c3fa6b77b0da12d01847..9299aedd6019bf854b8a69d36f1068b3e3f8980d 100644 (file)
@@ -28,7 +28,4 @@ CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_MUSB_GADGET=y
 CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
 CONFIG_USB_GADGET=y
-CONFIG_USB_GADGET_MANUFACTURER="Allwinner Technology"
-CONFIG_USB_GADGET_VENDOR_NUM=0x1f3a
-CONFIG_USB_GADGET_PRODUCT_NUM=0x1010
 CONFIG_USB_GADGET_DOWNLOAD=y
index 4b70fc5687eb372f77fd9c1914f65278f2329575..57db9587fe77cd0f55b5ae064a30c315c42e71f8 100644 (file)
@@ -24,7 +24,4 @@ CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_MUSB_GADGET=y
 CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
 CONFIG_USB_GADGET=y
-CONFIG_USB_GADGET_MANUFACTURER="Allwinner Technology"
-CONFIG_USB_GADGET_VENDOR_NUM=0x1f3a
-CONFIG_USB_GADGET_PRODUCT_NUM=0x1010
 CONFIG_USB_GADGET_DOWNLOAD=y
index dfeeb5725afcbb69e1daa166dbc91a4fdde631d9..78faac74e997960ebe3201fbc0877c9f82d3854d 100644 (file)
@@ -38,6 +38,7 @@ if USB_GADGET
 
 config USB_GADGET_MANUFACTURER
        string "Vendor name of the USB device"
+       default "Allwinner Technology" if ARCH_SUNXI
        default "U-Boot"
        help
          Vendor name of the USB device emulated, reported to the host device.
@@ -45,6 +46,7 @@ config USB_GADGET_MANUFACTURER
 
 config USB_GADGET_VENDOR_NUM
        hex "Vendor ID of the USB device"
+       default 0x1f3a if ARCH_SUNXI
        default 0x0
        help
          Vendor ID of the USB device emulated, reported to the host device.
@@ -53,6 +55,7 @@ config USB_GADGET_VENDOR_NUM
 
 config USB_GADGET_PRODUCT_NUM
        hex "Product ID of the USB device"
+       default 0x1010 if ARCH_SUNXI
        default 0x0
        help
          Product ID of the USB device emulated, reported to the host device.