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

2019-08-23 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 --- drivers/phy/mediatek/phy-mtk-tphy.c | 18 -- 1 file changed, 18 deletions

[PATCH 04/11] dt-bindings: phy-mtk-tphy: add a new reference clock

2019-08-23 Thread Chunfeng Yun
Usually the digital and anolog phys use the same reference clock, but on some platforms, they are separated, so add another optional clock to support it. In order to keep the clock names consistent with PHY IP's, use the da_ref for anolog phy and ref clock for digital phy. Signed-off-by: Chu

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

2019-08-23 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 --- drivers/phy/mediatek/phy-mtk-tphy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/phy

[PATCH 06/11] phy: phy-mtk-tphy: add a property for disconnect threshold

2019-08-23 Thread Chunfeng Yun
This is used to tune the threshold of disconnect Signed-off-by: Chunfeng Yun --- drivers/phy/mediatek/phy-mtk-tphy.c | 17 +++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/drivers/phy/mediatek/phy-mtk-tphy.c b/drivers/phy/mediatek/phy-mtk-tphy.c index

[RESEND PATCH v2 1/2] dt-bindings: usb: mtk-xhci: add an optional xhci_ck clock

2019-08-22 Thread Chunfeng Yun
Add a new optional clock xhci_ck Signed-off-by: Chunfeng Yun --- v2 changes: 1. add the new clock at the end, suggested by Rob --- Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree

[RESEND PATCH v2 2/2] usb: xhci-mtk: add an optional xhci_ck clock

2019-08-22 Thread Chunfeng Yun
Some SoCs may have an optional clock xhci_ck (125M or 200M), it usually uses the same PLL as sys_ck, so support it. Signed-off-by: Chunfeng Yun --- v2 no changes --- drivers/usb/host/xhci-mtk.c | 13 + drivers/usb/host/xhci-mtk.h | 1 + 2 files changed, 14 insertions(+) diff --git

Re: [PATCH v7 09/10] usb: roles: add USB Type-B GPIO connector driver

2019-06-25 Thread Chunfeng Yun
Hi Heikki, On Mon, 2019-06-24 at 12:58 +0300, Heikki Krogerus wrote: > Hi Chunfeng, > > On Tue, Jun 11, 2019 at 04:44:39PM +0800, Chunfeng Yun wrote: > > Due to the requirement of usb-connector.txt binding, the old way > > using extcon to support USB Dual-Role switch is no

Re: [PATCH 3/6] usb: bdc: driver may fail to get USB PHY

2019-06-20 Thread Chunfeng Yun
On Thu, 2019-06-20 at 17:09 -0400, Al Cooper wrote: > Initialization order is important for the USB PHY and the PHY clients. > The init order is based on the build order of the drivers in the > makefiles and the PHY drivers are built early to help with > dependencies, but the new SCMI based clock s

Re: [PATCH 2/6] usb: bdc: Cleanup clock support

2019-06-20 Thread Chunfeng Yun
On Thu, 2019-06-20 at 17:09 -0400, Al Cooper wrote: > - Fix driver to defer on clk_get defer > > Signed-off-by: Al Cooper > --- > drivers/usb/gadget/udc/bdc/bdc_core.c | 15 +-- > 1 file changed, 9 insertions(+), 6 deletions(-) > > diff --git a/drivers/usb/gadget/udc/bdc/bdc_core.c

[v2 PATCH] usb: dwc3: remove unused @lock member of dwc3_ep struct

2019-06-20 Thread Chunfeng Yun
The member @lock of dwc3_ep struct is only initialized, and not used elsewhere, so remove it. Signed-off-by: Chunfeng Yun --- v2: fix typo of dwc3_ep in commit log --- drivers/usb/dwc3/core.h | 2 -- drivers/usb/dwc3/gadget.c | 2 -- 2 files changed, 4 deletions(-) diff --git a/drivers/usb

Re: [PATCH] usb: dwc3: remove unused @lock member of dwc3_ep struct

2019-06-20 Thread Chunfeng Yun
Hi, On Thu, 2019-06-20 at 11:19 +0300, Felipe Balbi wrote: > Hi, > > Chunfeng Yun writes: > > > The member @lock of dwc2_ep struct is only initialized, > > and not used elsewhere, so remove it. Sorry, I need send v2 to fix typo of dwc2_ep > > &

[PATCH] usb: dwc3: remove unused @lock member of dwc3_ep struct

2019-06-20 Thread Chunfeng Yun
The member @lock of dwc2_ep struct is only initialized, and not used elsewhere, so remove it. Signed-off-by: Chunfeng Yun --- drivers/usb/dwc3/core.h | 2 -- drivers/usb/dwc3/gadget.c | 2 -- 2 files changed, 4 deletions(-) diff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/core.h index

Re: [PATCH] mtu3: fix setup packet response for HNP and SRP request

2019-06-12 Thread Chunfeng Yun
Hi Macpaul, On Wed, 2019-06-12 at 14:28 +0800, Macpaul Lin wrote: > 1. Add OTG_HNP_REQD and OTG_SRP_REQD definitions in ch9.h. > 2. When OTG_HNP_REQD and OTG_SRP_REQD has been received, > usb hardware must not enter TEST mode but need to response setup packet. > 3. Add otg_srp_reqd and otg_hnp_req

[PATCH 2/5] dt-bindings: usb: mtu3: support force_vbus mode

2019-06-11 Thread Chunfeng Yun
Add a new property to indicate that the controller doesn't support Vbus detection due to non-exist Vbus PIN, and the driver should set force_vbus state for device mode Signed-off-by: Chunfeng Yun --- Documentation/devicetree/bindings/usb/mediatek,mtu3.txt | 2 ++ 1 file changed, 2 inser

