Re: [PATCH v2] usb: dwc3: gadget: Iterate only over valid endpoints

2014-03-27 Thread Ivan T. Ivanov
On Thu, 2014-03-27 at 12:15 -0500, Felipe Balbi wrote: > > I mean, -rc8 is out, if you fix your patches up right now, how much > testing can you do in the next couple days ? Patches need to soak in > linux-next for a while. Even if Greg would accept a pull request, I'm > not sure I'd feel comforta

[PATCH v6 00/19] usb: phy: msm: Fixes, cleanups and DT support

2014-04-22 Thread Ivan T. Ivanov
From: "Ivan T. Ivanov" Hi, This is a sixth version of patches posted earlier here [1]. Changes since v5. 0001 - Enables driver on new ARCH_QCOM arches 0002 - Fixes section mismatch warning 0012 - Fix coding style error - pointer by Sergei 0014 - usleep_range() replaced with ud

[PATCH v6 13/19] usb: phy: msm: Add support for secondary PHY control

2014-04-22 Thread Ivan T. Ivanov
From: "Ivan T. Ivanov" Allow support to use 2nd HSPHY with USB2 Core. Some platforms may have configuration to allow USB controller work with any of the two HSPHYs present. By default driver configures USB core to use primary HSPHY. Add support to allow user select 2nd HSPHY using DT

[PATCH v6 14/19] usb: phy: msm: Correct USB PHY Reset sequence for newer platform

2014-04-22 Thread Ivan T. Ivanov
From: "Ivan T. Ivanov" On few legacy platforms, USB PHY is having dedicated reset clk. It is used to reset USB PHY after putting USB PHY into low power mode and for calibration of USB PHY. Putting USB PHY into low power mode is causing ulpi read/write timeout as expected. USB PHY re

[PATCH v6 19/19] usb: phy: msm: Use usb_add_phy_dev() to register device

2014-04-22 Thread Ivan T. Ivanov
From: "Ivan T. Ivanov" They could be more than one USB2.0 PHY's on the platform. This will allow all of them to be registred successfuly. Signed-off-by: Ivan T. Ivanov --- drivers/usb/phy/phy-msm-usb.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/driv

[PATCH v6 17/19] usb: phy: msm: Handle disconnect events

2014-04-22 Thread Ivan T. Ivanov
From: "Ivan T. Ivanov" Put the transceiver in non-driving mode. Otherwise host may not detect soft-disconnection. Signed-off-by: Ivan T. Ivanov Cc: Pavankumar Kondeti --- drivers/usb/phy/phy-msm-usb.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/drivers/u

[PATCH v6 16/19] usb: phy: msm: Select secondary PHY via TCSR

2014-04-22 Thread Ivan T. Ivanov
From: Tim Bird Select the secondary PHY using the TCSR register, if phy-num=1 in the DTS (or phy_number is set in the platform data). The SOC has 2 PHYs which can be used with the OTG port, and this code allows configuring the correct one. Note: This resolves the problem I was seeing where I co

[PATCH v6 15/19] usb: phy: msm: Fix PTS definitions for MSM USB controller

2014-04-22 Thread Ivan T. Ivanov
From: Tim Bird Fix the value used for Parallel Transceiver Select (PTS) for the MSM USB controller. This is a standard chipidea PORTSC definition, where a PHY_TYPE of 10b (<<30) is ULPI and 11b (<<30) is SERIAL. Fix the definitions and use them correctly in the driver code. Signed-off-by: Tim B

[PATCH v6 02/19] usb: phy: msm: Remove __init macro from driver probe method

2014-04-22 Thread Ivan T. Ivanov
From: "Ivan T. Ivanov" This fixes following: WARNING: drivers/usb/phy/built-in.o(.data+0x68): Section mismatch in reference from the variable msm_otg_driver to the function .init.text:msm_otg_probe() The variable msm_otg_driver references the function __init msm_otg_probe() Sig

[PATCH v6 18/19] usb: phy: msm: Vote for corner of VDD CX instead of voltage of VDD CX

2014-04-22 Thread Ivan T. Ivanov
From: "Ivan T. Ivanov" New platform uses RBCPR hardware feature, with that voting for absolute voltage of VDD CX is not required. Hence vote for corner of VDD CX which uses nominal corner voltage on VDD CX. Signed-off-by: Ivan T. Ivanov Cc: Mayank Rana --- .../devicetree/bindin

[PATCH v6 12/19] usb: phy: msm: Use reset framework for LINK and PHY resets

2014-04-22 Thread Ivan T. Ivanov
From: "Ivan T. Ivanov" Signed-off-by: Ivan T. Ivanov --- drivers/usb/phy/phy-msm-usb.c | 29 + include/linux/usb/msm_hsusb.h | 3 +++ 2 files changed, 24 insertions(+), 8 deletions(-) diff --git a/drivers/usb/phy/phy-msm-usb.c b/drivers/usb/phy/phy-msm-u

[PATCH v6 01/19] usb: phy: msm: Make driver selectable on ARCH_QCOM

2014-04-22 Thread Ivan T. Ivanov
From: "Ivan T. Ivanov" Controller could be found on APQ and MSM platforms, make configuration description more generic. Signed-off-by: Ivan T. Ivanov --- drivers/usb/phy/Kconfig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/usb/phy/Kconfig b/drive

[PATCH v6 05/19] usb: phy: msm: Remove unnecessarily check for valid regulators.

2014-04-22 Thread Ivan T. Ivanov
From: "Ivan T. Ivanov" Whether regulators are available or not is checked at driver probe. If they are not available driver will refuse to load, so no need to check them again. Signed-off-by: Ivan T. Ivanov --- drivers/usb/phy/phy-msm-usb.c | 10 -- 1 file changed, 10

