lkml.org 
[lkml]   [2021]   [Mar]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] USB: DWC2: Add VBUS overcurrent detection control.
On Tue, Mar 23, 2021 at 11:24:26PM +0800, 周琰杰 (Zhou Yanjie) wrote:
> Introduce configurable option for enabling GOTGCTL register
> bits VbvalidOvEn and VbvalidOvVal. Once selected it disables
> VBUS overcurrent detection.
>
> This patch is derived from Dragan Čečavac (in the kernel 3.18
> tree of CI20). It is very useful for the MIPS Creator CI20(r1).
> Without this patch, CI20's OTG port has a great probability to
> face overcurrent warning, which breaks the OTG functionality.
>
> Signed-off-by: 周琰杰 (Zhou Yanjie) <zhouyanjie@wanyeetech.com>
> Signed-off-by: Dragan Čečavac <dragancecavac@yahoo.com>
> ---
> drivers/usb/dwc2/Kconfig | 6 ++++++
> drivers/usb/dwc2/core.c | 9 +++++++++
> 2 files changed, 15 insertions(+)
>
> diff --git a/drivers/usb/dwc2/Kconfig b/drivers/usb/dwc2/Kconfig
> index c131719..e40d187 100644
> --- a/drivers/usb/dwc2/Kconfig
> +++ b/drivers/usb/dwc2/Kconfig
> @@ -94,4 +94,10 @@ config USB_DWC2_DEBUG_PERIODIC
> non-periodic transfers, but of course the debug logs will be
> incomplete. Note that this also disables some debug messages
> for which the transfer type cannot be deduced.
> +
> +config USB_DWC2_DISABLE_VOD
> + bool "Disable VBUS overcurrent detection"
> + help
> + Say Y here to switch off VBUS overcurrent detection. It enables USB
> + functionality blocked by overcurrent detection.

Why would this be a configuration option? Shouldn't this be dynamic and
just work properly automatically?

You should not have to do this on a build-time basis, it should be able
to be detected and handled properly at run-time for all devices.

If you know this is needed for a specific type of device, detect it and
make the change then, otherwise this could break working systems, right?

thanks,

greg k-h

\
 
 \ /
  Last update: 2021-03-23 16:33    [W:0.419 / U:0.256 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site