[PATCH 1/5] dt-bindings: usb: mtu3: fix typo of DMA clock name

2019-06-11 Thread Chunfeng Yun
Fix typo of dma_ck Signed-off-by: Chunfeng Yun --- Documentation/devicetree/bindings/usb/mediatek,mtu3.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/usb/mediatek,mtu3.txt b/Documentation/devicetree/bindings/usb/mediatek,mtu3.txt index

[PATCH 3/5] dt-bindings: usb: mtk-xhci: add an optional xhci_ck clock

2019-06-11 Thread Chunfeng Yun
Add a new optional clock xhci_ck Signed-off-by: Chunfeng Yun --- Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.txt b/Documentation/devicetree/bindings/usb

[PATCH 5/5] usb: xhci-mtk: add an optional xhci_ck clock

2019-06-11 Thread Chunfeng Yun
Some SoCs may have an optional clock xhci_ck (125M or 200M), it usually uses the same PLL as sys_ck, so support it. Signed-off-by: Chunfeng Yun --- drivers/usb/host/xhci-mtk.c | 13 + drivers/usb/host/xhci-mtk.h | 1 + 2 files changed, 14 insertions(+) diff --git a/drivers/usb

[PATCH 4/5] usb: mtu3: support force_vbus mode

2019-06-11 Thread Chunfeng Yun
Some SoCs don't support Vbus detection due to non-exist Vbus PIN, so software need set force_vbus state when the controller works as device mode. Signed-off-by: Chunfeng Yun --- drivers/usb/mtu3/mtu3.h | 3 +++ drivers/usb/mtu3/mtu3_core.c | 1 + drivers/usb/mtu3/mtu3_dr.c

[PATCH v7 06/10] device connection: Add fwnode_connection_find_match()

2019-06-11 Thread Chunfeng Yun
: Heikki Krogerus Signed-off-by: Chunfeng Yun --- v7: rebased on Rafael's tree [1] (after rc4), provided by Heikki [1] https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git/log/?h=linux-next v6: new patch --- drivers/base/devcon.c

[PATCH v7 10/10] usb: mtu3: register a USB Role Switch for dual role mode

2019-06-11 Thread Chunfeng Yun
Because extcon is not allowed for new bindings, and the dual role switch is supported by USB Role Switch, especially for Type-C drivers, so register a USB Role Switch to support the new way Signed-off-by: Chunfeng Yun --- v7 no changes v6 no changes v5 no changes v4 changes: 1. assign fwnode

[PATCH v7 04/10] dt-bindings: usb: mtu3: add properties about USB Role Switch