[PATCH v6 10/19] usb: phy: msm: Properly check result from platform_get_irq()

2014-04-22 Thread Ivan T. Ivanov
From: "Ivan T. Ivanov" Function return negative code on error. Signed-off-by: Ivan T. Ivanov --- drivers/usb/phy/phy-msm-usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/phy/phy-msm-usb.c b/drivers/usb/phy/phy-msm-usb.c index 6b44826..2dc7948 10

[PATCH v6 04/19] usb: phy: msm: Migrate to Managed Device Resource allocation

2014-04-22 Thread Ivan T. Ivanov
From: "Ivan T. Ivanov" Move memory, regulators, clocks and irq allocation to devm_* variants. Properly check for valid clk handles. Signed-off-by: Ivan T. Ivanov --- drivers/usb/phy/phy-msm-usb.c | 195 -- 1 file changed, 75 insertions(+), 120

[PATCH v6 11/19] usb: phy: msm: Add device tree support and binding information

2014-04-22 Thread Ivan T. Ivanov
From: "Ivan T. Ivanov" Allows MSM OTG controller to be specified via device tree. Signed-off-by: Ivan T. Ivanov --- .../devicetree/bindings/usb/msm-hsusb.txt | 67 + drivers/usb/phy/phy-msm-usb.c | 108 + include

[PATCH v6 03/19] usb: phy: msm: Move global regulators variables to driver state

2014-04-22 Thread Ivan T. Ivanov
From: "Ivan T. Ivanov" Signed-off-by: Ivan T. Ivanov --- drivers/usb/phy/phy-msm-usb.c | 82 --- include/linux/usb/msm_hsusb.h | 3 ++ 2 files changed, 42 insertions(+), 43 deletions(-) diff --git a/drivers/usb/phy/phy-msm-usb.c b/drivers/u

[PATCH v6 09/19] usb: phy: msm: Remove HSUSB prefix from regulator names

2014-04-22 Thread Ivan T. Ivanov
From: "Ivan T. Ivanov" Prefix did not bring any useful information. Currently none of the MSM platforms define these regulators, so it is safe to rename them. Signed-off-by: Ivan T. Ivanov --- drivers/usb/phy/phy-msm-usb.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletion

[PATCH v6 06/19] usb: phy: msm: Fix checkpatch.pl warnings

2014-04-22 Thread Ivan T. Ivanov
From: "Ivan T. Ivanov" This fixes following: WARNING: quoted string split across lines WARNING: Prefer seq_puts to seq_printf Signed-off-by: Ivan T. Ivanov --- drivers/usb/phy/phy-msm-usb.c | 39 ++- 1 file changed, 14 insertions(+), 25 deletion

[PATCH v6 07/19] usb: phy: msm: Replace custom enum usb_mode_type with enum usb_dr_mode

2014-04-22 Thread Ivan T. Ivanov
From: "Ivan T. Ivanov" Use enum usb_dr_mode and drop default usb_dr_mode from platform data. USB DT bindings states: dr_mode: "...In case this attribute isn't passed via DT, USB DRD controllers should default to OTG...", so remove redundand field. Signed-off-by: Ivan T

[PATCH v6 08/19] usb: phy: msm: Remove unused pclk_src_name

2014-04-22 Thread Ivan T. Ivanov
From: "Ivan T. Ivanov" There are no references to 'pclk_src_name' in plaform code, so it is unused. Signed-off-by: Ivan T. Ivanov --- drivers/usb/phy/phy-msm-usb.c | 26 +- include/linux/usb/msm_hsusb.h | 5 - 2 files changed, 1 insertion(+), 3

[PATCH v3 2/3] usb: chipidea: msm: Add device tree support

2014-04-22 Thread Ivan T. Ivanov
From: "Ivan T. Ivanov" Allows controller to be specified via device tree. Pass PHY phandle specified in DT to core driver. Signed-off-by: Ivan T. Ivanov --- drivers/usb/chipidea/ci_hdrc_msm.c | 23 ++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git

[PATCH v3 3/3] usb: chipidea: msm: Initialize offset of the capability registers

2014-04-22 Thread Ivan T. Ivanov
From: "Ivan T. Ivanov" Since commit 62bb84e (usb: gadget: ci13xxx: convert to platform device) start address of the capability registers is not passed correctly to udc_probe(). Fix this. Signed-off-by: Ivan T. Ivanov --- drivers/usb/chipidea/ci_hdrc_msm.c | 1 + 1 file changed, 1

[PATCH v3 1/3] usb: chipidea: msm: Add device tree binding information

2014-04-22 Thread Ivan T. Ivanov
From: "Ivan T. Ivanov" Document device tree binding information as required by the Qualcomm USB controller. Signed-off-by: Ivan T. Ivanov --- Documentation/devicetree/bindings/usb/ci-hdrc-qcom.txt | 17 + 1 file changed, 17 insertions(+) create mode 100644 Doc

[PATCH v3 0/3] usb: chipidea: msm: Clean and fix glue layer driver

2014-04-22 Thread Ivan T. Ivanov
From: "Ivan T. Ivanov" This series intend to fix driver, which was broken for a while. It is used to create peripheral role device, which in coordination with phy-usb-msm driver could provide USB2.0 gadget support for Qualcomm targets. Changes since version 2. - Rename devicetree d

Re: [PATCH v6 03/19] usb: phy: msm: Move global regulators variables to driver state

