Re: [PATCH v2 11/11] iopoll: update kerneldoc of read_poll_timeout_atomic()

2020-08-20 Thread Chunfeng Yun
On Thu, 2020-08-20 at 13:14 +0300, Sergei Shtylyov wrote: > Hello! > > On 20.08.2020 8:45, Chunfeng Yun wrote: > > > Arguments description of read_poll_timeout_atomic() if out of date, > > s/if/is/? Will fix it, thanks > > > update it. > > > >

[PATCH v2 09/11] usb: gadget: bdc: fix checkpatch.pl tab warning

2020-08-20 Thread Chunfeng Yun
WARNING:SUSPECT_CODE_INDENT: suspect code indent for conditional statements WARNING:TABSTOP: Statements should start on a tabstop Cc: Florian Fainelli Signed-off-by: Chunfeng Yun --- v2: new patch --- drivers/usb/gadget/udc/bdc/bdc_cmd.c | 2 +- drivers/usb/gadget/udc/bdc/bdc_ep.c | 4 ++-- 2

[PATCH v2 01/11] usb: gadget: bdc: fix improper SPDX comment style for header file

2020-08-20 Thread Chunfeng Yun
For C header files Documentation/process/license-rules.rst mandates C-like comments (opposed to C source files where C++ style should be used). Cc: Florian Fainelli Signed-off-by: Chunfeng Yun --- v2: add Cc Florian --- drivers/usb/gadget/udc/bdc/bdc.h | 2 +- drivers/usb/gadget/udc/bdc

[PATCH v2 06/11] usb: gadget: bdc: add identifier name for function declaraion

2020-08-20 Thread Chunfeng Yun
This is used to avoid the warning of function arguments, e.g. WARNING:FUNCTION_ARGUMENTS: function definition argument 'u32' should also have an identifier name Cc: Florian Fainelli Signed-off-by: Chunfeng Yun --- v2: add Cc Florian --- drivers/usb/gadget/udc/bdc/bdc.h | 28

[PATCH v2 10/11] usb: gadget: bdc: fix checkpatch.pl spacing error

2020-08-20 Thread Chunfeng Yun
fix checkpatch.pl error: ERROR:SPACING: space prohibited before that ',' Cc: Florian Fainelli Signed-off-by: Chunfeng Yun --- v2: new patch --- drivers/usb/gadget/udc/bdc/bdc_udc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/gadget/udc/bdc/bdc_udc.c b

[PATCH v2 07/11] usb: gadget: bdc: avoid precedence issues

2020-08-20 Thread Chunfeng Yun
Add () around macro argument to avoid precedence issues Cc: Florian Fainelli Signed-off-by: Chunfeng Yun --- v2: add Cc Florian --- drivers/usb/gadget/udc/bdc/bdc.h | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/usb/gadget/udc/bdc/bdc.h b/drivers

[PATCH v2 02/11] usb: gadget: bdc: remove bdc_ep_set_halt() declaration

2020-08-20 Thread Chunfeng Yun
No definition for bdc_ep_set_halt(), so remove it. Cc: Florian Fainelli Signed-off-by: Chunfeng Yun --- v2: add Cc Florian --- drivers/usb/gadget/udc/bdc/bdc_cmd.h | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/usb/gadget/udc/bdc/bdc_cmd.h b/drivers/usb/gadget/udc/bdc/bdc_cmd.h

[PATCH v2 03/11] usb: gadget: bdc: prefer pointer dereference to pointer type

2020-08-20 Thread Chunfeng Yun
Prefer kzalloc(sizeof(*bd_table)...) over kzalloc(sizeof(struct bd_table) Cc: Florian Fainelli Signed-off-by: Chunfeng Yun --- v2: add Cc Florian --- drivers/usb/gadget/udc/bdc/bdc_ep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/gadget/udc/bdc/bdc_ep.c b

[PATCH v2 04/11] usb: gadget: bdc: fix warning of embedded function name

2020-08-20 Thread Chunfeng Yun
Use '"%s...", __func__' to replace embedded function name Cc: Florian Fainelli Signed-off-by: Chunfeng Yun --- v2: add Cc Florian --- drivers/usb/gadget/udc/bdc/bdc_dbg.c | 2 +- drivers/usb/gadget/udc/bdc/bdc_ep.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-)

[PATCH v2 05/11] usb: gadget: bdc: fix check warning of block comments alignment

2020-08-20 Thread Chunfeng Yun
fix the warning: WARNING:BLOCK_COMMENT_STYLE: Block comments should align the * on each line Cc: Florian Fainelli Signed-off-by: Chunfeng Yun --- v2: add Cc Florian --- drivers/usb/gadget/udc/bdc/bdc.h | 2 +- drivers/usb/gadget/udc/bdc/bdc_ep.c | 2 +- drivers/usb/gadget/udc/bdc

[PATCH v2 11/11] usb: gadget: bdc: fix checkpatch.pl repeated word warning

2020-08-20 Thread Chunfeng Yun
fix the warning: WARNING:REPEATED_WORD: Possible repeated word: 'and' Cc: Florian Fainelli Signed-off-by: Chunfeng Yun --- v2: new patch --- drivers/usb/gadget/udc/bdc/bdc_ep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/gadget/udc/bdc/bdc_ep.c b/drivers

[PATCH v2 08/11] usb: gadget: bdc: use the BIT macro to define bit filed

2020-08-20 Thread Chunfeng Yun
Prefer using the BIT macro to define bit fileds Cc: Florian Fainelli Signed-off-by: Chunfeng Yun --- v2: add Cc Florian --- drivers/usb/gadget/udc/bdc/bdc.h | 84 1 file changed, 42 insertions(+), 42 deletions(-) diff --git a/drivers/usb/gadget/udc/bdc