2019-06-11 Thread Chunfeng Yun
Now the USB Role Switch is supported, so add properties about it, and modify some description related. Signed-off-by: Chunfeng Yun Reviewed-by: Rob Herring --- v7 no changes v6 no changes v5 changes: 1. modify decription about extcon and vbus-supply properties 2. make this patch depend on [1

[PATCH v7 05/10] usb: roles: Introduce stubs for the exiting functions in role.h.

2019-06-11 Thread Chunfeng Yun
From: Yu Chen This patch adds stubs for the exiting functions while CONFIG_USB_ROLE_SWITCH does not enabled. Cc: Greg Kroah-Hartman Cc: Heikki Krogerus Cc: Hans de Goede Cc: Andy Shevchenko Cc: John Stultz Reviewed-by: Heikki Krogerus Signed-off-by: Yu Chen Signed-off-by: Chunfeng Yun

[PATCH v7 09/10] usb: roles: add USB Type-B GPIO connector driver

2019-06-11 Thread Chunfeng Yun
provided by extcon-usb-gpio driver Signed-off-by: Chunfeng Yun Tested-by: Nagarjuna Kristam --- v7 changes: 1. remove macro DEV_PMS_OPS suggested by Andy 2. add tested-by Nagarjuna v6 changes: 1. get usb-role-swtich by usb_role_switch_get() v5 changes: 1. put usb_role_switch when error

[PATCH v7 07/10] usb: roles: Add fwnode_usb_role_switch_get() function

2019-06-11 Thread Chunfeng Yun
From: Heikki Krogerus The fwnode_usb_role_switch_get() function is exactly the same as usb_role_switch_get(), except that it takes struct fwnode_handle as parameter instead of struct device. Signed-off-by: Heikki Krogerus Signed-off-by: Chunfeng Yun Tested-by: Biju Das --- v7: add signed

[PATCH v7 08/10] usb: roles: get usb-role-switch from parent

2019-06-11 Thread Chunfeng Yun
when the USB host controller is the parent of the connector, usually type-B, sometimes don't need the graph, so we should check whether it's parent registers usb-role-switch or not firstly, and get it if exists. Signed-off-by: Heikki Krogerus Signed-off-by: Chunfeng Yun --- v7 no c

[PATCH v7 02/10] dt-bindings: connector: add optional properties for Type-B

2019-06-11 Thread Chunfeng Yun
Add id-gpios, vbus-gpios, vbus-supply and pinctrl properties for usb-b-connector Signed-off-by: Chunfeng Yun Reviewed-by: Rob Herring --- v7 no changes v6 no changes v5 changes: 1. add reviewed by Rob v4 no changes v3 changes: 1. add GPIO direction, and use fixed-regulator for GPIO

[PATCH v7 03/10] dt-bindings: usb: add binding for Type-B GPIO connector driver

2019-06-11 Thread Chunfeng Yun
It's used to support dual role switch via GPIO when use Type-B receptacle, typically the USB ID pin is connected to an input GPIO, and also used to enable/disable device when the USB Vbus pin is connected to an input GPIO. Signed-off-by: Chunfeng Yun --- v7 changes: 1. add descriptio

[PATCH v7 00/10] add USB Type-B GPIO connector driver

2019-06-11 Thread Chunfeng Yun
LE_SWITCH in mtu3/Kconfig suggested by Heikki 6. rename ssusb_mode_manual_switch() to ssusb_mode_switch() v2 changes: 1. make binding clear, and add a extra compatible suggested by Hans Chunfeng Yun (7): dt-binding: usb: add usb-role-switch property dt-bindings: connector: add optional p

[PATCH v7 01/10] dt-binding: usb: add usb-role-switch property

2019-06-11 Thread Chunfeng Yun
Add a property usb-role-switch to tell the driver that use USB Role Switch framework to handle the role switch, it's useful when the driver has already supported other ways, such as extcon framework etc. Cc: Biju Das Cc: Yu Chen Signed-off-by: Chunfeng Yun Reviewed-by: Rob Herring Review

Re: [PATCH v6 09/10] usb: roles: add USB Type-B GPIO connector driver

2019-06-10 Thread Chunfeng Yun
On Mon, 2019-06-10 at 16:03 +0530, Nagarjuna Kristam wrote: > Tested-by: Nagarjuna Kristam > Thanks > On 29-05-2019 13:13, Chunfeng Yun wrote: > > Due to the requirement of usb-connector.txt binding, the old way > > using extcon to support USB Dual-Role switch is now de

Re: [PATCH v6 09/10] usb: roles: add USB Type-B GPIO connector driver

2019-06-10 Thread Chunfeng Yun
On Thu, 2019-06-06 at 09:31 +0300, Andy Shevchenko wrote: > On Thu, Jun 6, 2019 at 5:53 AM Chunfeng Yun wrote: > > > > On Wed, 2019-06-05 at 11:45 +0300, Andy Shevchenko wrote: > > > On Wed, May 29, 2019 at 10:44 AM Chunfeng Yun > > > wrote: > > &g

[next PATCH] Revert "usb: mtu3: fix up undefined reference to usb_debug_root"

2019-06-09 Thread Chunfeng Yun
It's not needed after [1] is applied, because usb_debug_root is created by usb common core but not usbcore now. [1] 812086d362a1 ("USB: move usb debugfs directory creation to the usb common core") Signed-off-by: Chunfeng Yun --- drivers/usb/mtu3/mtu3_debugfs.c | 3 ++- 1

Re: [PATCH v6 06/10] device connection: Add fwnode_connection_find_match()

2019-06-09 Thread Chunfeng Yun
Hi Heikki, On Fri, 2019-06-07 at 13:30 +0300, Heikki Krogerus wrote: > Hi, > > On Wed, May 29, 2019 at 03:43:44PM +0800, Chunfeng Yun wrote: > > From: Heikki Krogerus > > > > The fwnode_connection_find_match() function is exactly the > > same as device_connect

Re: [PATCH v6 09/10] usb: roles: add USB Type-B GPIO connector driver

2019-06-05 Thread Chunfeng Yun
On Wed, 2019-06-05 at 11:45 +0300, Andy Shevchenko wrote: > On Wed, May 29, 2019 at 10:44 AM Chunfeng Yun > wrote: > > > > Due to the requirement of usb-connector.txt binding, the old way > > using extcon to support USB Dual-Role switch is now deprecated > > when

Re: [PATCH v3] USB: move usb debugfs directory creation to the usb common core

2019-06-05 Thread Chunfeng Yun
y having > one module init/exit function and have the common code initialize the > led trigger if needed. > > Reported-by: Chunfeng Yun > Cc: Felipe Balbi > Signed-off-by: Greg Kroah-Hartman > --- > Chunfeng, can you try testing this again? Tested-by: Chunfeng Yun Th

Re: [PATCH v2] USB: move usb debugfs directory creation to the usb common core

2019-06-05 Thread Chunfeng Yun
ly by only having > one module init/exit function and have the common code initialize the > led trigger if needed. > > Reported-by: From: Chunfeng Yun > Cc: Felipe Balbi > Signed-off-by: Greg Kroah-Hartman > --- > > Chunfeng, can you test this version to verify it work

Re: [PATCH] USB: move usb debugfs directory creation to the usb common core

2019-06-05 Thread Chunfeng Yun
On Wed, 2019-06-05 at 10:28 +0300, Felipe Balbi wrote: > Hi, > > Greg Kroah-Hartman writes: > >> Greg Kroah-Hartman writes: > >> > diff --git a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c > >> > index 7fcb9f782931..f3d6b1ab80cb 100644 > >> > --- a/drivers/usb/core/usb.c > >> > +++ b/drivers/

Re: [PATCH] USB: move usb debugfs directory creation to the usb common core

2019-06-05 Thread Chunfeng Yun
On Tue, 2019-06-04 at 13:59 +0200, Greg Kroah-Hartman wrote: > On Tue, Jun 04, 2019 at 11:32:58AM +0200, Greg Kroah-Hartman wrote: > > The USB gadget subsystem wants to use the USB debugfs root directory, so > > move it to the common "core" USB code so that it is properly initialized > > and remove

Re: [PATCH] USB: move usb debugfs directory creation to the usb common core

2019-06-04 Thread Chunfeng Yun
On Tue, 2019-06-04 at 13:59 +0200, Greg Kroah-Hartman wrote: > On Tue, Jun 04, 2019 at 11:32:58AM +0200, Greg Kroah-Hartman wrote: > > The USB gadget subsystem wants to use the USB debugfs root directory, so > > move it to the common "core" USB code so that it is properly initialized > > and remove

Re: [PATCH v4] usb: create usb_debug_root for gadget only

2019-06-04 Thread Chunfeng Yun
On Tue, 2019-06-04 at 10:24 +0200, Greg Kroah-Hartman wrote: > On Tue, Jun 04, 2019 at 10:47:55AM +0300, Felipe Balbi wrote: > > > > Hi, > > > > Greg Kroah-Hartman writes: > > >> +struct dentry *usb_debugfs_init(void) > > >> +{ > > >> +if (!usb_debug_root) > > >> +usb_deb

Re: [PATCH v4] usb: create usb_debug_root for gadget only

2019-06-04 Thread Chunfeng Yun
On Tue, 2019-06-04 at 09:37 +0200, Greg Kroah-Hartman wrote: > On Tue, Jun 04, 2019 at 03:34:07PM +0800, Chunfeng Yun wrote: > > When CONFIG_USB is not set, and CONFIG_USB_GADGET is set, > > there is an issue, e.g.: > > > > drivers/usb/mtu3/mtu3_debugfs.o: in function

[PATCH v4] usb: create usb_debug_root for gadget only

2019-06-04 Thread Chunfeng Yun
en host is supported (CONFIG_USB is set), for convenience, we also want it created when gadget only is enabled, this patch try to support it. Reported-by: Randy Dunlap Signed-off-by: Chunfeng Yun --- v4: move common API into common.c suggested by Felipe v3: 1. still create usb_debug_root for gadg

Re: [v3 PATCH] usb: create usb_debug_root for gadget only

2019-06-03 Thread Chunfeng Yun
On Fri, 2019-05-31 at 08:44 +0300, Felipe Balbi wrote: > Hi, > > Chunfeng Yun writes: > > > Hi Felipe, > > On Tue, 2019-05-28 at 11:11 +0300, Felipe Balbi wrote: > >> Hi, > >> > >> Chunfeng Yun writes: > >> > diff --git

Re: [PATCH v6 05/10] usb: roles: Introduce stubs for the exiting functions in role.h.

2019-06-03 Thread Chunfeng Yun
On Mon, 2019-06-03 at 15:19 +0200, Greg Kroah-Hartman wrote: > On Wed, May 29, 2019 at 03:43:43PM +0800, Chunfeng Yun wrote: > > From: Yu Chen > > > > This patch adds stubs for the exiting functions while > > CONFIG_USB_ROLE_SWITCH does not enabled. > > &

Re: [PATCH v6 07/10] usb: roles: Add fwnode_usb_role_switch_get() function

2019-06-03 Thread Chunfeng Yun
On Mon, 2019-06-03 at 15:19 +0200, Greg Kroah-Hartman wrote: > On Wed, May 29, 2019 at 03:43:45PM +0800, Chunfeng Yun wrote: > > From: Heikki Krogerus > > > > The fwnode_usb_role_switch_get() function is exactly the > > same as usb_role_switch_get(), except that it tak

Re: [v3 PATCH] usb: create usb_debug_root for gadget only

2019-05-30 Thread Chunfeng Yun
Hi Felipe, On Tue, 2019-05-28 at 11:11 +0300, Felipe Balbi wrote: > Hi, > > Chunfeng Yun writes: > > diff --git a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c > > index 7fcb9f782931..88b3ee03a12d 100644 > > --- a/drivers/usb/core/usb.c > > +++ b/drivers/usb/

[PATCH v6 10/10] usb: mtu3: register a USB Role Switch for dual role mode

2019-05-29 Thread Chunfeng Yun
Because extcon is not allowed for new bindings, and the dual role switch is supported by USB Role Switch, especially for Type-C drivers, so register a USB Role Switch to support the new way Signed-off-by: Chunfeng Yun --- v6 no changes v5 no changes v4 changes: 1. assign fwnode member of

[PATCH v6 07/10] usb: roles: Add fwnode_usb_role_switch_get() function

2019-05-29 Thread Chunfeng Yun
From: Heikki Krogerus The fwnode_usb_role_switch_get() function is exactly the same as usb_role_switch_get(), except that it takes struct fwnode_handle as parameter instead of struct device. Signed-off-by: Heikki Krogerus --- v6: new patch --- drivers/usb/roles/class.c | 20 +

[PATCH v6 05/10] usb: roles: Introduce stubs for the exiting functions in role.h.

2019-05-29 Thread Chunfeng Yun
From: Yu Chen This patch adds stubs for the exiting functions while CONFIG_USB_ROLE_SWITCH does not enabled. Cc: Greg Kroah-Hartman Cc: Heikki Krogerus Cc: Hans de Goede Cc: Andy Shevchenko Cc: John Stultz Reviewed-by: Heikki Krogerus Signed-off-by: Yu Chen --- v6: merge this patch [1]

[PATCH v6 08/10] usb: roles: get usb-role-switch from parent

2019-05-29 Thread Chunfeng Yun
when the USB host controller is the parent of the connector, usually type-B, sometimes don't need the graph, so we should check whether it's parent registers usb-role-switch or not firstly, and get it if exists. Signed-off-by: Heikki Krogerus Signed-off-by: Chunfeng Yun --- v6:

[PATCH v6 06/10] device connection: Add fwnode_connection_find_match()

2019-05-29 Thread Chunfeng Yun
From: Heikki Krogerus The fwnode_connection_find_match() function is exactly the same as device_connection_find_match(), except it takes struct fwnode_handle as parameter instead of struct device. That allows locating device connections before the device entries have been created. Signed-off-by:

[PATCH v6 09/10] usb: roles: add USB Type-B GPIO connector driver

2019-05-29 Thread Chunfeng Yun
provided by extcon-usb-gpio driver Signed-off-by: Chunfeng Yun --- v6 changes: 1. get usb-role-swtich by usb_role_switch_get() v5 changes: 1. put usb_role_switch when error happens suggested by Biju 2. don't treat bype-B connector as a virtual device suggested by Rob v4 changes: 1. r

[PATCH v6 02/10] dt-bindings: connector: add optional properties for Type-B

2019-05-29 Thread Chunfeng Yun
Add id-gpios, vbus-gpios, vbus-supply and pinctrl properties for usb-b-connector Signed-off-by: Chunfeng Yun Reviewed-by: Rob Herring --- v6 no changes v5 changes: 1. add reviewed by Rob v4 no changes v3 changes: 1. add GPIO direction, and use fixed-regulator for GPIO controlled VBUS

[PATCH v6 03/10] dt-bindings: usb: add binding for Type-B GPIO connector driver

2019-05-29 Thread Chunfeng Yun
It's used to support dual role switch via GPIO when use Type-B receptacle, typically the USB ID pin is connected to an input GPIO pin Signed-off-by: Chunfeng Yun --- v6 changes: 1. remove status and port nodes in example 2. make vbus-supply as optional property v5 changes: 1. treat t

[PATCH v6 01/10] dt-binding: usb: add usb-role-switch property

2019-05-29 Thread Chunfeng Yun
Add a property usb-role-switch to tell the driver that use USB Role Switch framework to handle the role switch, it's useful when the driver has already supported other ways, such as extcon framework etc. Cc: Biju Das Cc: Yu Chen Signed-off-by: Chunfeng Yun Reviewed-by: Rob Herring Review

[PATCH v6 00/10] add USB Type-B GPIO connector driver

2019-05-29 Thread Chunfeng Yun
to ssusb_mode_switch() v2 changes: 1. make binding clear, and add a extra compatible suggested by Hans Chunfeng Yun (7): dt-binding: usb: add usb-role-switch property dt-bindings: connector: add optional properties for Type-B dt-bindings: usb: add binding for Type-B GPIO connector driver dt

[PATCH v6 04/10] dt-bindings: usb: mtu3: add properties about USB Role Switch

2019-05-29 Thread Chunfeng Yun
Now the USB Role Switch is supported, so add properties about it, and modify some description related. Signed-off-by: Chunfeng Yun Reviewed-by: Rob Herring --- v4 no changes v5 changes: 1. modify decription about extcon and vbus-supply properties 2. make this patch depend on [1] [1]: [v3

RE: [PATCH v5 4/6] usb: roles: add API to get usb_role_switch by node

2019-05-28 Thread Chunfeng Yun
Hi Biju & Yu, On Tue, 2019-05-28 at 06:52 +, Biju Das wrote: > Hi Chunfeng Yun, > > + Chen Yu > > Thanks for the feedback. [...] > > Just a suggestion, Do you think, is it worth to add the below patch[1] also > part of this series? So that we have all common p

Re: [v3 PATCH] usb: create usb_debug_root for gadget only

2019-05-28 Thread Chunfeng Yun
Hi Felipe, On Tue, 2019-05-28 at 11:11 +0300, Felipe Balbi wrote: > Hi, > > Chunfeng Yun writes: > > diff --git a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c > > index 7fcb9f782931..88b3ee03a12d 100644 > > --- a/drivers/usb/core/usb.c > > +++ b/drivers/usb/

Re: [v3 PATCH] usb: create usb_debug_root for gadget only

2019-05-28 Thread Chunfeng Yun
add Felipe, sorry On Tue, 2019-05-28 at 15:54 +0800, Chunfeng Yun wrote: > When CONFIG_USB is not set, and CONFIG_USB_GADGET is set, > there is an issue, e.g.: > > drivers/usb/mtu3/mtu3_debugfs.o: in function 'ssusb_debugfs_create_root': > mtu3_debugfs.c:(.text+0xba3

[v3 PATCH] usb: create usb_debug_root for gadget only

2019-05-28 Thread Chunfeng Yun
en host is supported (CONFIG_USB is set), for convenience, we also want it created when gadget only is enabled, this patch try to support it. Reported-by: Randy Dunlap Signed-off-by: Chunfeng Yun --- v3: 1. still create usb_debug_root for gadget only 2. abandon mtu3's change 3. drop acked-

Re: [PATCH v5 4/6] usb: roles: add API to get usb_role_switch by node

2019-05-26 Thread Chunfeng Yun
switch by > > > node > > > > > > On Wed, May 22, 2019 at 10:55:17AM +, Biju Das wrote: > > > > Hi Chunfeng Yun, > > > > > > > > Thanks for the feedback. > > > > > > > > > Subject: RE: [PATCH v5 4/6] usb

Re: [PATCH v5 4/6] usb: roles: add API to get usb_role_switch by node

2019-05-26 Thread Chunfeng Yun
On Fri, 2019-05-24 at 14:40 +0300, Heikki Krogerus wrote: > On Thu, May 23, 2019 at 06:16:10PM +0800, Chunfeng Yun wrote: > > Hi Heikki, > > On Wed, 2019-05-22 at 17:26 +0300, Heikki Krogerus wrote: > > > On Wed, May 22, 2019 at 10:55:17AM +, Biju Das wrote:

Re: [RESEND PATCH] usb: mtu3: fix up undefined reference to usb_debug_root

2019-05-26 Thread Chunfeng Yun
On Fri, 2019-05-24 at 13:33 +0200, Greg Kroah-Hartman wrote: > On Fri, May 24, 2019 at 05:25:51PM +0800, Chunfeng Yun wrote: > > On Fri, 2019-05-24 at 09:45 +0200, Greg Kroah-Hartman wrote: > > > On Fri, May 24, 2019 at 02:11:33PM +0800, Chunfeng Yun wrote: > > > > W

Re: [RESEND PATCH] usb: mtu3: fix up undefined reference to usb_debug_root

2019-05-24 Thread Chunfeng Yun
On Fri, 2019-05-24 at 09:45 +0200, Greg Kroah-Hartman wrote: > On Fri, May 24, 2019 at 02:11:33PM +0800, Chunfeng Yun wrote: > > When CONFIG_USB is not set, and CONFIG_USB_GADGET is set, > > there is an issue: > > > > ld: > > drivers/usb/mtu3/mtu3_debugfs.o: in fu

[RESEND PATCH] usb: mtu3: fix up undefined reference to usb_debug_root

2019-05-23 Thread Chunfeng Yun
nabled, so here drop it and use NULL instead. Reported-by: Randy Dunlap Signed-off-by: Chunfeng Yun Acked-by: Randy Dunlap --- drivers/usb/mtu3/mtu3_debugfs.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/usb/mtu3/mtu3_debugfs.c b/drivers/usb/mtu3/mtu3_debugfs.

Re: [PATCH v5 4/6] usb: roles: add API to get usb_role_switch by node

2019-05-23 Thread Chunfeng Yun
Hi Heikki, On Wed, 2019-05-22 at 17:26 +0300, Heikki Krogerus wrote: > On Wed, May 22, 2019 at 10:55:17AM +, Biju Das wrote: > > Hi Chunfeng Yun, > > > > Thanks for the feedback. > > > > > Subject: RE: [PATCH v5 4/6] usb: roles: add API to get usb_role_

RE: [PATCH v5 4/6] usb: roles: add API to get usb_role_switch by node

2019-05-22 Thread Chunfeng Yun
019 at 08:06:41AM +, Biju Das wrote: > > > > > Hi Heikki, > > > > > > > > > > > Subject: Re: [PATCH v5 4/6] usb: roles: add API to get > > > > > > usb_role_switch by node > > > > > > > > > > > >

Re: [PATCH v5 4/6] usb: roles: add API to get usb_role_switch by node

2019-05-21 Thread Chunfeng Yun
On Tue, 2019-05-21 at 13:33 +0300, Heikki Krogerus wrote: > On Tue, May 21, 2019 at 03:35:04PM +0800, Chunfeng Yun wrote: > > Hi, > > On Mon, 2019-05-20 at 09:45 +, Biju Das wrote: > > > > > > Hi Heikki, > > > > > > Thanks for the feedb

Re: [PATCH v5 5/6] usb: roles: add USB Type-B GPIO connector driver

2019-05-21 Thread Chunfeng Yun
Hi, On Mon, 2019-05-20 at 11:31 +0300, Heikki Krogerus wrote: > On Tue, May 14, 2019 at 04:47:22PM +0800, Chunfeng Yun wrote: > > +static int usb_conn_probe(struct platform_device *pdev) > > +{ > > + struct device *dev = &pdev->dev; > > + struc

RE: [PATCH v5 4/6] usb: roles: add API to get usb_role_switch by node

2019-05-21 Thread Chunfeng Yun
> > > Hi Heikki, > > > > > > > Subject: Re: [PATCH v5 4/6] usb: roles: add API to get > > > > usb_role_switch by node > > > > > > > > On Mon, May 20, 2019 at 10:39:11AM +0800, Chunfeng Yun wrote: > > > > > Hi, > >

Re: [PATCH v5 4/6] usb: roles: add API to get usb_role_switch by node

2019-05-19 Thread Chunfeng Yun
Hi, On Fri, 2019-05-17 at 16:05 +0300, Heikki Krogerus wrote: > Hi, > > On Fri, May 17, 2019 at 01:37:36PM +0300, Heikki Krogerus wrote: > > On Tue, May 14, 2019 at 04:47:21PM +0800, Chunfeng Yun wrote: > > > Add fwnode_usb_role_switch_get() to make easier to get > &g

Re: [v3 PATCH] dt-binding: usb: add usb-role-switch property

2019-05-19 Thread Chunfeng Yun
On Fri, 2019-05-17 at 16:27 +0300, Heikki Krogerus wrote: > On Wed, May 08, 2019 at 05:17:44PM +0800, Chunfeng Yun wrote: > > Add a property usb-role-switch to tell the driver that use > > USB Role Switch framework to handle the role switch, > > it's useful when the dr

[v3 PATCH] dt-binding: usb: add usb-role-switch property

2019-05-08 Thread Chunfeng Yun
Add a property usb-role-switch to tell the driver that use USB Role Switch framework to handle the role switch, it's useful when the driver has already supported other ways, such as extcon framework etc. Cc: Biju Das Cc: Yu Chen Signed-off-by: Chunfeng Yun --- v3: add property type, m

Re: [v2 PATCH] dt-binding: usb: add usb-role-switch property

2019-05-07 Thread Chunfeng Yun
On Tue, 2019-05-07 at 17:13 +0300, Heikki Krogerus wrote: > On Tue, May 07, 2019 at 10:22:58AM +0800, Chunfeng Yun wrote: > > diff --git a/Documentation/devicetree/bindings/usb/generic.txt > > b/Documentation/devicetree/bindings/usb/generic.txt > > index 0a74ab8dfdc2

[PATCH v4 4/6] usb: roles: add API to get usb_role_switch by node

2019-04-25 Thread Chunfeng Yun
Add fwnode_usb_role_switch_get() to make easier to get usb_role_switch by fwnode which register it. It's useful when there is not device_connection registered between two drivers and only knows the fwnode which register usb_role_switch. Signed-off-by: Chunfeng Yun --- v4 changes: 1

[PATCH v4 5/6] usb: roles: add USB Type-B GPIO connector driver

2019-04-25 Thread Chunfeng Yun
provided by extcon-usb-gpio driver Signed-off-by: Chunfeng Yun --- v4 changes: 1. remove linux/gpio.h suggested by Linus 2. put node when error happens v3 changes: 1. treat bype-B connector as a virtual device; 2. change file name again v2 changes: 1. file name is changed 2. use new

[v4 PATCH 0/6] add USB Type-B GPIO connector driver

2019-04-25 Thread Chunfeng Yun
suggested by Heikki 6. rename ssusb_mode_manual_switch() to ssusb_mode_switch() v2 changes: 1. make binding clear, and add a extra compatible suggested by Hans Chunfeng Yun (6): dt-bindings: connector: add optional properties for Type-B dt-bindings: usb: add binding for Type-B GPIO connector

[PATCH] arm64: dts: mt8183: add usb node

2019-04-15 Thread Chunfeng Yun
From: Jumin Li Add USB DTS node to the mt8183 and mt8183-evb. Signed-off-by: Jumin Li Signed-off-by: Chunfeng Yun --- this patch is based on v5.1-rc1 and these patches: https://patchwork.kernel.org/patch/10856987/ https://patchwork.kernel.org/patch/10839021/ https://patchwork.kernel.org/patch

Re: [v2 PATCH 4/4] phy: phy-meson-gxl-usb2: get optional clock by devm_clk_get_optional()

2019-04-10 Thread Chunfeng Yun
On Wed, 2019-04-10 at 19:59 +0200, Martin Blumenstingl wrote: > On Wed, Apr 10, 2019 at 8:13 AM Chunfeng Yun > wrote: > > > > Use devm_clk_get_optional() to get optional clock > > > > Cc: Martin Blumenstingl > > Signed-off-by: Chunfeng Yun > >

[v3 PATCH] PCI: mediatek: get optional clock by devm_clk_get_optional()

2019-04-09 Thread Chunfeng Yun
Use devm_clk_get_optional() to get optional clock Cc: Ryder Lee Cc: Honghui Zhang Signed-off-by: Chunfeng Yun Acked-by: Ryder Lee Acked-by: Honghui Zhang --- v3: add Acked-by Ryder and Honghui --- drivers/pci/controller/pcie-mediatek.c | 50 -- 1 file changed, 15

[v2 PATCH 3/4] phy: socionext: get optional clock by devm_clk_get_optional()

2019-04-09 Thread Chunfeng Yun
Use devm_clk_get_optional() to get optional clock Cc: Kunihiko Hayashi Signed-off-by: Chunfeng Yun Reviewed-by: Kunihiko Hayashi --- v2: add Reviewed-by Kunihiko Hayashi --- drivers/phy/socionext/phy-uniphier-usb3hs.c | 10 +++--- drivers/phy/socionext/phy-uniphier-usb3ss.c | 10

[v2 PATCH 4/4] phy: phy-meson-gxl-usb2: get optional clock by devm_clk_get_optional()

2019-04-09 Thread Chunfeng Yun
Use devm_clk_get_optional() to get optional clock Cc: Martin Blumenstingl Signed-off-by: Chunfeng Yun Acked-by: Martin Blumenstingl --- v2: add Acked-by Martin Blumenstingl --- drivers/phy/amlogic/phy-meson-gxl-usb2.c | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) diff

[v2 PATCH 2/4] phy: qcom-qusb2: get optional clock by devm_clk_get_optional()

2019-04-09 Thread Chunfeng Yun
Use devm_clk_get_optional() to get optional clock Cc: Andy Gross Cc: David Brown Cc: Vivek Gautam Signed-off-by: Chunfeng Yun --- v2: no changes --- drivers/phy/qualcomm/phy-qcom-qusb2.c | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/phy/qualcomm/phy

[v2 PATCH 1/4] phy: phy-mtk-tphy: get optional clock by devm_clk_get_optional()

2019-04-09 Thread Chunfeng Yun
Use devm_clk_get_optional() to get optional clock Signed-off-by: Chunfeng Yun --- v2: no changes --- drivers/phy/mediatek/phy-mtk-tphy.c | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/phy/mediatek/phy-mtk-tphy.c b/drivers/phy/mediatek/phy-mtk-tphy.c

Re: [v3 PATCH 5/6] usb: roles: add USB Type-B GPIO connector driver

2019-04-08 Thread Chunfeng Yun
Hi, On Thu, 2019-04-04 at 23:35 +0700, Linus Walleij wrote: > On Wed, Apr 3, 2019 at 9:09 AM Chunfeng Yun wrote: > > > Due to the requirement of usb-connector.txt binding, the old way > > using extcon to support USB Dual-Role switch is now deprecated > > when use Type-B c

[v2 PATCH] PCI: mediatek: get optional clock by devm_clk_get_optional()

2019-03-31 Thread Chunfeng Yun
Use devm_clk_get_optional() to get optional clock Cc: Ryder Lee Cc: Honghui Zhang Signed-off-by: Chunfeng Yun --- v2: 1. cc Ryder and Honghui 2. fix up omitted 'if (IS_ERR())' --- drivers/pci/controller/pcie-mediatek.c | 50 -- 1 file changed, 15 inserti

Re: [PATCH] PCI: mediatek: get optional clock by devm_clk_get_optional()

2019-03-31 Thread Chunfeng Yun
Hi Ryder, On Sun, 2019-03-31 at 18:10 +0800, Ryder Lee wrote: > On Sat, 2019-03-30 at 18:00 +0800, Chunfeng Yun wrote: > > Use devm_clk_get_optional() to get optional clock > > > > Signed-off-by: Chunfeng Yun > > --- > > drivers/pc

[PATCH] PCI: mediatek: get optional clock by devm_clk_get_optional()

2019-03-30 Thread Chunfeng Yun
Use devm_clk_get_optional() to get optional clock Signed-off-by: Chunfeng Yun --- drivers/pci/controller/pcie-mediatek.c | 46 ++ 1 file changed, 11 insertions(+), 35 deletions(-) diff --git a/drivers/pci/controller/pcie-mediatek.c b/drivers/pci/controller/pcie

[PATCH 1/4] phy: phy-mtk-tphy: get optional clock by devm_clk_get_optional()

2019-03-30 Thread Chunfeng Yun
Use devm_clk_get_optional() to get optional clock Signed-off-by: Chunfeng Yun --- drivers/phy/mediatek/phy-mtk-tphy.c | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/phy/mediatek/phy-mtk-tphy.c b/drivers/phy/mediatek/phy-mtk-tphy.c index 5b6a470ca145

[PATCH 2/4] phy: qcom-qusb2: get optional clock by devm_clk_get_optional()

2019-03-30 Thread Chunfeng Yun
Use devm_clk_get_optional() to get optional clock Cc: Andy Gross Cc: David Brown Cc: Vivek Gautam Signed-off-by: Chunfeng Yun --- drivers/phy/qualcomm/phy-qcom-qusb2.c | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/phy/qualcomm/phy-qcom-qusb2.c b

[PATCH 4/4] phy: phy-meson-gxl-usb2: get optional clock by devm_clk_get_optional()

2019-03-30 Thread Chunfeng Yun
Use devm_clk_get_optional() to get optional clock Cc: Martin Blumenstingl Signed-off-by: Chunfeng Yun --- drivers/phy/amlogic/phy-meson-gxl-usb2.c | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/phy/amlogic/phy-meson-gxl-usb2.c b/drivers/phy/amlogic/phy

[PATCH 3/4] phy: socionext: get optional clock by devm_clk_get_optional()

2019-03-30 Thread Chunfeng Yun
Use devm_clk_get_optional() to get optional clock Cc: Kunihiko Hayashi Signed-off-by: Chunfeng Yun --- drivers/phy/socionext/phy-uniphier-usb3hs.c | 10 +++--- drivers/phy/socionext/phy-uniphier-usb3ss.c | 10 +++--- 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a

Re: [PATCH][next] scsi: phy: mediatek: fix typo in author's email address

2019-03-20 Thread Chunfeng Yun
@ static struct platform_driver ufs_mtk_phy_driver = { > module_platform_driver(ufs_mtk_phy_driver); > > MODULE_DESCRIPTION("Universal Flash Storage (UFS) MediaTek MPHY"); > -MODULE_AUTHOR("Stanley Chu "); > +MODULE_AUTHOR("Stanley Chu "); > MODULE_LICENSE("GPL v2"); Thank you. Acked-by: Chunfeng Yun

[PATCH 5/5] usb: mtu3: register a USB Role Switch for Dual-Role mode

2019-03-07 Thread Chunfeng Yun
Due to extcon is not allowed for new bindings, and the Dual-Role switch is supported by USB Role Switch, especially for Type-C drivers, so register a USB Role Switch to support the new way Signed-off-by: Chunfeng Yun --- drivers/usb/mtu3/mtu3.h | 5 drivers/usb/mtu3/mtu3_dr.c | 50

[PATCH 4/5] usb: roles: add USB Type-B connector driver

2019-03-07 Thread Chunfeng Yun
Due to the requirement of usb-connector.txt binding, the old way using extcon to support USB Dual-Role switch is now deprecated when use Type-B connector. This patch introduce a Type-B connector driver and try to replace the function provided by extcon-usb-gpio driver Signed-off-by: Chunfeng Yun

[PATCH 3/5] usb: roles: add API to get usb_role_switch by node

2019-03-07 Thread Chunfeng Yun
Add usb_role_switch_get_by_node() to make easier to get usb_role_switch by node which register it. It's useful when there is not device_connection registered between two drivers and only knows the node which register usb_role_switch. Signed-off-by: Chunfeng Yun --- drivers/usb/roles/cl

[PATCH 2/5] dt-bindings: usb: mtu3: add properties about USB Role Switch

2019-03-07 Thread Chunfeng Yun
Now the USB Role Switch is supported, so add properties about it Signed-off-by: Chunfeng Yun --- .../devicetree/bindings/usb/mediatek,mtu3.txt | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/usb/mediatek,mtu3.txt b

[PATCH 0/5] add USB Type-B connector driver

2019-03-07 Thread Chunfeng Yun
try to replace the function provided by extcon-usb-gpio driver. The main purpose of the patches is also to solve the Type-B connector problem encountered in [1]. [1]: https://patchwork.kernel.org/patch/10819377/ Chunfeng Yun (5): dt-bindings: connector: add optional properties for Type-B dt

[PATCH 1/5] dt-bindings: connector: add optional properties for Type-B

2019-03-07 Thread Chunfeng Yun
Add id-gpios, vbus-gpios, vbus-supply and pinctrl properties for usb-b-connector Signed-off-by: Chunfeng Yun --- .../devicetree/bindings/connector/usb-connector.txt| 10 ++ 1 file changed, 10 insertions(+) diff --git a/Documentation/devicetree/bindings/connector/usb-connector.txt

<    3   4   5   6   7   8   9   10   11   12   >