2014-04-22 Thread Ivan T. Ivanov
On Tue, 2014-04-22 at 09:57 -0500, Felipe Balbi wrote: > On Tue, Apr 22, 2014 at 12:20:22PM +0300, Ivan T. Ivanov wrote: > > From: "Ivan T. Ivanov" > > #define ENOLOGENOCOMMIT > > return -ENOLOG; > #if SIMPLE_CHANGE #define ENOLOG

Re: [PATCH v3 1/3] usb: chipidea: msm: Add device tree binding information

2014-04-22 Thread Ivan T. Ivanov
On Tue, 2014-04-22 at 16:07 +0100, Srinivas Kandagatla wrote: > > On 22/04/14 10:43, Ivan T. Ivanov wrote: > > +- interrupts: interrupt-specifier for the controller interrupt. > > +- usb-phy: phandle for the PHY device > > +- dr_mode: Sould be "

Re: [PATCH v6 04/19] usb: phy: msm: Migrate to Managed Device Resource allocation

2014-04-22 Thread Ivan T. Ivanov
On Tue, 2014-04-22 at 16:07 +0100, Srinivas Kandagatla wrote: > > On 22/04/14 10:20, Ivan T. Ivanov wrote: > > From: "Ivan T. Ivanov" > > > > Move memory, regulators, clocks and irq allocation to > > devm_* variants. Properly check for valid clk handles. &

Re: [PATCH v6 01/19] usb: phy: msm: Make driver selectable on ARCH_QCOM

2014-04-22 Thread Ivan T. Ivanov
Hi, On Tue, 2014-04-22 at 09:57 -0500, Felipe Balbi wrote: > On Tue, Apr 22, 2014 at 12:20:20PM +0300, Ivan T. Ivanov wrote: > > From: "Ivan T. Ivanov" > > > > Controller could be found on APQ and MSM platforms, > > make configuration description more ge

Re: [PATCH v6 06/19] usb: phy: msm: Fix checkpatch.pl warnings

2014-04-22 Thread Ivan T. Ivanov
On Tue, 2014-04-22 at 16:30 +0100, Srinivas Kandagatla wrote: > > On 22/04/14 10:20, Ivan T. Ivanov wrote: > > @@ -79,8 +78,7 @@ static int msm_hsusb_init_vddcx(struct msm_otg *motg, int > > init) > > ret = regulator_se

Re: [PATCH v6 11/19] usb: phy: msm: Add device tree support and binding information

2014-04-23 Thread Ivan T. Ivanov
Hi Srini, On Tue, 2014-04-22 at 17:05 +0100, Srinivas Kandagatla wrote: > Hi Ivan, > > On 22/04/14 10:20, Ivan T. Ivanov wrote: > > From: "Ivan T. Ivanov" > > > > Allows MSM OTG controller to be specified via device tree. > > > > Signed-of

Re: [PATCH v6 01/19] usb: phy: msm: Make driver selectable on ARCH_QCOM

2014-04-23 Thread Ivan T. Ivanov
On Tue, 2014-04-22 at 10:24 -0500, Felipe Balbi wrote: > On Tue, Apr 22, 2014 at 06:16:35PM +0300, Ivan T. Ivanov wrote: > > > > Hi, > > > > On Tue, 2014-04-22 at 09:57 -0500, Felipe Balbi wrote: > > > On Tue, Apr 22, 2014 at 12:20:20PM +0300, Ivan T. Ivanov

[PATCH v4 2/3] usb: chipidea: msm: Add device tree support

2014-04-23 Thread Ivan T. Ivanov
From: "Ivan T. Ivanov" Allows controller to be specified via device tree. Pass PHY phandle specified in DT to core driver. Signed-off-by: Ivan T. Ivanov --- drivers/usb/chipidea/ci_hdrc_msm.c | 23 ++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git

[PATCH v4 3/3] usb: chipidea: msm: Initialize offset of the capability registers

2014-04-23 Thread Ivan T. Ivanov
From: "Ivan T. Ivanov" Since commit 62bb84e (usb: gadget: ci13xxx: convert to platform device) start address of the capability registers is not passed correctly to udc_probe(). Fix this. Signed-off-by: Ivan T. Ivanov --- drivers/usb/chipidea/ci_hdrc_msm.c | 1 + 1 file changed, 1

[PATCH v4 1/3] usb: chipidea: msm: Add device tree binding information

2014-04-23 Thread Ivan T. Ivanov
From: "Ivan T. Ivanov" Document device tree binding information as required by the Qualcomm USB controller. Signed-off-by: Ivan T. Ivanov --- Documentation/devicetree/bindings/usb/ci-hdrc-qcom.txt | 17 + 1 file changed, 17 insertions(+) create mode 100644 Doc

[PATCH v4 0/3] usb: chipidea: msm: Clean and fix glue layer driver

2014-04-23 Thread Ivan T. Ivanov
From: "Ivan T. Ivanov" This series intend to fix driver, which was broken for a while. It is used to create peripheral role device, which in coordination with phy-usb-msm driver could provide USB2.0 gadget support for Qualcomm targets. Changes since version 3. - Fix typo in

Re: [PATCH v6 15/19] usb: phy: msm: Fix PTS definitions for MSM USB controller

2014-04-23 Thread Ivan T. Ivanov
Hi, On Tue, 2014-04-22 at 17:09 +0400, Sergei Shtylyov wrote: > Hello. > > On 22-04-2014 13:20, Ivan T. Ivanov wrote: > > > From: Tim Bird > > > Fix the value used for Parallel Transceiver Select (PTS) for the MSM USB > > controller. This is a standard chipid

Re: [PATCH v6 15/19] usb: phy: msm: Fix PTS definitions for MSM USB controller