[PATCH v2 02/11] usb: early: ehci-dbgp: convert to readl_poll_timeout_atomic()

2020-08-19 Thread Chunfeng Yun
Use readl_poll_timeout_atomic() to simplify code Cc: "Eric W. Biederman" Cc: Petr Mladek Signed-off-by: Chunfeng Yun --- v2: no changes --- drivers/usb/early/ehci-dbgp.c | 15 +-- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/drivers/usb/early/ehc

[PATCH v2 07/11] usb: isp1760-hcd: convert to readl_poll_timeout_atomic()

2020-08-19 Thread Chunfeng Yun
Use readl_poll_timeout_atomic() to simplify code Signed-off-by: Chunfeng Yun --- v2: no changes --- drivers/usb/isp1760/isp1760-hcd.c | 20 +--- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/drivers/usb/isp1760/isp1760-hcd.c b/drivers/usb/isp1760/isp1760-hcd.c

[PATCH v2 08/11] usb: phy-ulpi-viewport: convert to readl_poll_timeout_atomic()

2020-08-19 Thread Chunfeng Yun
Use readl_poll_timeout_atomic() to simplify code Signed-off-by: Chunfeng Yun --- v2: no changes --- drivers/usb/phy/phy-ulpi-viewport.c | 12 +++- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/drivers/usb/phy/phy-ulpi-viewport.c b/drivers/usb/phy/phy-ulpi-viewport.c

[PATCH v2 11/11] iopoll: update kerneldoc of read_poll_timeout_atomic()

2020-08-19 Thread Chunfeng Yun
Arguments description of read_poll_timeout_atomic() if out of date, update it. Cc: Alan Stern Signed-off-by: Chunfeng Yun --- v2: new patch, suggested by Alan --- include/linux/iopoll.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/iopoll.h b/include

[PATCH v2 05/11] usb: oxu210hp-hcd: convert to readl_poll_timeout_atomic()

2020-08-19 Thread Chunfeng Yun
Use readl_poll_timeout_atomic() to simplify code Signed-off-by: Chunfeng Yun --- v2: no changes --- drivers/usb/host/oxu210hp-hcd.c | 21 ++--- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/drivers/usb/host/oxu210hp-hcd.c b/drivers/usb/host/oxu210hp-hcd.c index

[PATCH v2 04/11] usb: xhci-rcar: convert to readl_poll_timeout_atomic()

2020-08-19 Thread Chunfeng Yun
Use readl_poll_timeout_atomic() to simplify code Cc: Mathias Nyman Cc: Yoshihiro Shimoda Signed-off-by: Chunfeng Yun --- v2: no changes --- drivers/usb/host/xhci-rcar.c | 43 --- 1 file changed, 12 insertions(+), 31 deletions(-) diff --git a/drivers

[PATCH v2 01/11] usb: early: convert to readl_poll_timeout_atomic()

2020-08-19 Thread Chunfeng Yun
Use readl_poll_timeout_atomic() to simplify code Cc: Lu Baolu Cc: Mathias Nyman Signed-off-by: Chunfeng Yun --- v2: no changes --- drivers/usb/early/xhci-dbc.c | 14 -- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/drivers/usb/early/xhci-dbc.c b/drivers/usb/early

[PATCH v2 10/11] usb: udc: net2280: convert to readl_poll_timeout_atomic()

2020-08-19 Thread Chunfeng Yun
Use readl_poll_timeout_atomic() to simplify code Cc: Alan Stern Cc: Felipe Balbi Signed-off-by: Chunfeng Yun Acked-by: Alan Stern --- v2: add Acked-by Alan --- drivers/usb/gadget/udc/net2280.c | 21 ++--- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/drivers

[PATCH v2 09/11] usb: phy: phy-mv-usb: convert to readl_poll_timeout_atomic()

2020-08-19 Thread Chunfeng Yun
Use readl_poll_timeout_atomic() to simplify code Signed-off-by: Chunfeng Yun --- v2: udelay 10us instead of 20us according to kerneldoc --- drivers/usb/phy/phy-mv-usb.c | 16 +++- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/drivers/usb/phy/phy-mv-usb.c b/drivers

[PATCH v2 06/11] usb: fotg210-hcd: convert to readl_poll_timeout_atomic()

2020-08-19 Thread Chunfeng Yun
Use readl_poll_timeout_atomic() to simplify code Signed-off-by: Chunfeng Yun --- v2: no changes --- drivers/usb/host/fotg210-hcd.c | 20 +--- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/drivers/usb/host/fotg210-hcd.c b/drivers/usb/host/fotg210-hcd.c index

[PATCH v2 03/11] usb: pci-quirks: convert to readl_poll_timeout_atomic()

2020-08-19 Thread Chunfeng Yun
Use readl_poll_timeout_atomic() to simplify code Cc: Mathias Nyman Signed-off-by: Chunfeng Yun --- v2: no changes --- drivers/usb/host/pci-quirks.c | 13 - 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/drivers/usb/host/pci-quirks.c b/drivers/usb/host/pci-quirks.c

Re: [PATCH 10/10] usb: udc: net2280: convert to readl_poll_timeout_atomic()

2020-08-19 Thread Chunfeng Yun
On Wed, 2020-08-19 at 10:59 -0400, Alan Stern wrote: > On Wed, Aug 19, 2020 at 08:41:05PM +0800, Chunfeng Yun wrote: > > Use readl_poll_timeout_atomic() to simplify code > > > > Cc: Alan Stern > > Cc: Felipe Balbi > > Signed-off-by: Chunfeng Yun > > --

[PATCH 02/10] usb: early: ehci-dbgp: convert to readl_poll_timeout_atomic()

2020-08-19 Thread Chunfeng Yun
Use readl_poll_timeout_atomic() to simplify code Cc: "Eric W. Biederman" Cc: Petr Mladek Signed-off-by: Chunfeng Yun --- drivers/usb/early/ehci-dbgp.c | 15 +-- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/drivers/usb/early/ehci-dbgp.c b/drivers/usb/