2014-04-23 Thread Ivan T. Ivanov
On Wed, 2014-04-23 at 16:24 +0300, Ivan T. Ivanov wrote: > > > --- a/include/linux/usb/msm_hsusb_hw.h > > > +++ b/include/linux/usb/msm_hsusb_hw.h > > > @@ -31,8 +31,9 @@ > > > #define USB_USBINTR (MSM_USB_BASE + 0x0148) > > > > >

Re: [PATCH v6 15/19] usb: phy: msm: Fix PTS definitions for MSM USB controller

2014-04-23 Thread Ivan T. Ivanov
On Wed, 2014-04-23 at 17:45 +0400, Sergei Shtylyov wrote: > Hello. > > On 23-04-2014 17:35, Ivan T. Ivanov wrote: > > >>>> --- a/include/linux/usb/msm_hsusb_hw.h > >>>> +++ b/include/linux/usb/msm_hsusb_hw.h > >>>> @@ -31,8 +31,9 @@ >

Re: [PATCH v6 15/19] usb: phy: msm: Fix PTS definitions for MSM USB controller

2014-04-23 Thread Ivan T. Ivanov
On Wed, 2014-04-23 at 18:09 +0400, Sergei Shtylyov wrote: > On 23-04-2014 17:53, Ivan T. Ivanov wrote: > > >>>>>> --- a/include/linux/usb/msm_hsusb_hw.h > >>>>>> +++ b/include/linux/usb/msm_hsusb_hw.h > >>>>>> @@ -31,8 +31,

Re: [PATCH v4 0/3] usb: chipidea: msm: Clean and fix glue layer driver

2014-04-24 Thread Ivan T. Ivanov
Hi Peter, On Thu, 2014-04-24 at 08:38 +0800, Peter Chen wrote: > On Wed, Apr 23, 2014 at 03:28:01PM +0300, Ivan T. Ivanov wrote: > > From: "Ivan T. Ivanov" > > > > This series intend to fix driver, which was broken for a while. > > It is used to cr

[PATCH v7 03/20] usb: phy: msm: Move global regulators variables to driver state

2014-04-24 Thread Ivan T. Ivanov
From: "Ivan T. Ivanov" Eliminating global variables allows driver to handle multiple device instances. Signed-off-by: Ivan T. Ivanov --- drivers/usb/phy/phy-msm-usb.c | 82 --- include/linux/usb/msm_hsusb.h | 3 ++ 2 files changed, 42 inserti

[PATCH v7 01/20] usb: phy: msm: Make driver selectable on ARCH_QCOM

2014-04-24 Thread Ivan T. Ivanov
From: "Ivan T. Ivanov" Controller could be found on APQ and MSM platforms, make configuration description more generic. Signed-off-by: Ivan T. Ivanov --- drivers/usb/phy/Kconfig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/usb/phy/Kconfig b/drive

[PATCH v7 19/20] usb: phy: msm: Vote for corner of VDD CX instead of voltage of VDD CX

2014-04-24 Thread Ivan T. Ivanov
From: "Ivan T. Ivanov" New platform uses RBCPR hardware feature, with that voting for absolute voltage of VDD CX is not required. Hence vote for corner of VDD CX which uses nominal corner voltage on VDD CX. Signed-off-by: Ivan T. Ivanov Cc: Mayank Rana --- .../devicetree/bindin

[PATCH v7 20/20] usb: phy: msm: Use usb_add_phy_dev() to register device

2014-04-24 Thread Ivan T. Ivanov
From: "Ivan T. Ivanov" They could be more than one USB2.0 PHY's on the platform. This will allow all of them to be registred successfuly. Signed-off-by: Ivan T. Ivanov --- drivers/usb/phy/phy-msm-usb.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/driv

[PATCH v7 04/20] usb: phy: msm: Enable deferred driver probing

2014-04-24 Thread Ivan T. Ivanov
From: "Ivan T. Ivanov" Using platform_driver_probe() prevent driver from requesting probe deferral. Fix this. Signed-off-by: Ivan T. Ivanov --- drivers/usb/phy/phy-msm-usb.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/usb/phy/phy-msm-usb.c b/drive

[PATCH v7 18/20] usb: phy: msm: Handle disconnect events

2014-04-24 Thread Ivan T. Ivanov
From: "Ivan T. Ivanov" Put the transceiver in non-driving mode. Otherwise host may not detect soft-disconnection. Signed-off-by: Ivan T. Ivanov Cc: Pavankumar Kondeti --- drivers/usb/phy/phy-msm-usb.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/drivers/u

[PATCH v7 13/20] usb: phy: msm: Use reset framework for LINK and PHY resets

2014-04-24 Thread Ivan T. Ivanov
From: "Ivan T. Ivanov" Using reset framework eliminate need of platform specific callbacks and enable reset lines to be specified in DT files. Signed-off-by: Ivan T. Ivanov --- drivers/usb/phy/phy-msm-usb.c | 29 + include/linux/usb/msm_hsusb.h | 3 ++

[PATCH v7 15/20] usb: phy: msm: Correct USB PHY Reset sequence for newer platform

2014-04-24 Thread Ivan T. Ivanov
From: "Ivan T. Ivanov" On few legacy platforms, USB PHY is having dedicated reset clk. It is used to reset USB PHY after putting USB PHY into low power mode and for calibration of USB PHY. Putting USB PHY into low power mode is causing ulpi read/write timeout as expected. USB PHY re

[PATCH v7 02/20] usb: phy: msm: Remove __init macro from driver probe method

2014-04-24 Thread Ivan T. Ivanov
From: "Ivan T. Ivanov" This fixes following: WARNING: drivers/usb/phy/built-in.o(.data+0x68): Section mismatch in reference from the variable msm_otg_driver to the function .init.text:msm_otg_probe() The variable msm_otg_driver references the function __init msm_otg_probe() Sig

[PATCH v7 17/20] usb: phy: msm: Select secondary PHY via TCSR

2014-04-24 Thread Ivan T. Ivanov
From: Tim Bird Select the secondary PHY using the TCSR register, if phy-num=1 in the DTS (or phy_number is set in the platform data). The SOC has 2 PHYs which can be used with the OTG port, and this code allows configuring the correct one. Note: This resolves the problem I was seeing where I co

[PATCH v7 16/20] usb: phy: msm: Fix PTS definitions for MSM USB controller

2014-04-24 Thread Ivan T. Ivanov
From: Tim Bird Fix the value used for Parallel Transceiver Select (PTS) for the MSM USB controller. This is a standard chipidea PORTSC definition, where a PHY_TYPE of 10b (<<30) is ULPI and 11b (<<30) is SERIAL. Fix the definitions and use them correctly in the driver code. Signed-off-by: Tim B

[PATCH v7 14/20] usb: phy: msm: Add support for secondary PHY control

2014-04-24 Thread Ivan T. Ivanov
From: "Ivan T. Ivanov" Allow support to use 2nd HSPHY with USB2 Core. Some platforms may have configuration to allow USB controller work with any of the two HSPHYs present. By default driver configures USB core to use primary HSPHY. Add support to allow user select 2nd HSPHY using DT

[PATCH v7 11/20] usb: phy: msm: Properly check result from platform_get_irq()

2014-04-24 Thread Ivan T. Ivanov
From: "Ivan T. Ivanov" Function return negative code on error. Signed-off-by: Ivan T. Ivanov --- drivers/usb/phy/phy-msm-usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/phy/phy-msm-usb.c b/drivers/usb/phy/phy-msm-usb.c index 5d64038..8a7a324 10

[PATCH v7 08/20] usb: phy: msm: Replace custom enum usb_mode_type with enum usb_dr_mode

2014-04-24 Thread Ivan T. Ivanov
From: "Ivan T. Ivanov" Use enum usb_dr_mode and drop default usb_dr_mode from platform data. USB DT bindings states: dr_mode: "...In case this attribute isn't passed via DT, USB DRD controllers should default to OTG...", so remove redundand field. Signed-off-by: Ivan T

[PATCH v7 09/20] usb: phy: msm: Remove unused pclk_src_name

2014-04-24 Thread Ivan T. Ivanov
From: "Ivan T. Ivanov" There are no references to 'pclk_src_name' in plaform code, so it is unused. Signed-off-by: Ivan T. Ivanov --- drivers/usb/phy/phy-msm-usb.c | 26 +- include/linux/usb/msm_hsusb.h | 5 - 2 files changed, 1 insertion(+), 3

[PATCH v7 12/20] usb: phy: msm: Add device tree support and binding information

2014-04-24 Thread Ivan T. Ivanov
From: "Ivan T. Ivanov" Allows controller to be specified via device tree. Signed-off-by: Ivan T. Ivanov --- .../devicetree/bindings/usb/msm-hsusb.txt | 67 drivers/usb/phy/phy-msm-usb.c | 113 + include/linux/usb/m

[PATCH v7 05/20] usb: phy: msm: Migrate to Managed Device Resource allocation

2014-04-24 Thread Ivan T. Ivanov
From: "Ivan T. Ivanov" Move memory, regulators, clocks and irq allocation to devm_* variants. Properly check for valid clk handles. Signed-off-by: Ivan T. Ivanov --- drivers/usb/phy/phy-msm-usb.c | 192 -- 1 file changed, 73 insertions(+), 119

[PATCH v7 00/20] usb: phy: msm: Fixes, cleanups and DT support

2014-04-24 Thread Ivan T. Ivanov
From: "Ivan T. Ivanov" Hi, This is a next version of patches posted earlier[1]. Hopefully comments from Felipe, Srinivas and Sergei have been addressed. Changes since v6 - New patch "Enable deferred driver probing" - Add log to patches wich did not have long descriptio

[PATCH v7 07/20] usb: phy: msm: Fix checkpatch.pl warnings

2014-04-24 Thread Ivan T. Ivanov
From: "Ivan T. Ivanov" This fixes following: WARNING: quoted string split across lines WARNING: Prefer seq_puts to seq_printf Signed-off-by: Ivan T. Ivanov --- drivers/usb/phy/phy-msm-usb.c | 39 ++- 1 file changed, 14 insertions(+), 25 deletion

[PATCH v7 10/20] usb: phy: msm: Remove HSUSB prefix from regulator names

2014-04-24 Thread Ivan T. Ivanov
From: "Ivan T. Ivanov" Prefix did not bring any useful information. Currently none of the MSM platforms define these regulators, so it is safe to rename them. Signed-off-by: Ivan T. Ivanov --- drivers/usb/phy/phy-msm-usb.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletion

[PATCH v7 06/20] usb: phy: msm: Remove unnecessarily check for valid regulators.

2014-04-24 Thread Ivan T. Ivanov
From: "Ivan T. Ivanov" Whether regulators are available or not is checked at driver probe. If they are not available driver will refuse to load, so no need to check them again. Signed-off-by: Ivan T. Ivanov --- drivers/usb/phy/phy-msm-usb.c | 10 -- 1 file changed, 10

Re: [PATCH v7 05/20] usb: phy: msm: Migrate to Managed Device Resource allocation