[PATCH 05/10] usb: oxu210hp-hcd: convert to readl_poll_timeout_atomic()

2020-08-19 Thread Chunfeng Yun
Use readl_poll_timeout_atomic() to simplify code Signed-off-by: Chunfeng Yun --- drivers/usb/host/oxu210hp-hcd.c | 21 ++--- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/drivers/usb/host/oxu210hp-hcd.c b/drivers/usb/host/oxu210hp-hcd.c index cfa7dd2..27dbbe1

[PATCH 09/10] usb: phy: phy-mv-usb: convert to readl_poll_timeout_atomic()

2020-08-19 Thread Chunfeng Yun
Use readl_poll_timeout_atomic() to simplify code Signed-off-by: Chunfeng Yun --- drivers/usb/phy/phy-mv-usb.c | 16 +++- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/drivers/usb/phy/phy-mv-usb.c b/drivers/usb/phy/phy-mv-usb.c index ce767ec..008ed58 100644

[PATCH 08/10] usb: phy-ulpi-viewport: convert to readl_poll_timeout_atomic()

2020-08-19 Thread Chunfeng Yun
Use readl_poll_timeout_atomic() to simplify code Signed-off-by: Chunfeng Yun --- drivers/usb/phy/phy-ulpi-viewport.c | 12 +++- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/drivers/usb/phy/phy-ulpi-viewport.c b/drivers/usb/phy/phy-ulpi-viewport.c index 7a14e0e..0f61e32

[PATCH 10/10] usb: udc: net2280: convert to readl_poll_timeout_atomic()

2020-08-19 Thread Chunfeng Yun
Use readl_poll_timeout_atomic() to simplify code Cc: Alan Stern Cc: Felipe Balbi Signed-off-by: Chunfeng Yun --- drivers/usb/gadget/udc/net2280.c | 21 ++--- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/drivers/usb/gadget/udc/net2280.c b/drivers/usb/gadget

[PATCH 07/10] usb: isp1760-hcd: convert to readl_poll_timeout_atomic()

2020-08-19 Thread Chunfeng Yun
Use readl_poll_timeout_atomic() to simplify code Signed-off-by: Chunfeng Yun --- drivers/usb/isp1760/isp1760-hcd.c | 20 +--- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/drivers/usb/isp1760/isp1760-hcd.c b/drivers/usb/isp1760/isp1760-hcd.c index dd74ab7a

[PATCH 04/10] usb: xhci-rcar: convert to readl_poll_timeout_atomic()

2020-08-19 Thread Chunfeng Yun
Use readl_poll_timeout_atomic() to simplify code Cc: Mathias Nyman Cc: Yoshihiro Shimoda Signed-off-by: Chunfeng Yun --- drivers/usb/host/xhci-rcar.c | 43 --- 1 file changed, 12 insertions(+), 31 deletions(-) diff --git a/drivers/usb/host/xhci-rcar.c

[PATCH 03/10] usb: pci-quirks: convert to readl_poll_timeout_atomic()

2020-08-19 Thread Chunfeng Yun
Use readl_poll_timeout_atomic() to simplify code Cc: Mathias Nyman Signed-off-by: Chunfeng Yun --- drivers/usb/host/pci-quirks.c | 13 - 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/drivers/usb/host/pci-quirks.c b/drivers/usb/host/pci-quirks.c index b8961c0

[PATCH 01/10] usb: early: convert to readl_poll_timeout_atomic()

2020-08-19 Thread Chunfeng Yun
Use readl_poll_timeout_atomic() to simplify code Cc: Lu Baolu Cc: Mathias Nyman Signed-off-by: Chunfeng Yun --- drivers/usb/early/xhci-dbc.c | 14 -- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/drivers/usb/early/xhci-dbc.c b/drivers/usb/early/xhci-dbc.c index

[PATCH 06/10] usb: fotg210-hcd: convert to readl_poll_timeout_atomic()

2020-08-19 Thread Chunfeng Yun
Use readl_poll_timeout_atomic() to simplify code Signed-off-by: Chunfeng Yun --- drivers/usb/host/fotg210-hcd.c | 20 +--- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/drivers/usb/host/fotg210-hcd.c b/drivers/usb/host/fotg210-hcd.c index 194df82..1d94fcf 100644

Re: [PATCH] usb: xhci-mtk: Fix typo