2014-04-28 Thread Ivan T. Ivanov
On Fri, 2014-04-25 at 15:53 -0500, Felipe Balbi wrote: > On Thu, Apr 24, 2014 at 01:49:38PM -0300, Fabio Estevam wrote: > > On Thu, Apr 24, 2014 at 12:48 PM, Ivan T. Ivanov wrote: > > > > > + motg->vddcx = devm_regulator_get(motg->phy.dev, "HSUSB_VDD

Re: [PATCH v7 20/20] usb: phy: msm: Use usb_add_phy_dev() to register device

2014-04-28 Thread Ivan T. Ivanov
On Fri, 2014-04-25 at 15:53 -0500, Felipe Balbi wrote: > On Thu, Apr 24, 2014 at 09:06:24PM +0400, Sergei Shtylyov wrote: > > Hello. > > > > On 04/24/2014 07:48 PM, Ivan T. Ivanov wrote: > > > > >From: "Ivan T. Ivanov" > > > >

[PATCH v8 03/20] usb: phy: msm: Move global regulators variables to driver state

2014-04-28 Thread Ivan T. Ivanov
From: "Ivan T. Ivanov" Eliminating global variables allows driver to handle multiple device instances. Signed-off-by: Ivan T. Ivanov --- drivers/usb/phy/phy-msm-usb.c | 82 --- include/linux/usb/msm_hsusb.h | 3 ++ 2 files changed, 42 inserti

[PATCH v8 19/20] usb: phy: msm: Vote for corner of VDD CX instead of voltage of VDD CX

2014-04-28 Thread Ivan T. Ivanov
From: "Ivan T. Ivanov" New platform uses RBCPR hardware feature, with that voting for absolute voltage of VDD CX is not required. Hence vote for corner of VDD CX which uses nominal corner voltage on VDD CX. Signed-off-by: Ivan T. Ivanov Cc: Mayank Rana --- .../devicetree/bindin

[PATCH v8 17/20] usb: phy: msm: Select secondary PHY via TCSR

2014-04-28 Thread Ivan T. Ivanov
From: Tim Bird Select the secondary PHY using the TCSR register, if phy-num=1 in the DTS (or phy_number is set in the platform data). The SOC has 2 PHYs which can be used with the OTG port, and this code allows configuring the correct one. Note: This resolves the problem I was seeing where I co

[PATCH v8 14/20] usb: phy: msm: Add support for secondary PHY control

2014-04-28 Thread Ivan T. Ivanov
From: "Ivan T. Ivanov" Allow support to use 2nd HSPHY with USB2 Core. Some platforms may have configuration to allow USB controller work with any of the two HSPHYs present. By default driver configures USB core to use primary HSPHY. Add support to allow user select 2nd HSPHY using DT

[PATCH v8 02/20] usb: phy: msm: Remove __init macro from driver probe method

2014-04-28 Thread Ivan T. Ivanov
From: "Ivan T. Ivanov" This fixes following: WARNING: drivers/usb/phy/built-in.o(.data+0x68): Section mismatch in reference from the variable msm_otg_driver to the function .init.text:msm_otg_probe() The variable msm_otg_driver references the function __init msm_otg_probe() Sig

[PATCH v8 20/20] usb: phy: msm: Use usb_add_phy_dev() to register device

2014-04-28 Thread Ivan T. Ivanov
From: "Ivan T. Ivanov" There could be more than one USB2.0 PHY's on the platform. This will allow all of them to be registered successfully. Signed-off-by: Ivan T. Ivanov --- drivers/usb/phy/phy-msm-usb.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/

[PATCH v8 18/20] usb: phy: msm: Handle disconnect events

2014-04-28 Thread Ivan T. Ivanov
From: "Ivan T. Ivanov" Put the transceiver in non-driving mode. Otherwise host may not detect soft-disconnection. Signed-off-by: Ivan T. Ivanov Cc: Pavankumar Kondeti --- drivers/usb/phy/phy-msm-usb.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/drivers/u

[PATCH v8 16/20] usb: phy: msm: Fix PTS definitions for MSM USB controller

2014-04-28 Thread Ivan T. Ivanov
From: Tim Bird Fix the value used for Parallel Transceiver Select (PTS) for the MSM USB controller. This is a standard chipidea PORTSC definition, where a PHY_TYPE of 10b (<<30) is ULPI and 11b (<<30) is SERIAL. Fix the definitions and use them correctly in the driver code. Signed-off-by: Tim B

[PATCH v8 09/20] usb: phy: msm: Remove unused pclk_src_name

2014-04-28 Thread Ivan T. Ivanov
From: "Ivan T. Ivanov" There are no references to 'pclk_src_name' in plaform code, so it is unused. Signed-off-by: Ivan T. Ivanov --- drivers/usb/phy/phy-msm-usb.c | 26 +- include/linux/usb/msm_hsusb.h | 5 - 2 files changed, 1 insertion(+), 3

[PATCH v8 07/20] usb: phy: msm: Fix checkpatch.pl warnings

2014-04-28 Thread Ivan T. Ivanov
From: "Ivan T. Ivanov" This fixes following: WARNING: quoted string split across lines WARNING: Prefer seq_puts to seq_printf Signed-off-by: Ivan T. Ivanov --- drivers/usb/phy/phy-msm-usb.c | 39 ++- 1 file changed, 14 insertions(+), 25 deletion

[PATCH v8 15/20] usb: phy: msm: Correct USB PHY Reset sequence for newer platform

2014-04-28 Thread Ivan T. Ivanov
From: "Ivan T. Ivanov" On few legacy platforms, USB PHY is having dedicated reset clk. It is used to reset USB PHY after putting USB PHY into low power mode and for calibration of USB PHY. Putting USB PHY into low power mode is causing ulpi read/write timeout as expected. USB PHY re

[PATCH v8 11/20] usb: phy: msm: Properly check result from platform_get_irq()

2014-04-28 Thread Ivan T. Ivanov
From: "Ivan T. Ivanov" Function return negative code on error. Signed-off-by: Ivan T. Ivanov --- drivers/usb/phy/phy-msm-usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/phy/phy-msm-usb.c b/drivers/usb/phy/phy-msm-usb.c index bd9e286..7e968aa 10

[PATCH v8 05/20] usb: phy: msm: Migrate to Managed Device Resource allocation

2014-04-28 Thread Ivan T. Ivanov
From: "Ivan T. Ivanov" Move memory, regulators, clocks and irq allocation to devm_* variants. Properly check for valid clk handles. Signed-off-by: Ivan T. Ivanov --- drivers/usb/phy/phy-msm-usb.c | 187 +++--- 1 file changed, 68 insertions(+), 119

[PATCH v8 06/20] usb: phy: msm: Remove unnecessarily check for valid regulators.

2014-04-28 Thread Ivan T. Ivanov
From: "Ivan T. Ivanov" Whether regulators are available or not is checked at driver probe. If they are not available driver will refuse to load, so no need to check them again. Signed-off-by: Ivan T. Ivanov --- drivers/usb/phy/phy-msm-usb.c | 10 -- 1 file changed, 10

[PATCH v8 04/20] usb: phy: msm: Enable deferred driver probing

2014-04-28 Thread Ivan T. Ivanov
From: "Ivan T. Ivanov" Using platform_driver_probe() prevent driver from requesting probe deferral. Fix this. Signed-off-by: Ivan T. Ivanov --- drivers/usb/phy/phy-msm-usb.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/usb/phy/phy-msm-usb.c b/drive

[PATCH v8 08/20] usb: phy: msm: Replace custom enum usb_mode_type with enum usb_dr_mode

2014-04-28 Thread Ivan T. Ivanov
From: "Ivan T. Ivanov" Use enum usb_dr_mode and drop default usb_dr_mode from platform data. USB DT bindings states: dr_mode: "...In case this attribute isn't passed via DT, USB DRD controllers should default to OTG...", so remove redundand field. Signed-off-by: Ivan T

[PATCH v8 01/20] usb: phy: msm: Make driver selectable on ARCH_QCOM

2014-04-28 Thread Ivan T. Ivanov
From: "Ivan T. Ivanov" Controller could be found on APQ and MSM platforms, make configuration description more generic. Signed-off-by: Ivan T. Ivanov --- drivers/usb/phy/Kconfig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/usb/phy/Kconfig b/drive

[PATCH v8 12/20] usb: phy: msm: Add device tree support and binding information

2014-04-28 Thread Ivan T. Ivanov
From: "Ivan T. Ivanov" Allows controller to be specified via device tree. Signed-off-by: Ivan T. Ivanov --- .../devicetree/bindings/usb/msm-hsusb.txt | 67 drivers/usb/phy/phy-msm-usb.c | 113 + include/linux/usb/m

[PATCH v8 13/20] usb: phy: msm: Use reset framework for LINK and PHY resets

2014-04-28 Thread Ivan T. Ivanov
From: "Ivan T. Ivanov" Using reset framework eliminate need of platform specific callbacks and enable reset lines to be specified in DT files. Signed-off-by: Ivan T. Ivanov --- drivers/usb/phy/phy-msm-usb.c | 29 + include/linux/usb/msm_hsusb.h | 3 ++

[PATCH v8 00/20] usb: phy: msm: Fixes, cleanups and DT support

2014-04-28 Thread Ivan T. Ivanov
From: "Ivan T. Ivanov" Hi, This is a new version of patches posted earlier[1]. Changes since v7 - Use bulk regulator request function in patch #05 - Fix errors in patch #20 commit message [1] http://www.spinics.net/lists/linux-arm-msm/msg08997.html Ivan T. Ivanov (18): usb

[PATCH v8 10/20] usb: phy: msm: Remove HSUSB prefix from regulator names

2014-04-28 Thread Ivan T. Ivanov
From: "Ivan T. Ivanov" Prefix did not bring any useful information. Currently none of the MSM platforms define these regulators, so it is safe to rename them. Signed-off-by: Ivan T. Ivanov --- drivers/usb/phy/phy-msm-usb.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletion

Re: [PATCH v4 0/3] usb: chipidea: msm: Clean and fix glue layer driver

2014-04-28 Thread Ivan T. Ivanov
On Fri, 2014-04-25 at 03:10 +, Peter Chen wrote: > > > > > On Thu, 2014-04-24 at 08:38 +0800, Peter Chen wrote: > > > On Wed, Apr 23, 2014 at 03:28:01PM +0300, Ivan T. Ivanov wrote: > > > > From: "Ivan T. Ivanov" > > > > > &

Re: [PATCH v8 02/20] usb: phy: msm: Remove __init macro from driver probe method

2014-04-28 Thread Ivan T. Ivanov
On Mon, 2014-04-28 at 12:03 -0500, Felipe Balbi wrote: > On Mon, Apr 28, 2014 at 09:00:43PM +0400, Sergei Shtylyov wrote: > > Hello. > > > > On 04/28/2014 05:34 PM, Ivan T. Ivanov wrote: > > > > >From: "Ivan T. Ivanov" > > > > >T

Re: [PATCH v8 02/20] usb: phy: msm: Remove __init macro from driver probe method

2014-04-28 Thread Ivan T. Ivanov
On Mon, 2014-04-28 at 12:54 -0500, Felipe Balbi wrote: > On Mon, Apr 28, 2014 at 08:52:48PM +0300, Ivan T. Ivanov wrote: > > On Mon, 2014-04-28 at 12:03 -0500, Felipe Balbi wrote: > > > On Mon, Apr 28, 2014 at 09:00:43PM +0400, Sergei Shtylyov wrote: > > > > Hello.

Re: [PATCH v4 0/3] usb: chipidea: msm: Clean and fix glue layer driver

2014-04-28 Thread Ivan T. Ivanov
On Tue, 2014-04-29 at 08:45 +0800, Peter Chen wrote: > > Applied, thanks Thank you, Ivan -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH v7 16/20] usb: phy: msm: Fix PTS definitions for MSM USB controller

2014-05-01 Thread Ivan T. Ivanov
On Wed, 2014-04-30 at 11:27 -0500, Felipe Balbi wrote: > On Thu, Apr 24, 2014 at 06:48:11PM +0300, Ivan T. Ivanov wrote: > > From: Tim Bird > > > > Fix the value used for Parallel Transceiver Select (PTS) for the MSM USB > > controller. This is a standard chipidea POR

Re: [PATCH v8 17/20] usb: phy: msm: Select secondary PHY via TCSR

2014-05-02 Thread Ivan T. Ivanov
On Mon, 2014-04-28 at 16:34 +0300, Ivan T. Ivanov wrote: > From: Tim Bird > > Select the secondary PHY using the TCSR register, if phy-num=1 > in the DTS (or phy_number is set in the platform data). The > SOC has 2 PHYs which can be used with the OTG port, and this > code allo

Re: [PATCH 1/3] usb: phy: msm: cast to unsigned long int

2014-05-02 Thread Ivan T. Ivanov
On Wed, 2014-04-30 at 11:38 -0500, Felipe Balbi wrote: > this solves the following build warning found when > running compile tests. > > drivers/usb/phy/phy-msm-usb.c: In function ‘msm_otg_read_dt’: > drivers/usb/phy/phy-msm-usb.c:1459:20: warning: cast from pointer \ > to integer of differe