2020-08-11 Thread Chunfeng Yun
STS1_SYS125_RST | STS1_XHCI_RST; > > - if (mtk->num_u3_ports > u3_ports_disabed) > + if (mtk->num_u3_ports > u3_ports_disabled) > check_val |= STS1_U3_MAC_RST; > > ret = readl_poll_timeout(>ip_pw_sts1, value, Reviewed-by: Chunfeng Yun Thanks

Re: [RESEND PATCH] usb: common: usb-conn-gpio: Register optional charger

2020-07-28 Thread Chunfeng Yun
On Mon, 2020-07-27 at 17:02 +0200, Paul Cercueil wrote: > > Le lun. 27 juil. 2020 à 13:42, Chunfeng Yun > a écrit : > > On Sun, 2020-07-26 at 12:27 +0200, Paul Cercueil wrote: > >> > >> Le dim. 26 juil. 2020 à 13:14, Andy Shevchenko > >> a écrit

Re: [PATCH 10/11] usb: mtu3: clear dual mode of u3port when disable device

2020-07-28 Thread Chunfeng Yun
On Mon, 2020-07-27 at 11:07 +0300, Sergei Shtylyov wrote: > Hello! > > On 27.07.2020 10:14, Chunfeng Yun wrote: > > > If not clear u3port's dual mode when disable device, the IP > > If we don't clear ... when disabling ...? > > > will fail to enter sleep mo

[PATCH 05/11] usb: mtu3: introduce a funtion to check maximum speed

2020-07-27 Thread Chunfeng Yun
The max_speed got from DTS may be not supported by the hardware, so need check it, and assign a proper default value. And make it clear by introducing a funtion. Signed-off-by: Chunfeng Yun --- drivers/usb/mtu3/mtu3_core.c | 48 ++-- 1 file changed, 28

[PATCH 02/11] usb: mtu3: fix macro for maximum number of packets

2020-07-27 Thread Chunfeng Yun
The bits field for maximum number of packets is 8 bits. Signed-off-by: Chunfeng Yun --- drivers/usb/mtu3/mtu3_hw_regs.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/mtu3/mtu3_hw_regs.h b/drivers/usb/mtu3/mtu3_hw_regs.h index bf34f78..072db1f 100644

[PATCH 09/11] usb: mtu3: use MTU3_EP_WEDGE flag

2020-07-27 Thread Chunfeng Yun
Use MTU3_EP_WEDGE flag instead of the member @wedged in mtu3_ep struct, then @wedged can be removed. Signed-off-by: Chunfeng Yun --- drivers/usb/mtu3/mtu3.h| 1 - drivers/usb/mtu3/mtu3_gadget.c | 9 - drivers/usb/mtu3/mtu3_gadget_ep0.c | 2 +- 3 files changed, 5

[PATCH 06/11] usb: mtu3: add ->udc_set_speed()

2020-07-27 Thread Chunfeng Yun
Make use of the method to make sure connect on speeds supported by the gadget driver. Signed-off-by: Chunfeng Yun --- drivers/usb/mtu3/mtu3.h| 4 ++- drivers/usb/mtu3/mtu3_core.c | 68 +- drivers/usb/mtu3/mtu3_gadget.c | 14 + 3 files

[PATCH 04/11] usb: mtu3: clear interrupts status when disable interrupts

2020-07-27 Thread Chunfeng Yun
When disable interrupts, will also want to clear their status, ensure it by calling mtu3_intr_status_clear() in mtu3_intr_disable(). Signed-off-by: Chunfeng Yun --- drivers/usb/mtu3/mtu3_core.c | 25 - 1 file changed, 12 insertions(+), 13 deletions(-) diff --git

[PATCH 03/11] usb: mtu3: reinitialize CSR registers

2020-07-27 Thread Chunfeng Yun
The CSR registers will be reset as default value if the ports are disabled, so reinitialize them when the ports are enabled again. Signed-off-by: Chunfeng Yun --- drivers/usb/mtu3/mtu3_core.c | 61 +++- 1 file changed, 32 insertions(+), 29 deletions

[PATCH 08/11] usb: mtu3: remove useless member @busy in mtu3_ep struct

2020-07-27 Thread Chunfeng Yun
The member @busy in mtu3_ep struct is unnecessary, so remove it. Signed-off-by: Chunfeng Yun --- drivers/usb/mtu3/mtu3.h| 1 - drivers/usb/mtu3/mtu3_gadget.c | 6 -- 2 files changed, 7 deletions(-) diff --git a/drivers/usb/mtu3/mtu3.h b/drivers/usb/mtu3/mtu3.h index 9d68f25

[PATCH 11/11] usb: mtu3: simplify mtu3_req_complete()

2020-07-27 Thread Chunfeng Yun
Use argument req directly instead of mreq->request, they are the same usb request. Signed-off-by: Chunfeng Yun --- drivers/usb/mtu3/mtu3_gadget.c | 17 +++-- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/drivers/usb/mtu3/mtu3_gadget.c b/drivers/usb/m

[PATCH 10/11] usb: mtu3: clear dual mode of u3port when disable device

2020-07-27 Thread Chunfeng Yun
If not clear u3port's dual mode when disable device, the IP will fail to enter sleep mode when suspend. Signed-off-by: Chunfeng Yun --- drivers/usb/mtu3/mtu3_core.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/usb/mtu3/mtu3_core.c b/drivers/usb/mtu3

[PATCH 07/11] usb: mtu3: remove repeated error log

2020-07-27 Thread Chunfeng Yun
The caller already print error log. Signed-off-by: Chunfeng Yun --- drivers/usb/mtu3/mtu3_gadget.c | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/usb/mtu3/mtu3_gadget.c b/drivers/usb/mtu3/mtu3_gadget.c index 3d13129..2bc9a95 100644 --- a/drivers/usb/mtu3

[PATCH 01/11] usb: mtu3: remove unnecessary pointer checks

2020-07-27 Thread Chunfeng Yun
The class driver will ensure the parameters are valid pointers before call the hook function of usb_ep_ops, so no need check them again. Signed-off-by: Chunfeng Yun --- drivers/usb/mtu3/mtu3_gadget.c | 25 ++--- 1 file changed, 6 insertions(+), 19 deletions(-) diff --git

Re: [RESEND PATCH] usb: common: usb-conn-gpio: Register optional charger

2020-07-26 Thread Chunfeng Yun
On Sun, 2020-07-26 at 12:27 +0200, Paul Cercueil wrote: > > Le dim. 26 juil. 2020 à 13:14, Andy Shevchenko > a écrit : > > On Mon, Jun 22, 2020 at 1:51 AM Paul Cercueil > > wrote: > >> > >> Register a power supply charger, if the Kconfig option > >> USB_CONN_GPIO_CHARGER is set, whose

Re: [RFC PATCH] usb: dwc3: fix maximum_speed check for usb2.0-only core

2020-07-24 Thread Chunfeng Yun
On Fri, 2020-07-24 at 03:32 +, Thinh Nguyen wrote: > Hi, > > Thinh Nguyen wrote: > > Hi, > > > > Chunfeng Yun wrote: > >> The maximum_speed will be USB_SPEED_SUPER_PLUS, but the > >> maximum_speed check for usb2.0-only core doesn't co

[PATCH 5/7] usb: gadget: r8a66597: convert to devm_platform_ioremap_resource_byname

2020-07-22 Thread Chunfeng Yun
Use devm_platform_ioremap_resource_byname() to simplify code Signed-off-by: Chunfeng Yun --- drivers/usb/gadget/udc/r8a66597-udc.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/usb/gadget/udc/r8a66597-udc.c b/drivers/usb/gadget/udc/r8a66597-udc.c index

[PATCH 7/7] usb: musb: convert to devm_platform_ioremap_resource_byname

2020-07-22 Thread Chunfeng Yun
Use devm_platform_ioremap_resource_byname() to simplify code Cc: Bin Liu Signed-off-by: Chunfeng Yun --- drivers/usb/musb/musb_dsps.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/usb/musb/musb_dsps.c b/drivers/usb/musb/musb_dsps.c index 8892317..9dbf977 100644

[PATCH 4/7] usb: dwc3: convert to devm_platform_ioremap_resource_byname

2020-07-22 Thread Chunfeng Yun
Use devm_platform_ioremap_resource_byname() to simplify code Cc: Patrice Chotard Signed-off-by: Chunfeng Yun --- drivers/usb/dwc3/dwc3-st.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/dwc3/dwc3-st.c b/drivers/usb/dwc3/dwc3-st.c index c682420..e733be8

[PATCH 2/7] usb: phy: am335x: convert to devm_platform_ioremap_resource_byname

2020-07-22 Thread Chunfeng Yun
Use devm_platform_ioremap_resource_byname() to simplify code Signed-off-by: Chunfeng Yun --- drivers/usb/phy/phy-am335x-control.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/usb/phy/phy-am335x-control.c b/drivers/usb/phy/phy-am335x-control.c index d16dfc3

[PATCH 6/7] usb: gadget: tegra-xudc: convert to devm_platform_ioremap_resource_byname

2020-07-22 Thread Chunfeng Yun
Use devm_platform_ioremap_resource_byname() to simplify code Cc: Nagarjuna Kristam Signed-off-by: Chunfeng Yun --- drivers/usb/gadget/udc/tegra-xudc.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/usb/gadget/udc/tegra-xudc.c b/drivers/usb/gadget/udc/tegra

[PATCH 1/7] usb: mtu3: convert to devm_platform_ioremap_resource_byname

2020-07-22 Thread Chunfeng Yun
Use devm_platform_ioremap_resource_byname() to simplify code Signed-off-by: Chunfeng Yun --- drivers/usb/mtu3/mtu3_core.c | 4 +--- drivers/usb/mtu3/mtu3_plat.c | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/usb/mtu3/mtu3_core.c b/drivers/usb/mtu3/mtu3_core.c

[PATCH 3/7] usb: cdns3: convert to devm_platform_ioremap_resource_byname

2020-07-22 Thread Chunfeng Yun
Use devm_platform_ioremap_resource_byname() to simplify code Cc: Peter Chen Signed-off-by: Chunfeng Yun --- drivers/usb/cdns3/core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/usb/cdns3/core.c b/drivers/usb/cdns3/core.c index 19bbb5b..24faf60 100644

[RESEND v3 PATCH] usb: gadget: bdc: use readl_poll_timeout() to simplify code

2020-07-22 Thread Chunfeng Yun
Use readl_poll_timeout() to poll register status Cc: Florian Fainelli Signed-off-by: Chunfeng Yun Reviewed-by: Florian Fainelli --- v3 changes: 1. indent code to match open parenthesis suggested by Florian 2. add Reviewed-by Florian v2 changes, suggested by Stephen: 1. use unsigned int

Re: [v3 PATCH] usb: gadget: bdc: use readl_poll_timeout() to simplify code

2020-07-22 Thread Chunfeng Yun
On Tue, 2020-07-21 at 12:42 +0300, Felipe Balbi wrote: > Hi, > > Chunfeng Yun writes: > > Use readl_poll_timeout() to poll register status > > > > Cc: Florian Fainelli > > Signed-off-by: Chunfeng Yun > > Reviewed-by: Florian Fainelli > > I had a

[PATCH 1/9] usb: gadget: bdc: fix code check warning or error caused by spacing

2020-07-14 Thread Chunfeng Yun
fix up check warning caused by no spaces around operators, or multiple blank lines; fix up check error caused by space prohibited before ',' Signed-off-by: Chunfeng Yun --- drivers/usb/gadget/udc/bdc/bdc.h | 12 ++-- drivers/usb/gadget/udc/bdc/bdc_cmd.c | 15

[PATCH 2/9] usb: gadget: bdc: fix warning of embedded function name

2020-07-14 Thread Chunfeng Yun
Use '"%s...", __func__' to replace embedded function name Signed-off-by: Chunfeng Yun --- drivers/usb/gadget/udc/bdc/bdc_dbg.c | 2 +- drivers/usb/gadget/udc/bdc/bdc_ep.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/usb/gadget/udc/bdc/bdc_dbg.c

[PATCH 5/9] usb: gadget: bdc: add identifier name for function declaraion

2020-07-14 Thread Chunfeng Yun
This is used to avoid the warning of function arguments, e.g. WARNING:FUNCTION_ARGUMENTS: function definition argument 'u32' should also have an identifier name Signed-off-by: Chunfeng Yun --- drivers/usb/gadget/udc/bdc/bdc.h | 28 ++-- drivers/usb/gadget/udc/bdc

[PATCH 7/9] usb: gadget: bdc: avoid precedence issues

2020-07-14 Thread Chunfeng Yun
Add () around macro argument to avoid precedence issues Signed-off-by: Chunfeng Yun --- drivers/usb/gadget/udc/bdc/bdc.h | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/usb/gadget/udc/bdc/bdc.h b/drivers/usb/gadget/udc/bdc/bdc.h index 6940934

[PATCH 6/9] usb: gadget: bdc: fix check warning of block comments alignment

2020-07-14 Thread Chunfeng Yun
fix the warning: WARNING:BLOCK_COMMENT_STYLE: Block comments should align the * on each line Signed-off-by: Chunfeng Yun --- drivers/usb/gadget/udc/bdc/bdc.h | 2 +- drivers/usb/gadget/udc/bdc/bdc_ep.c | 2 +- drivers/usb/gadget/udc/bdc/bdc_udc.c | 6 +++--- 3 files changed, 5

[PATCH 3/9] usb: gadget: bdc: fix improper SPDX comment style for header file

2020-07-14 Thread Chunfeng Yun
For C header files Documentation/process/license-rules.rst mandates C-like comments (opposed to C source files where C++ style should be used). Signed-off-by: Chunfeng Yun --- drivers/usb/gadget/udc/bdc/bdc.h | 2 +- drivers/usb/gadget/udc/bdc/bdc_cmd.h | 2 +- drivers/usb/gadget/udc/bdc

[PATCH 8/9] usb: gadget: bdc: use the BIT macro to define bit filed

2020-07-14 Thread Chunfeng Yun
Prefer using the BIT macro to define bit fileds Signed-off-by: Chunfeng Yun --- drivers/usb/gadget/udc/bdc/bdc.h | 84 1 file changed, 42 insertions(+), 42 deletions(-) diff --git a/drivers/usb/gadget/udc/bdc/bdc.h b/drivers/usb/gadget/udc/bdc/bdc.h

[PATCH 4/9] usb: gadget: bdc: remove bdc_ep_set_halt() declaration

2020-07-14 Thread Chunfeng Yun
No definition for bdc_ep_set_halt(), so remove it. Signed-off-by: Chunfeng Yun --- drivers/usb/gadget/udc/bdc/bdc_cmd.h | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/usb/gadget/udc/bdc/bdc_cmd.h b/drivers/usb/gadget/udc/bdc/bdc_cmd.h index e481d36..a3a6dbd 100644 --- a/drivers/usb

[PATCH 9/9] usb: gadget: bdc: prefer pointer dereference to pointer type

2020-07-14 Thread Chunfeng Yun
Prefer kzalloc(sizeof(*bd_table)...) over kzalloc(sizeof(struct bd_table) Signed-off-by: Chunfeng Yun --- drivers/usb/gadget/udc/bdc/bdc_ep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/gadget/udc/bdc/bdc_ep.c b/drivers/usb/gadget/udc/bdc/bdc_ep.c index

Re: [v2 PATCH] usb: gadget: bdc: use readl_poll_timeout() to simplify code

2020-07-13 Thread Chunfeng Yun
On Sun, 2020-07-12 at 20:53 -0700, Florian Fainelli wrote: > > On 7/12/2020 8:30 PM, Chunfeng Yun wrote: > > Use readl_poll_timeout() to poll register status > > > > Cc: Florian Fainelli > > Signed-off-by: Chunfeng Yun > > --- > > v2 changes, sugge

[v3 PATCH] usb: gadget: bdc: use readl_poll_timeout() to simplify code

2020-07-13 Thread Chunfeng Yun
Use readl_poll_timeout() to poll register status Cc: Florian Fainelli Signed-off-by: Chunfeng Yun Reviewed-by: Florian Fainelli --- v3 changes: 1. indent code to match open parenthesis suggested by Florian 2. add Reviewed-by Florian v2 changes, suggested by Stephen: 1. use unsigned int

[v2 PATCH] usb: gadget: bdc: use readl_poll_timeout() to simplify code

2020-07-12 Thread Chunfeng Yun
Use readl_poll_timeout() to poll register status Cc: Florian Fainelli Signed-off-by: Chunfeng Yun --- v2 changes, suggested by Stephen: 1. use unsigned int instead of int for @usec parameter 2. add dev_log() back 3. drop "Err" in error log --- drivers/usb/gadget/udc/bdc/bdc_c

Re: [PATCH] usb: gadget: bdc: use readl_poll_timeout() to simplify code

2020-07-12 Thread Chunfeng Yun
On Fri, 2020-07-10 at 16:37 -0700, Stephen Boyd wrote: > Quoting Chunfeng Yun (2020-07-09 20:30:56) > > diff --git a/drivers/usb/gadget/udc/bdc/bdc_core.c > > b/drivers/usb/gadget/udc/bdc/bdc_core.c > > index 02a3a77..fa173de 100644 > > --- a/drivers/usb/gadget/u

[v2 PATCH] usb: xhci-mtk: fix the failure of bandwidth allocation

2020-07-09 Thread Chunfeng Yun
Signed-off-by: Chunfeng Yun --- V2: add Fixes suggested by Nicolas --- drivers/usb/host/xhci-mtk-sch.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/usb/host/xhci-mtk-sch.c b/drivers/usb/host/xhci-mtk-sch.c index fea..45c54d56 100644 --- a/drivers/usb/host/xhci-mtk-sch.c +++ b/d

Re: [PATCH] usb: xhci-mtk: fix the failure of bandwidth allocation

2020-07-09 Thread Chunfeng Yun
On Fri, 2020-07-10 at 11:14 +0800, Nicolas Boichat wrote: > On Fri, Jul 10, 2020 at 10:30 AM Chunfeng Yun > wrote: > > > > The wMaxPacketSize field of endpoint descriptor may be zero > > as default value in alternate interface, and they are not > > actually selec

[PATCH] usb: gadget: bdc: use readl_poll_timeout() to simplify code

2020-07-09 Thread Chunfeng Yun
Use readl_poll_timeout() to poll register status Signed-off-by: Chunfeng Yun --- drivers/usb/gadget/udc/bdc/bdc_core.c | 22 -- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/drivers/usb/gadget/udc/bdc/bdc_core.c b/drivers/usb/gadget/udc/bdc/bdc_core.c index

[PATCH] usb: xhci-mtk: fix the failure of bandwidth allocation

2020-07-09 Thread Chunfeng Yun
The wMaxPacketSize field of endpoint descriptor may be zero as default value in alternate interface, and they are not actually selected when start stream, so skip them when try to allocate bandwidth. Cc: stable Signed-off-by: Chunfeng Yun --- drivers/usb/host/xhci-mtk-sch.c | 4 1 file

[RFC PATCH] usb: dwc3: fix maximum_speed check for usb2.0-only core

2020-07-09 Thread Chunfeng Yun
The maximum_speed will be USB_SPEED_SUPER_PLUS, but the maximum_speed check for usb2.0-only core doesn't consider it, so fix it, and move the ckeck into dwc3_check_params(). Signed-off-by: Chunfeng Yun --- Note: When I look at the code, find that this may be a problem, but no platform to test

[v3 PATCH] usb: mtu3: remove unnecessary NULL pointer checks

2020-07-09 Thread Chunfeng Yun
The class driver will ensure the parameters are not NULL pointers before call the hook function of usb_ep_ops, so no need check them again. Reported-by: Markus Elfring Signed-off-by: Chunfeng Yun --- v3: remove unnecessary NULL pointer checks but not add more checks. v2: nothing changed

Re: [V2 PATCH] usb: mtu3: fix NULL pointer dereference

2020-07-09 Thread Chunfeng Yun
On Thu, 2020-07-09 at 09:40 +0300, Felipe Balbi wrote: > Chunfeng Yun writes: > > > Some pointers are dereferenced before successful checks. > > > > Reported-by: Markus Elfring > > Signed-off-by: Chunfeng Yun > > do you need a Fixes tag here? Perhaps a Cc

Re: [PATCH 16/30] usb: mtu3: mtu3_trace: Function headers are not suitable for kerneldoc

2020-07-02 Thread Chunfeng Yun
const char *fmt, ...) > | ^~ The description doesn't match with the title and code changes > > Cc: Chunfeng Yun > Cc: linux-media...@lists.infradead.org > Signed-off-by: Lee Jones > --- > drivers/usb/mtu3/mtu3_trace.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletio

Re: [V2 PATCH] usb: mtu3: fix NULL pointer dereference

2020-07-01 Thread Chunfeng Yun
On Wed, 2020-07-01 at 13:58 +0200, Greg Kroah-Hartman wrote: > On Tue, Jun 30, 2020 at 03:42:22PM +0800, Chunfeng Yun wrote: > > Some pointers are dereferenced before successful checks. > > > > Reported-by: Markus Elfring > > Signed-off-by: Chunfeng Yun >

[V2 PATCH] usb: mtu3: fix NULL pointer dereference

2020-06-30 Thread Chunfeng Yun
Some pointers are dereferenced before successful checks. Reported-by: Markus Elfring Signed-off-by: Chunfeng Yun --- v2: nothing changed, but abandon another patch --- drivers/usb/mtu3/mtu3_gadget.c | 25 ++--- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git

Re: [PATCH 2/2] usb: mtu3: fix NULL pointer dereference

2020-06-30 Thread Chunfeng Yun
On Mon, 2020-06-29 at 10:00 +0200, Markus Elfring wrote: > > Some pointers are dereferenced before successful checks. > > I suggest to reconsider and improve the change description. > > * Would a null pointer dereference be possible only with the variables “mep” > and “mreq” in the

Re: [PATCH 1/2] usb: mtu3: disable USB2 LPM

2020-06-30 Thread Chunfeng Yun
On Mon, 2020-06-29 at 15:37 +0800, Peter Chen wrote: > On Mon, Jun 29, 2020 at 2:04 PM Chunfeng Yun > wrote: > > > > A SuperSpeed device shall include the USB 2.0 extension descriptor > > and shall support LPM when operating in USB 2.0 HS mode(see usb3.2 > > spe

Re: usb: mtu3: Checking initialisation of the variable “mep” in two functions

2020-06-28 Thread Chunfeng Yun
Hi, On Sat, 2020-06-27 at 14:28 +0200, Markus Elfring wrote: > Hello, > > A source code analysis approach by the means of the semantic patch language > (Coccinelle software) pointed an implementation detail out for further > development considerations. > > The functions “mtu3_gadget_ep_set_halt”

Re: [PATCH v2] usb: host: xhci-mtk: avoid runtime suspend when removing hcd

2020-06-03 Thread Chunfeng Yun
gt; xhci_mtk_ldos_disable(mtk); > - pm_runtime_put_sync(>dev); > - pm_runtime_disable(>dev); > > return 0; > } Reviewed-by: Chunfeng Yun Thanks

Re: [PATCH v3 0/7] add support USB for MT8183

2020-05-21 Thread Chunfeng Yun
Hi Matthias, On Thu, 2020-05-21 at 14:41 +0200, Matthias Brugger wrote: > Hi Chungfeng, > > On 04/09/2019 03:54, Chunfeng Yun wrote: > > Hi Greg, > > > > > > Please don't try to pick up this series, the dependent ones are still > > under public review,

Re: [PATCH V3 6/8] phy: tegra: xusb: Add support for charger detect

2020-05-14 Thread Chunfeng Yun
On Thu, 2020-05-14 at 11:52 +0530, Nagarjuna Kristam wrote: > Perform charger-detect operation if corresponding dt property is enabled. > Update usb-phy with the detected charger state and max current values. > Register charger-detect API's of usb-phy to provide needed functionalities. > >

Re: [PATCH 3/3] usb: dwc3: keystone: Turn on USB3 PHY before controller

2020-05-13 Thread Chunfeng Yun
On Wed, 2020-05-13 at 16:07 +0300, Roger Quadros wrote: > The Local Power Sleep Controller (LPSC) dependency on AM65 > requires SERDES0 to be powered on before USB. > > We need to power up SERDES0 power domain and hold it on > throughout the reset, init, power on sequence. > > Signed-off-by:

Re: [PATCH] usb: mtk-xhci: Set the XHCI_NO_64BIT_SUPPORT quirk

2019-10-11 Thread Chunfeng Yun
On Fri, 2019-10-11 at 13:35 +0900, Tomasz Figa wrote: > On Thu, Oct 10, 2019 at 7:59 PM Chunfeng Yun > wrote: > > > > On Thu, 2019-10-10 at 18:00 +0900, Tomasz Figa wrote: > > > Hi Chunfeng, > > > > > > On Thu, Oct 10, 2019 at 5:45 PM Chunfeng

Re: [PATCH] usb: mtk-xhci: Set the XHCI_NO_64BIT_SUPPORT quirk

2019-10-10 Thread Chunfeng Yun
On Thu, 2019-10-10 at 18:00 +0900, Tomasz Figa wrote: > Hi Chunfeng, > > On Thu, Oct 10, 2019 at 5:45 PM Chunfeng Yun > wrote: > > > > Hi, Tomasz, > > > > On Thu, 2019-10-10 at 16:50 +0900, Tomasz Figa wrote: > > > MediaTek XHCI host controll

Re: [PATCH] usb: mtk-xhci: Set the XHCI_NO_64BIT_SUPPORT quirk

2019-10-10 Thread Chunfeng Yun
Hi, Tomasz, On Thu, 2019-10-10 at 16:50 +0900, Tomasz Figa wrote: > MediaTek XHCI host controller does not support 64-bit addressing despite > the AC64 bit of HCCPARAMS1 register being set. The platform-specific > glue sets the DMA mask to 32 bits on its own, but it has no effect, > because

[PATCH 2/2] usb: mtu3: fix race condition about delayed_status

2019-10-09 Thread Chunfeng Yun
ere is a usb_request in ep0 request list, it means composite already asked us to continue delayed status by usb_composite_setup_continue(), so we skip request about delayed_status by composite_setup() and still do status stage. Signed-off-by: Chunfeng Yun --- drivers/usb/mtu3/mtu3_gadget_ep0.

[PATCH 1/2] usb: mtu3: add a new function to do status stage

2019-10-09 Thread Chunfeng Yun
Exact a new static function to do status stage Signed-off-by: Chunfeng Yun --- drivers/usb/mtu3/mtu3_gadget_ep0.c | 23 --- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/drivers/usb/mtu3/mtu3_gadget_ep0.c b/drivers/usb/mtu3/mtu3_gadget_ep0.c index

[RESEND PATCH v3 08/11] phy: phy-mtk-tphy: make the ref clock optional

2019-10-09 Thread Chunfeng Yun
Sometimes the reference clock of USB3 PHY comes from oscillator directly, and no need refer to a fixed-clock in DTS anymore if make it optional. Signed-off-by: Chunfeng Yun --- v2~3: no changes --- drivers/phy/mediatek/phy-mtk-tphy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[RESEND PATCH v3 11/11] arm64: dts: mt2712: use non-empty ranges for usb-phy

2019-10-09 Thread Chunfeng Yun
Use non-empty ranges for usb-phy to make the layout of its registers clearer; Replace deprecated compatible by generic Signed-off-by: Chunfeng Yun --- v3: no changes v2: use generic compatible --- arch/arm64/boot/dts/mediatek/mt2712e.dtsi | 42 --- 1 file changed, 22

[RESEND PATCH v3 09/11] phy: phy-mtk-tphy: remove unused u3phya_ref clock

2019-10-09 Thread Chunfeng Yun
The u3phya_ref clock is already moved into sub-node, and renamed as ref clock, no used anymore now, so remove it, this can avoid confusion when support new platforms Signed-off-by: Chunfeng Yun --- v2~3: no changes --- drivers/phy/mediatek/phy-mtk-tphy.c | 18 -- 1 file changed

[RESEND PATCH v3 02/11] dt-bindings: phy-mtk-tphy: make the ref clock optional

2019-10-09 Thread Chunfeng Yun
Make the ref clock optional, then we no need refer to a fixed-clock in DTS anymore when the clock of USB3 PHY comes from oscillator directly Signed-off-by: Chunfeng Yun Acked-by: Rob Herring --- v3: add acked-by Rob v2: no changes --- .../devicetree/bindings/phy/phy-mtk-tphy.txt| 13

[RESEND PATCH v3 10/11] phy: phy-mtk-tphy: add a new reference clock

2019-10-09 Thread Chunfeng Yun
for digital phy. Signed-off-by: Chunfeng Yun --- v3: no changes v2: fix typo of analog --- drivers/phy/mediatek/phy-mtk-tphy.c | 19 ++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/drivers/phy/mediatek/phy-mtk-tphy.c b/drivers/phy/mediatek/phy-mtk-tphy.c index

[RESEND PATCH v3 01/11] dt-bindings: phy-mtk-tphy: add two optional properties for u2phy

2019-10-09 Thread Chunfeng Yun
Add two optional properties, one for tuning J-K voltage by INTR, another for disconnect threshold, both of them are related with connect detection Signed-off-by: Chunfeng Yun --- v3: change commit log v2: change description --- Documentation/devicetree/bindings/phy/phy-mtk-tphy.txt | 2 ++ 1

<    1   2   3   4   5   6   7   8   9   10   >