Re: [PATCH 2/3] usb: phy: msm: switch over to writel()

2014-05-02 Thread Ivan T. Ivanov
On Wed, 2014-04-30 at 11:38 -0500, Felipe Balbi wrote: > Remove that single instance of writel_relaxed() > call which is only available on ARM architecture. > > This will let us build test this driver on all > different architectures. > > Signed-off-by: Felipe Balbi Review

Re: [PATCH 3/3] usb: phy: msm: enable build on other architectures

2014-05-03 Thread Ivan T. Ivanov
> Signed-off-by: Felipe Balbi Reviewed-by: Ivan T. Ivanov > --- > drivers/usb/phy/Kconfig | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/usb/phy/Kconfig b/drivers/usb/phy/Kconfig > index 0c668a3..fbbced8 100644 > --- a/drivers/usb/phy/

Re: [PATCH 5/8] usb: phy: msm: reset controller is mandatory now

2014-05-08 Thread Ivan T. Ivanov
reset_control_get(&pdev->dev, "link"); > ^ > > Signed-off-by: Arnd Bergmann > Cc: "Ivan T. Ivanov" > --- > drivers/usb/host/Kconfig | 2 +- > drivers/usb/phy/Kconfig | 1 + > 2 files changed, 2 insertions(+), 1 deletion(-) > > diff

Re: [PATCH 5/8] usb: phy: msm: reset controller is mandatory now

2014-05-08 Thread Ivan T. Ivanov
On Thu, 2014-05-08 at 16:27 +0200, Arnd Bergmann wrote: > On Thursday 08 May 2014 17:21:49 Ivan T. Ivanov wrote: > > > @@ -168,7 +168,7 @@ config USB_EHCI_HCD_AT91 > > > > > > config USB_EHCI_MSM > > > tristate "Support for Qualcomm QSD/MSM on-c

Re: [PATCH] usb: phy: msm: make it depend on RESET_CONTROLLER

2014-05-13 Thread Ivan T. Ivanov
On Tue, 2014-05-13 at 12:07 -0400, Alan Stern wrote: > On Tue, 13 May 2014, Bird, Tim wrote: > > > I don't think so. I haven't tested, but I believe the driver now relies > > on operational (not stub) resets. I think this comment is a bit off. > > I think it would be better to just say that the

Re: usb: phy: msm: Migrate to Managed Device Resource allocation

2014-05-14 Thread Ivan T. Ivanov
On Tue, 2014-05-13 at 23:20 +0300, Dan Carpenter wrote: > Hello Ivan T. Ivanov, > > The patch 6b99c68ec1f9: "usb: phy: msm: Migrate to Managed Device > Resource allocation" from Apr 28, 2014, leads to the following static > checker warning: > > dri

Re: [PATCH v2] usb: phy: msm: reset controller is mandatory now

2014-05-14 Thread Ivan T. Ivanov
l_get(&pdev->dev, "link"); > ^ > > Since the usb-ehci-msm driver currently selects the OTG driver, > we could still get a broken dependency here. To solve that, > this patch also removes the 'select', which turns out to be > unnecessary. > > Sig

Re: [patch v2] usb: phy: msm: change devm_ioremap() to devm_ioremap_resource()

2014-05-19 Thread Ivan T. Ivanov
On Wed, 2014-05-14 at 16:54 +0300, Dan Carpenter wrote: > There are several issues here: > 1) platform_get_resource() can return NULL and that wasn't handled. > 2) We should request the memory before we remap it, and >devm_ioremap_resource() does that. > 3) devm_ioremap() returns a NULL but we

<    1   2   3   4   >