[PATCH v3 6/6] ARM: dts: imx6qdl-udoo.dtsi: fix onboard USB HUB property

2016-07-20 Thread Peter Chen
The current dts describes USB HUB's property at USB controller's entry, it is improper. The USB HUB should be the child node under USB controller, and power sequence properties are under it. Signed-off-by: Peter Chen --- arch/arm/boot/dts/imx6qdl-udoo.dtsi | 26 +--

[PATCH v3 5/6] usb: chipidea: let chipidea core device of_node equal's glue layer device of_node

2016-07-20 Thread Peter Chen
From: Peter Chen At device tree, we have no device node for chipidea core, the glue layer's node is the parent node for host and udc device. But in related driver, the parent device is chipidea core. So, in order to let the common driver get parent's node, we let the core's dev

[PATCH v3 4/6] usb: core: add power sequence handling for USB devices

2016-07-20 Thread Peter Chen
s root hub). At hub_disconnect, it will do power off sequence which is at powered on list. Signed-off-by: Peter Chen --- drivers/usb/core/Makefile | 1 + drivers/usb/core/hub.c| 12 -- drivers/usb/core/hub.h| 12 ++ drivers/usb/core/pwrs

[PATCH v3 3/6] binding-doc: usb: usb-device: add optional properties for power sequence

2016-07-20 Thread Peter Chen
Add optional properties for power sequence. Signed-off-by: Peter Chen --- Documentation/devicetree/bindings/usb/usb-device.txt | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/usb/usb-device.txt b/Documentation/devicetree/bindings

[PATCH v3 0/6] power: add power sequence library

2016-07-20 Thread Peter Chen
clock-names for properties at dt binding - Should use structure not but its pointer for kzalloc - Since chipidea core has no of_node, let core's of_node equals glue layer's at core's probe Peter Chen (6): binding-doc: power: pwrseq-generic: add binding doc for generic power sequenc

[PATCH v3 2/6] power: add power sequence library

2016-07-20 Thread Peter Chen
and clocks currently, and can cover regulator and pinctrl in future. The host driver calls pwrseq_alloc_generic to create an generic pwrseq instance. Signed-off-by: Peter Chen --- MAINTAINERS | 9 ++ drivers/power/Kconfig | 1 + drivers/power/Makefile

Re: [PATCH V2] leds: trigger: Introduce an USB port trigger

2016-07-17 Thread Peter Chen
On Mon, Jul 18, 2016 at 07:57:34AM +0200, Rafał Miłecki wrote: > On 18 July 2016 at 07:40, Peter Chen wrote: > > On Mon, Jul 18, 2016 at 06:44:49AM +0200, Rafał Miłecki wrote: > >> On 18 July 2016 at 04:31, Peter Chen wrote: > >> > On Fri, Jul 15, 2016 at 11:10:4

Re: [PATCH V2] leds: trigger: Introduce an USB port trigger

2016-07-17 Thread Peter Chen
On Mon, Jul 18, 2016 at 06:44:49AM +0200, Rafał Miłecki wrote: > On 18 July 2016 at 04:31, Peter Chen wrote: > > On Fri, Jul 15, 2016 at 11:10:45PM +0200, Rafał Miłecki wrote: > >> + > >> +usbport trigger: > >> +- usb-ports : List of USB ports that usbport sh

Re: [PATCH V2] leds: trigger: Introduce an USB port trigger

2016-07-17 Thread Peter Chen
This program is free software; you can redistribute it and/or modify > + * it under the terms of the GNU General Public License as published by > + * the Free Software Foundation; either version 2 of the License, or (at > + * your option) any later version. > + */ GPL v2 only. > +MODULE_AUTHOR("Rafał Miłecki "); > +MODULE_DESCRIPTION("USB port trigger"); > +MODULE_LICENSE("GPL"); GPL v2 After you fix above, feel free to add: Reviewed-by: Peter Chen -- Best Regards, Peter Chen

[PATCH v2 1/1] memory: emif: add missing of_node_put after calling of_parse_phandle

2016-07-17 Thread Peter Chen
of_node_put needs to be called when the device node which is got from of_parse_phandle has finished using. Signed-off-by: Peter Chen --- Changes for v2: - %s/of_put_node/of_node_put drivers/memory/emif.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/memory/emif.c b/drivers

[PATCH 1/1] memory: emif: add missing of_node_put after calling of_parse_phandle

2016-07-15 Thread Peter Chen
of_node_put needs to be called when the device node which is got from of_parse_phandle has finished using. Signed-off-by: Peter Chen --- drivers/memory/emif.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/memory/emif.c b/drivers/memory/emif.c index 04644e7..c5ec77d 100644 --- a

[PATCH 1/1] mfd: qcom_rpm: add missing of_node_put after calling of_parse_phandle

2016-07-15 Thread Peter Chen
of_node_put needs to be called when the device node which is got from of_parse_phandle has finished using. Cc: Bjorn Andersson Cc: Lee Jones Signed-off-by: Peter Chen --- drivers/mfd/qcom_rpm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/mfd/qcom_rpm.c b/drivers/mfd/qcom_rpm.c

Re: [PATCH v2 2/5] usb: DT binding documentation for qoriq usb 2.0 controller

2016-07-15 Thread Peter Chen
On Tue, Jul 12, 2016 at 03:59:14AM +, Rajesh Bhagat wrote: > > > > -Original Message- > > From: Peter Chen [mailto:hzpeterc...@gmail.com] > > Sent: Monday, July 11, 2016 12:19 PM > > To: Rajesh Bhagat > > Cc: linux-...@vger.kernel.org; linux

Re: [PATCH v2 1/5] drivers: usb: chipidea: Add qoriq platform driver

2016-07-15 Thread Peter Chen
> > We do have multiple clocks, but currently one is integrated in code. Hence > created > the APIs for future use. If you could not integrate one more clocks, I suggest not creating dedicated API until you need in future. -- Best Regards, Peter Chen

RE: [lkp] [usb] 9696ef14de: WARNING: CPU: 0 PID: 1 at lib/list_debug.c:36 __list_add+0x104/0x188

2016-07-12 Thread Peter Chen
>-Original Message- >From: lkp-requ...@eclists.intel.com [mailto:lkp-requ...@eclists.intel.com] On >Behalf >Of kernel test robot >Sent: Wednesday, July 13, 2016 9:28 AM >To: Peter Chen >Cc: 0day robot ; LKML ; >l...@01.org >Subject: [lkp] [usb] 9696ef14de

Re: [PATCH v2 18/22] usb: chipidea: msm: Add reset controller for PHY POR bit

2016-07-11 Thread Peter Chen
On Mon, Jul 11, 2016 at 03:07:24PM -0700, Stephen Boyd wrote: > On 10 July 2016 at 22:32, Peter Chen wrote: > > On Thu, Jul 07, 2016 at 03:21:09PM -0700, Stephen Boyd wrote: > >> @@ -40,11 +43,38 @@ struct ci_hdrc_msm { > >> struct clk *iface_clk; &g

Re: [PATCH v2 15/22] usb: chipidea: msm: Mux over secondary phy at the right time

2016-07-11 Thread Peter Chen
On Mon, Jul 11, 2016 at 03:03:37PM -0700, Stephen Boyd wrote: > On 10 July 2016 at 21:43, Peter Chen wrote: > > On Thu, Jul 07, 2016 at 03:21:06PM -0700, Stephen Boyd wrote: > >> diff --git a/drivers/usb/chipidea/ci_hdrc_msm.c > >> b/drivers/usb/chipidea/ci_hdrc_ms

Re: [PATCH v2 3/5] drivers: usb: phy: Add qoriq usb 2.0 phy driver support

2016-07-11 Thread Peter Chen
t; + * Freescale SoC USB 2.0 PHY driver > + * > + * Copyright 2016 Freescale Semiconductor, Inc. > + * Author: Rajesh Bhagat > + * > + * This program is free software; you can redistribute it and/or modify > + * it under the terms of the GNU General Public License version 2 as > + * published by the Free Software Foundation. > + * > + */ > +#ifndef _PHY_QORIQ_USB2_H > +#define _PHY_QORIQ_USB2_H > + > +#include > +#include > +#include > +#include > + > +#define ULPI_VIEWPORT 0x170 > + > +enum qoriq_usb2_phy_ver { > + QORIQ_PHY_LEGACY, > + QORIQ_PHY_NXP_ISP1508, > + QORIQ_PHY_UNKNOWN, > +}; > + > +struct qoriq_usb2_phy_ctx { > + struct phy *phy; > + struct clk *clk; > + struct device *dev; > + void __iomem *regs; > + struct usb_phy *ulpi_phy; > + enum usb_phy_interface phy_type; > + enum qoriq_usb2_phy_ver phy_version; > +}; > + > +#ifdef CONFIG_USB_ULPI_VIEWPORT > +static inline struct usb_phy *qoriq_otg_ulpi_create(unsigned int flags) > +{ > + return otg_ulpi_create(&ulpi_viewport_access_ops, flags); > +} > +#else > +static inline struct usb_phy *qoriq_otg_ulpi_create(unsigned int flags) > +{ > + return NULL; > +} > +#endif > + > +#endif > -- > 2.6.2.198.g614a2ac > > -- > 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 -- Best Regards, Peter Chen

Re: [PATCH v2 2/5] usb: DT binding documentation for qoriq usb 2.0 controller

2016-07-10 Thread Peter Chen
ames = "usb2-phy"; > + phys = <&usbphy0>; > + clock-names = "usb2-clock"; > + clocks = <&clockgen 4 3>; > + dr_mode = "host"; > + phy_type = "ulpi"; > +}; > -- > 2.6.2.198.g614a2ac > > -- > 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 -- Best Regards, Peter Chen

Re: [PATCH v2 1/5] drivers: usb: chipidea: Add qoriq platform driver

2016-07-10 Thread Peter Chen
define QORIQ_SOC_USB_ISIPHYCTRL 0x204 > +#define ISIPHYCTRL_PXE (1) > +#define ISIPHYCTRL_PHYE (1 << 4) > + > +#define QORIQ_SOC_USB_SNOOP1 0x400 /* NOTE: big-endian */ > +#define QORIQ_SOC_USB_SNOOP2 0x404 /* NOTE: big-endian */ > +#define QORIQ_SOC_USB_AGECNTTHRSH0x408 /* NOTE: big-endian */ > +#define AGECNTTHRSH_THRESHOLD0x40 > +#define QORIQ_SOC_USB_PRICTRL0x40c /* NOTE: big-endian */ > +#define PRICTRL_PRI_LVL 0xc > +#define QORIQ_SOC_USB_SICTRL 0x410 /* NOTE: big-endian */ > +#define SICTRL_RD_PREFETCH_32_BYTE (0x1) > +#define SICTRL_RD_PREFETCH_64_BYTE (0x0) > +#define QORIQ_SOC_USB_CTRL 0x500 /* NOTE: big-endian */ > +#define CTRL_UTMI_PHY_EN (1 << 9) > +#define CTRL_PHY_CLK_VALID (1 << 17) > +#define SNOOP_SIZE_2GB 0x1e > + > +/* control Register Bit Masks */ > +#define CONTROL_REGISTER_W1C_MASK 0x0002 /* W1C: PHY_CLK_VALID */ > +#define ULPI_INT_EN (1<<0) > +#define WU_INT_EN (1<<1) > +#define USB_CTRL_USB_EN (1<<2) > +#define LINE_STATE_FILTER__EN (1<<3) > +#define KEEP_OTG_ON (1<<4) > +#define OTG_PORT(1<<5) > +#define PLL_RESET (1<<8) > +#define UTMI_PHY_EN (1<<9) > +#define ULPI_PHY_CLK_SEL(1<<10) > +#define PHY_CLK_VALID(1<<17) > + Move necessary definitions to source file, and delete this header file please, this header file is only used by ci_hdrc_qoriq.c. -- Best Regards, Peter Chen

Re: [PATCH v2 19/22] usb: chipidea: msm: Handle phy power states

2016-07-10 Thread Peter Chen
on into the RESET event and the phy power off > into the STOPPED event. > > Cc: Peter Chen > Cc: Greg Kroah-Hartman > --- > drivers/usb/chipidea/ci_hdrc_msm.c | 40 > +++--- > drivers/usb/chipidea/core.c| 8 ++-- &

Re: [PATCH v2 20/22] usb: chipidea: msm: Be silent on probe defer errors

2016-07-10 Thread Peter Chen
On Thu, Jul 07, 2016 at 03:21:11PM -0700, Stephen Boyd wrote: > If something fails in ci_hdrc_add_device() due to probe defer, we > shouldn't print an error message. Be silent in this case as we'll > try probe again later. > > Cc: Peter Chen > Cc: Greg Kroah-Hartm

Re: [PATCH v2 18/22] usb: chipidea: msm: Add reset controller for PHY POR bit

2016-07-10 Thread Peter Chen
time during initialization. > > Cc: Peter Chen > Cc: Greg Kroah-Hartman > Signed-off-by: Stephen Boyd > --- > drivers/usb/chipidea/Kconfig | 1 + > drivers/usb/chipidea/ci_hdrc_msm.c | 45 > -- > 2 files changed, 44 insertions(+), 2

Re: [PATCH v2 17/22] usb: chipidea: msm: Make platform data driver local instead of global

2016-07-10 Thread Peter Chen
ce is an OTG type chipidea controller and > another is a host. Let's create a copy of this structure per each > device instance so that odd things don't happen. > > Cc: Peter Chen > Cc: Greg Kroah-Hartman > Signed-off-by: Stephen Boyd > --- > drivers/usb/chipide

Re: [PATCH v2 16/22] usb: chipidea: msm: Restore wrapper settings after reset

2016-07-10 Thread Peter Chen
phy and ehci-msm drivers writing into the > controller wrapper's MMIO address space. Let's consolidate the > register writes into the wrapper driver instead so that we > clearly split the wrapper from the phys. > > Cc: Peter Chen > Cc: Greg Kroah-Hartman > Signed-off

Re: [PATCH v2 15/22] usb: chipidea: msm: Mux over secondary phy at the right time

2016-07-10 Thread Peter Chen
o do this on reset too, because this > register is reset to the default value (primary phy) after the > RESET bit is set in USBCMD. > > Cc: Peter Chen > Cc: Greg Kroah-Hartman > Signed-off-by: Stephen Boyd > --- > drivers/usb/chipidea/ci_hdrc_msm.c | 67 > +

Re: [PATCH v2 14/22] usb: chipidea: msm: Add proper clk and reset support

2016-07-10 Thread Peter Chen
d > clks to be enabled to propagate resets. > > Cc: Peter Chen > Cc: Greg Kroah-Hartman > Signed-off-by: Stephen Boyd > --- > drivers/usb/chipidea/ci_hdrc_msm.c | 72 > +++--- > 1 file changed, 68 insertions(+), 4 deletions(-) > >

Re: [PATCH v2 12/22] usb: chipidea: msm: Rely on core to override AHBBURST

2016-07-10 Thread Peter Chen
a devices so setting the flag in the driver > works just as well. You may need to mention if the platform needs to set value rather than 0, it needs to "ahb-burst-config" at dts, others are ok. Acked-by: Peter Chen > > Cc: Peter Chen > Cc: Greg Kroah-Hartman > Signed-o

Re: [PATCH v2 11/22] usb: chipidea: msm: Mark device as runtime pm active

2016-07-10 Thread Peter Chen
en the glue layer has a power domain > associated with it, because runtime PM will go and disable the > power domain to match the 'inactive' state of the device. Let's > mark the device as active so that runtime PM doesn't improperly > power down this device when it&#

Re: [PATCH v2 10/22] usb: chipidea: Add support for ULPI PHY bus

2016-07-10 Thread Peter Chen
ort logic in each phy driver. > > Cc: Peter Chen > Cc: Greg Kroah-Hartman > Cc: Heikki Krogerus > Signed-off-by: Stephen Boyd > --- > drivers/usb/chipidea/Kconfig | 7 +++ > drivers/usb/chipidea/Makefile | 1 + > drivers/usb/chipidea/ci.h | 22

Re: [PATCH v2 09/22] usb: chipidea: Kick OTG state machine for AVVIS with vbus extcon

2016-07-10 Thread Peter Chen
propriate OTG fsm bits and kicking the state > machine again. > > Cc: Peter Chen > Cc: Greg Kroah-Hartman > Signed-off-by: Stephen Boyd > --- > > I think this was rejected last time around but I've kept it in the > series to continue discussion on how we're su

Re: [PATCH v2 08/22] usb: chipidea: Remove locking in ci_udc_start()

2016-07-08 Thread Peter Chen
gt; phy_init() from within the CI_HDRC_CONTROLLER_RESET_EVENT hook. > > Cc: Peter Chen > Cc: Greg Kroah-Hartman > Signed-off-by: Stephen Boyd > --- > drivers/usb/chipidea/udc.c | 3 --- > 1 file changed, 3 deletions(-) > > diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb

Re: [PATCH v2 07/22] usb: chipidea: Notify events when switching host mode

2016-07-08 Thread Peter Chen
host role after we toggle that bit. > > Similarly, the intent of the stopped event is to allow the > wrapper driver to do any wrapper specific things after the device > is stopped. So when we stop the host role, send the stopped > event. > > Cc: Peter Chen > Cc: Greg Kroah-H

Re: [PATCH v2 06/22] usb: chipidea: Add platform flag for wrapper phy management

2016-07-08 Thread Peter Chen
kip any phy power management in the > core layer, leaving it up to the glue driver to manage. > > Cc: Peter Chen > Cc: Greg Kroah-Hartman > Signed-off-by: Stephen Boyd > --- > drivers/usb/chipidea/core.c | 6 ++ > include/linux/usb/chipidea.h | 1 + > 2 files change

Re: [PATCH v2 04/22] usb: chipidea: Only read/write OTGSC from one place

2016-07-08 Thread Peter Chen
it_reg() function to the only place it's used and > simplify it for polling the OTGSC register. Then we can make > certain we only use the hw_read_otgsc() API to read OTGSC, which > will make sure we properly handle extcon events. > > Cc: Peter Chen > Cc: Greg Kroah-

Re: [PATCH v2 03/22] usb: ulpi: Support device discovery via device properties

2016-07-08 Thread Peter Chen
6(&ulpi->dev, "ulpi-vendor", > +&ulpi->id.vendor); > + ret |= device_property_read_u16(&ulpi->dev, "ulpi-product", > + &ulpi->id.product); > + if (ret) { > + ret = ulpi_read_id(ulpi); > + if (ret) > + return ret; > + } > + [...] > void ulpi_unregister_interface(struct ulpi *ulpi) > { > + of_node_put(ulpi->dev.of_node); [...] -- Best Regards, Peter Chen

Re: [PATCH 1/1] usb: core: of.c: fix defined but not declare warning

2016-07-07 Thread Peter Chen
On Wed, Jun 15, 2016 at 11:25:43AM +0800, Peter Chen wrote: > The helper usb_of_get_child_node is defined at of.c, but missing its > declare as a global function. Fix it by adding related header file > as well as compile it on conditional of CONFIG_OF. > > Cc: Greg Kroah-Hart

[PATCH 2/7] gpu: drm: sti_compositor: add missing of_node_put after calling of_parse_phandle

2016-07-04 Thread Peter Chen
of_node_put needs to be called when the device node which is got from of_parse_phandle has finished using. Cc: Benjamin Gaignard Cc: Vincent Abriou Signed-off-by: Peter Chen --- drivers/gpu/drm/sti/sti_compositor.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/sti

[PATCH 1/7] gpu: drm: rockchip_drm_drv: add missing of_node_put after calling of_parse_phandle

2016-07-04 Thread Peter Chen
of_node_put needs to be called when the device node which is got from of_parse_phandle has finished using. Cc: Mark Yao Cc: Heiko Stuebner Signed-off-by: Peter Chen --- drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/rockchip

[PATCH 4/7] gpu: drm: sti_hqvdp: add missing of_node_put after calling of_parse_phandle

2016-07-04 Thread Peter Chen
of_node_put needs to be called when the device node which is got from of_parse_phandle has finished using. Cc: Benjamin Gaignard Cc: Vincent Abriou Signed-off-by: Peter Chen --- drivers/gpu/drm/sti/sti_hqvdp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/sti/sti_hqvdp.c

[PATCH 6/7] gpu: drm: sun4i_drv: add missing of_node_put after calling of_parse_phandle

2016-07-04 Thread Peter Chen
of_node_put needs to be called when the device node which is got from of_parse_phandle has finished using. Cc: Maxime Ripard Cc: Chen-Yu Tsai Signed-off-by: Peter Chen --- drivers/gpu/drm/sun4i/sun4i_drv.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/sun4i/sun4i_drv.c

[PATCH 5/7] gpu: drm: sti_vtg: add missing of_node_put after calling of_parse_phandle

2016-07-04 Thread Peter Chen
of_node_put needs to be called when the device node which is got from of_parse_phandle has finished using. Cc: Benjamin Gaignard Cc: Vincent Abriou Signed-off-by: Peter Chen --- drivers/gpu/drm/sti/sti_vtg.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/sti/sti_vtg.c b

[PATCH 3/7] gpu: drm: sti_vdo: add missing of_node_put after calling of_parse_phandle

2016-07-04 Thread Peter Chen
of_node_put needs to be called when the device node which is got from of_parse_phandle has finished using. Cc: Benjamin Gaignard Cc: Vincent Abriou Signed-off-by: Peter Chen --- drivers/gpu/drm/sti/sti_dvo.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/sti/sti_dvo.c b

[PATCH 7/7] gpu: drm: vc4_hdmi: add missing of_node_put after calling of_parse_phandle

2016-07-04 Thread Peter Chen
of_node_put needs to be called when the device node which is got from of_parse_phandle has finished using. Cc: Eric Anholt Signed-off-by: Peter Chen --- drivers/gpu/drm/vc4/vc4_hdmi.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/vc4

[PATCH 0/7] gpu: drm: remaining missing of_node_put issue fixes

2016-07-04 Thread Peter Chen
Hi David, This is remaining missing of_node_put issue fix for gpu/drm drivers, the other fixes I sent yesterday. I think it may be easier for reviewing using patch set for similar issue, thanks. Peter Chen (7): gpu: drm: rockchip_drm_drv: add missing of_node_put after calling

RE: [PATCH 4/7] bus: arm-cci: add missing of_node_put after calling of_parse_phandle

2016-07-04 Thread Peter Chen
> >On Fri, Jul 01, 2016 at 11:29:58AM +0100, Suzuki K Poulose wrote: >> On 01/07/16 10:41, Peter Chen wrote: >> >of_node_put needs to be called when the device node which is got from >> >of_parse_phandle has finished using. >> > >> >Cc: Will Dea

[PATCH 1/1] gpu: drm: msm_drv: add missing of_node_put after calling of_parse_phandle

2016-07-04 Thread Peter Chen
of_node_put needs to be called when the device node which is got from of_parse_phandle has finished using. Signed-off-by: Peter Chen --- drivers/gpu/drm/msm/msm_drv.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c index 9c65409

[PATCH v2 1/1] gpu: drm: msm_drv: add missing of_node_put after calling of_parse_phandle

2016-07-04 Thread Peter Chen
of_node_put needs to be called when the device node which is got from of_parse_phandle has finished using. Signed-off-by: Peter Chen --- Changes for v2: - There are two missings in the code, handle it both in one patch drivers/gpu/drm/msm/msm_drv.c | 2 ++ 1 file changed, 2 insertions(+) diff

[PATCH 1/1] gpn: drm: fsl_tcon: add missing of_node_put after calling of_parse_phandle

2016-07-04 Thread Peter Chen
of_node_put needs to be called when the device node which is got from of_parse_phandle has finished using, but current code only calls it at error path, fix it by adding it at correct code path. Signed-off-by: Peter Chen --- drivers/gpu/drm/fsl-dcu/fsl_tcon.c | 1 + 1 file changed, 1 insertion

RE: [PATCH 2/7] arm: mach-shmobile: pm-rmobile: add missing of_node_put after calling of_parse_phandle

2016-07-04 Thread Peter Chen
>On Fri, Jul 1, 2016 at 11:41 AM, Peter Chen wrote: >> of_node_put needs to be called when the device node which is got from >> of_parse_phandle has finished using. >> >> Cc: Simon Horman >> Cc: Magnus Damm >> Signed-off-by: Peter Chen > >NAKe

[PATCH 1/1] gpu: drm: exynos_hdmi: add missing of_node_put after calling of_parse_phandle

2016-07-04 Thread Peter Chen
of_node_put needs to be called when the device node which is got from of_parse_phandle has finished using. Signed-off-by: Peter Chen --- drivers/gpu/drm/exynos/exynos_hdmi.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos

[PATCH 1/1] gpu: drm: arcpgu_drv: add missing of_node_put after calling of_parse_phandle

2016-07-04 Thread Peter Chen
of_node_put needs to be called when the device node which is got from of_parse_phandle has finished using. Signed-off-by: Peter Chen --- drivers/gpu/drm/arc/arcpgu_drv.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/arc/arcpgu_drv.c b/drivers/gpu/drm/arc/arcpgu_drv.c index

[PATCH 1/1] firmware: arm_scpi: add missing of_node_put after calling of_parse_phandle

2016-07-04 Thread Peter Chen
of_node_put needs to be called when the device node which is got from of_parse_phandle has finished using. Besides, of_address_to_resource always returns -EINVAL for error, delete the assignment for ret. Signed-off-by: Peter Chen --- drivers/firmware/arm_scpi.c | 5 +++-- 1 file changed, 3

[PATCH v2 1/1] devfreq: exynos-bus: add missing of_node_put after calling of_parse_phandle

2016-07-03 Thread Peter Chen
of_node_put needs to be called when the device node which is got from of_parse_phandle has finished using. Cc: Chanwoo Choi Cc: MyungJoo Ham Cc: Kyungmin Park Cc: Kukjin Kim Cc: Krzysztof Kozlowski Signed-off-by: Peter Chen --- Changes at v2: - It should define node as pointer, kbuild test

[PATCH 5/7] bus: vexpress-config: add missing of_node_put after calling of_parse_phandle

2016-07-01 Thread Peter Chen
of_node_put needs to be called when the device node which is got from of_parse_phandle has finished using. Cc: Liviu Dudau Cc: Sudeep Holla Cc: Lorenzo Pieralisi Signed-off-by: Peter Chen --- drivers/bus/vexpress-config.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/bus

[PATCH 0/7] add missing of_node_put after calling of_parse_phandle (1st)

2016-07-01 Thread Peter Chen
Hi all, of_node_put needs to be called when the device node which is got from of_parse_phandle has finished using, but there are many codes do not follow that, this patch set fixes some of them. Peter Chen (7): extcon: add missing of_node_put after calling of_parse_phandle arm: mach-shmobile

[PATCH 4/7] bus: arm-cci: add missing of_node_put after calling of_parse_phandle

2016-07-01 Thread Peter Chen
of_node_put needs to be called when the device node which is got from of_parse_phandle has finished using. Cc: Will Deacon Cc: Suzuki K Poulose Signed-off-by: Peter Chen --- drivers/bus/arm-cci.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/bus/arm-cci.c b

[PATCH 2/7] arm: mach-shmobile: pm-rmobile: add missing of_node_put after calling of_parse_phandle

2016-07-01 Thread Peter Chen
of_node_put needs to be called when the device node which is got from of_parse_phandle has finished using. Cc: Simon Horman Cc: Magnus Damm Signed-off-by: Peter Chen --- arch/arm/mach-shmobile/pm-rmobile.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/mach-shmobile/pm-rmobile.c

[PATCH 1/7] extcon: add missing of_node_put after calling of_parse_phandle

2016-07-01 Thread Peter Chen
of_node_put needs to be called when the device node which is got from of_parse_phandle has finished using. Cc: MyungJoo Ham Cc: Chanwoo Choi Signed-off-by: Peter Chen --- drivers/extcon/extcon.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/extcon/extcon.c b/drivers/extcon

[PATCH 6/7] devfreq: add missing of_node_put after calling of_parse_phandle

2016-07-01 Thread Peter Chen
of_node_put needs to be called when the device node which is got from of_parse_phandle has finished using. Cc: MyungJoo Ham Cc: Kyungmin Park Signed-off-by: Peter Chen --- drivers/devfreq/devfreq.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/devfreq/devfreq.c b/drivers

[PATCH 3/7] arm: mach-u300: regulator: add missing of_node_put after calling of_parse_phandle

2016-07-01 Thread Peter Chen
of_node_put needs to be called when the device node which is got from of_parse_phandle has finished using. Cc: Linus Walleij Signed-off-by: Peter Chen --- arch/arm/mach-u300/regulator.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/arch/arm/mach-u300

[PATCH 7/7] devfreq: exynos-bus: add missing of_node_put after calling of_parse_phandle

2016-07-01 Thread Peter Chen
of_node_put needs to be called when the device node which is got from of_parse_phandle has finished using. Cc: Chanwoo Choi Cc: MyungJoo Ham Cc: Kyungmin Park Cc: Kukjin Kim Cc: Krzysztof Kozlowski Signed-off-by: Peter Chen --- drivers/devfreq/exynos-bus.c | 9 ++--- 1 file changed, 6

Re: [PATCH 12/21] usb: chipidea: msm: Keep device runtime enabled

2016-06-30 Thread Peter Chen
On Thu, Jun 30, 2016 at 01:30:54PM -0700, Stephen Boyd wrote: > Quoting Peter Chen (2016-06-29 18:39:01) > > On Wed, Jun 29, 2016 at 05:43:30PM -0700, Stephen Boyd wrote: > > > Quoting Peter Chen (2016-06-28 23:46:00) > > > > On Sun, Jun 26, 2016 at 12:28:

Re: [PATCH] usb: otg-fsm: Cancel HNP polling work when not used

2016-06-30 Thread Peter Chen
On Wed, Jun 29, 2016 at 07:02:32PM -0700, Stephen Boyd wrote: > Quoting Peter Chen (2016-06-29 02:43:47) > > On Mon, Jun 27, 2016 at 06:18:27PM -0700, Stephen Boyd wrote: > > It introduces circular locking after applying it, otg_statemachine calls > > otg_leave_state, and

Re: [PATCH 17/21] usb: chipidea: msm: Make platform data driver local instead of global

2016-06-30 Thread Peter Chen
On Wed, Jun 29, 2016 at 12:17:12PM -0700, Stephen Boyd wrote: > Quoting Peter Chen (2016-06-29 04:29:25) > > On Sun, Jun 26, 2016 at 12:28:34AM -0700, Stephen Boyd wrote: > > > @@ -204,7 +201,7 @@ static int ci_hdrc_msm_probe(struct platform_device > > > *pdev) > &

Re: [PATCH 16/21] usb: chipidea: msm: Restore wrapper settings after reset

2016-06-30 Thread Peter Chen
On Wed, Jun 29, 2016 at 12:13:45PM -0700, Stephen Boyd wrote: > Quoting Peter Chen (2016-06-29 01:26:48) > > On Sun, Jun 26, 2016 at 12:28:33AM -0700, Stephen Boyd wrote: > > > When the RESET bit is set in the USBCMD register it resets quite > > > @@ -21,11 +23,22 @@ >

Re: [PATCH 15/21] usb: chipidea: msm: Mux over secondary phy at the right time

2016-06-29 Thread Peter Chen
On Wed, Jun 29, 2016 at 12:28:58PM -0700, Stephen Boyd wrote: > Quoting Peter Chen (2016-06-29 01:08:52) > > On Sun, Jun 26, 2016 at 12:28:32AM -0700, Stephen Boyd wrote: > > > We need to pick the correct phy at runtime based on how the SoC > > > has been wired onto the

Re: [PATCH 13/21] usb: chipidea: msm: Allow core to get usb phy

2016-06-29 Thread Peter Chen
On Wed, Jun 29, 2016 at 12:31:18PM -0700, Stephen Boyd wrote: > Quoting Peter Chen (2016-06-29 04:34:11) > > On Wed, Jun 29, 2016 at 02:48:11PM +0800, Peter Chen wrote: > > > On Sun, Jun 26, 2016 at 12:28:30AM -0700, Stephen Boyd wrote: > > > > @@

Re: [PATCH 12/21] usb: chipidea: msm: Keep device runtime enabled

2016-06-29 Thread Peter Chen
On Wed, Jun 29, 2016 at 05:43:30PM -0700, Stephen Boyd wrote: > Quoting Peter Chen (2016-06-28 23:46:00) > > On Sun, Jun 26, 2016 at 12:28:29AM -0700, Stephen Boyd wrote: > > > Sometimes the usb wrapper device is part of a power domain that > > > needs to stay on as l

Re: [PATCH 08/21] usb: chipidea: Kick OTG state machine for AVVIS with vbus extcon

2016-06-29 Thread Peter Chen
On Wed, Jun 29, 2016 at 06:19:59PM -0700, Stephen Boyd wrote: > Quoting Peter Chen (2016-06-28 20:09:13) > > On Sun, Jun 26, 2016 at 12:28:25AM -0700, Stephen Boyd wrote: > > > Force the OTG state machine to go forward when we're using an > > > extcon for v

Re: [PATCH 06/21] usb: chipidea: Initialize and reinitialize phy later

2016-06-29 Thread Peter Chen
On Wed, Jun 29, 2016 at 06:23:50PM -0700, Stephen Boyd wrote: > Quoting Peter Chen (2016-06-28 19:30:52) > > On Sun, Jun 26, 2016 at 12:28:23AM -0700, Stephen Boyd wrote: > > > The ULPI phy on qcom platforms needs to be initialized and > > > powered on after a USB res

Re: [PATCH 19/21] usb: chipidea: msm: Be silent on probe defer errors

2016-06-29 Thread Peter Chen
On Sun, Jun 26, 2016 at 12:28:36AM -0700, Stephen Boyd wrote: > If something fails in ci_hdrc_add_device() due to probe defer, we > shouldn't print an error message. Be silent in this case as we'll > try probe again later. > > Cc: Peter Chen > Cc: Greg Kroah-Hartm

Re: [PATCH 10/21] usb: chipidea: msm: Rely on core to override AHBBURST

2016-06-29 Thread Peter Chen
On Wed, Jun 29, 2016 at 11:59:21AM -0700, Stephen Boyd wrote: > Quoting Peter Chen (2016-06-28 23:32:11) > > On Sun, Jun 26, 2016 at 12:28:27AM -0700, Stephen Boyd wrote: > > > The core framework already handles setting this parameter with a > > > platform quirk. Add t

Re: [PATCH 18/21] usb: chipidea: msm: Add reset controller for PHY POR bit

2016-06-29 Thread Peter Chen
time during initialization. > > Cc: Peter Chen > Cc: Greg Kroah-Hartman > Signed-off-by: Stephen Boyd > --- > drivers/usb/chipidea/ci_hdrc_msm.c | 43 > +- > 1 file changed, 42 insertions(+), 1 deletion(-) > > diff --git a/drivers/u

Re: [PATCH 13/21] usb: chipidea: msm: Allow core to get usb phy

2016-06-29 Thread Peter Chen
On Wed, Jun 29, 2016 at 02:48:11PM +0800, Peter Chen wrote: > On Sun, Jun 26, 2016 at 12:28:30AM -0700, Stephen Boyd wrote: > > The chipidea core gets the usb phy and initializes the phy at the > > right point now so we don't need to get the phy in this driver. > >

Re: [PATCH 17/21] usb: chipidea: msm: Make platform data driver local instead of global

2016-06-29 Thread Peter Chen
ce is an OTG type chipidea controller and > another is a host. Let's create a copy of this structure per each > device instance so that odd things don't happen. > > Cc: Peter Chen > Cc: Greg Kroah-Hartman > Signed-off-by: Stephen Boyd > --- > drivers/usb/chipid

Re: [PATCH] usb: otg-fsm: Cancel HNP polling work when not used

2016-06-29 Thread Peter Chen
388 r7:0001 > > r6:806118dc r5:6153 [ 183.445175] r4: [ 183.447758] > > [<8016ff1c>] (lock_acquire) from [<80947c18>] > > (mutex_lock_nested+0x54/0x3ec) > > [ 183.455864] r7:bdb7bc00 r6:8174e47c r5:806118dc r4:0000 > > [ 183.461645] [<80947bc4>] (mutex_lock_nested) from [<806118dc>] > > (otg_statemachine+0x20/0x470) [ 183.470097] r10:0001 r9:bdbafeb0 > > r8:1388 r7:bd3ef000 > > r6:0009 r5:bdb701cc > > [ 183.478057] r4:bdb70120 > > [ 183.480641] [<806118bc>] (otg_statemachine) from [<80611df4>] > > (otg_hnp_polling_work+0xc8/0x1a4) > > [ 183.489354] r5:bdb70214 r4: > > [ 183.493006] [<80611d2c>] (otg_hnp_polling_work) from [<801403d4>] > > (process_one_work+0x194/0x418) [ 183.501805] r8: r7:be7c4400 > > r6:be7c0ec0 r5:bdb70214 > > r4:bdb2d600 > > [ 183.508650] [<80140240>] (process_one_work) from [<8014068c>] > > (worker_thread+0x34/0x4fc) > > [ 183.516754] r10:bdb2d600 r9:be7c0ec0 r8:80f02100 r7:be7c0ef4 > > r6:0008 r5:bdb2d618 > > [ 183.524712] r4:be7c0ec0 > > [ 183.527297] [<80140658>] (worker_thread) from [<80146d08>] > > (kthread+0xdc/0xf8) > > [ 183.534534] r10: r9: r8: r7:80140658 > > r6:bdb2d600 r5:bdb51000 > > [ 183.542492] r4: > > [ 183.545081] [<80146c2c>] (kthread) from [<80108ab0>] > > (ret_from_fork+0x14/0x24) > > [ 183.552317] r7: r6: r5:80146c2c r4:bdb51000 > > > > > > -- > > > > Best Regards, > > Peter Chen -- Best Regards, Peter Chen

Re: [PATCH] usb: otg-fsm: Cancel HNP polling work when not used

2016-06-29 Thread Peter Chen
09 r5:bdb701cc [ 183.478057] r4:bdb70120 [ 183.480641] [<806118bc>] (otg_statemachine) from [<80611df4>] (otg_hnp_polling_work+0xc8/0x1a4) [ 183.489354] r5:bdb70214 r4: [ 183.493006] [<80611d2c>] (otg_hnp_polling_work) from [<801403d4>] (process_one_work+0x194/0x418) [ 183.501805] r8: r7:be7c4400 r6:be7c0ec0 r5:bdb70214 r4:bdb2d600 [ 183.508650] [<80140240>] (process_one_work) from [<8014068c>] (worker_thread+0x34/0x4fc) [ 183.516754] r10:bdb2d600 r9:be7c0ec0 r8:80f02100 r7:be7c0ef4 r6:0008 r5:bdb2d618 [ 183.524712] r4:be7c0ec0 [ 183.527297] [<80140658>] (worker_thread) from [<80146d08>] (kthread+0xdc/0xf8) [ 183.534534] r10: r9: r8: r7:80140658 r6:bdb2d600 r5:bdb51000 [ 183.542492] r4: [ 183.545081] [<80146c2c>] (kthread) from [<80108ab0>] (ret_from_fork+0x14/0x24) [ 183.552317] r7: r6: r5:80146c2c r4:bdb51000 -- Best Regards, Peter Chen

Re: [PATCH 16/21] usb: chipidea: msm: Restore wrapper settings after reset

2016-06-29 Thread Peter Chen
phy and ehci-msm drivers writing into the > controller wrapper's MMIO address space. Let's consolidate the > register writes into the wrapper driver instead so that we > clearly split the wrapper from the phys. > > Cc: Peter Chen > Cc: Greg Kroah-Hartman > Signed-off

Re: [PATCH 15/21] usb: chipidea: msm: Mux over secondary phy at the right time

2016-06-29 Thread Peter Chen
o do this on reset too, because this > register is reset to the default value (primary phy) after the > RESET bit is set in USBCMD. > I am curious when you need the secondary phy? > Cc: Peter Chen > Cc: Greg Kroah-Hartman > Signed-off-by: Stephen Boyd > --- > dri

Re: [PATCH 14/21] usb: chipidea: msm: Add proper clk and reset support

2016-06-29 Thread Peter Chen
elf, so we > must turn it on here. > > Cc: Peter Chen > Cc: Greg Kroah-Hartman > Signed-off-by: Stephen Boyd > --- > drivers/usb/chipidea/ci_hdrc_msm.c | 58 > +++--- > 1 file changed, 54 insertions(+), 4 deletions(-) > >

Re: [PATCH 13/21] usb: chipidea: msm: Allow core to get usb phy

2016-06-28 Thread Peter Chen
On Sun, Jun 26, 2016 at 12:28:30AM -0700, Stephen Boyd wrote: > The chipidea core gets the usb phy and initializes the phy at the > right point now so we don't need to get the phy in this driver. > > Cc: Peter Chen > Cc: Greg Kroah-Hartman > Signed-off-by: Stephen Boy

Re: [PATCH 12/21] usb: chipidea: msm: Keep device runtime enabled

2016-06-28 Thread Peter Chen
onditionally, so I use one system flag CI_HDRC_SUPPORTS_RUNTIME_PM for it. I can't understand why you can't access device without enable parent's runtime pm, the controller will not enter runtime suspend without that flag. Peter > > Cc: Peter Chen > Cc: Greg Kroah-Hartma

Re: [PATCH 11/21] usb: chipidea: msm: Use hw_write_id_reg() instead of writel directly

2016-06-28 Thread Peter Chen
offset we're using and avoids needing to > include the msm_hsusb_hw.h file when we're going to delete that > file soon. > > Cc: Peter Chen > Cc: Greg Kroah-Hartman > Signed-off-by: Stephen Boyd > --- > drivers/usb/chipidea/ci_hdrc_msm.c | 6 ++ > 1 file

Re: [PATCH 10/21] usb: chipidea: msm: Rely on core to override AHBBURST

2016-06-28 Thread Peter Chen
a devices so setting the flag in the driver > works just as well. You still need to set AHB burst value at dts, this flag is just for override, see below: ahb-burst-config = <0x0>; > > Cc: Peter Chen > Cc: Greg Kroah-Hartman > Signed-off-by: Stephen Boyd > --- >

Re: [PATCH 09/21] usb: chipidea: Add support for ULPI PHY bus

2016-06-28 Thread Peter Chen
ort logic in each phy driver. > > Cc: Peter Chen > Cc: Greg Kroah-Hartman > Cc: Heikki Krogerus > Signed-off-by: Stephen Boyd > --- > drivers/usb/chipidea/Kconfig | 7 +++ > drivers/usb/chipidea/Makefile | 1 + > drivers/usb/chipidea/ci.h | 20

Re: [PATCH 08/21] usb: chipidea: Kick OTG state machine for AVVIS with vbus extcon

2016-06-28 Thread Peter Chen
able; adp-disable; status = "okay"; }; See Documentation/devicetree/bindings/usb/generic.txt. Peter > Cc: Peter Chen > Cc: Greg Kroah-Hartman > Signed-off-by: Stephen Boyd > --- > drivers/usb/chipidea/otg_fsm.c | 17 + > 1 file chang

Re: [PATCH 06/21] usb: chipidea: Initialize and reinitialize phy later

2016-06-28 Thread Peter Chen
you need to add one flag at ci_hdrc_platform_data.flags for your case to avoid normal initialization. Peter > Move > the phy initialization to a later point, and shut it down outside > of driver remove so that the phy state is properly managed across > role switches. > > Cc:

Re: [PATCH 02/21] usb: ulpi: Support device discovery via DT

2016-06-28 Thread Peter Chen
all that is I can drop requesting the module by DT > > aliases and things become simpler. I'll try this out. > > I was hoping that we could manage with product id 0 as an exception (I > failed to consider that you have multiple PHYs to deal with). I don't > think we can just come up with product id > 0. > > I guess we should have the of_driver_match_device() call after all. > Let's just call it conditionally, only in cases where there is no > product ID, to make me feel a bit more better. I don't want to make it > too easy to use. > > The properties for the vendor and product ID are still something that > we need to introduce in any case. We have the powered off problem on > all kinds of platforms, and not all of them use DT. I am thinking power sequence framework, how power sequence elements (eg, clock, reset-gpios) can get for non-DT platform? Does ACPI does power sequence for x86 platforms? -- Best Regards, Peter Chen

Re: [PATCH 05/21] usb: chipidea: Handle extcon events properly

2016-06-28 Thread Peter Chen
hose events in the hardware. Therefore, properly emulate this > register if we're using extcon, but don't enable the interrupts. > This allows me to get my cable connect/disconnect working > properly without getting spurious interrupts on my device that > uses an extcon for these

Re: [PATCH 04/21] usb: chipidea: Only read/write OTGSC from one place

2016-06-28 Thread Peter Chen
; + * This function returns an error code if timeout */ static int > > > +hw_wait_otgsc_bsv(struct ci_hdrc *ci) { > > > + unsigned long elapse = jiffies + msecs_to_jiffies(5000); > > > + u32 mask = OTGSC_BSV; > > > + > > > + while (!hw_read_otgsc(ci, mask)) { > > > > Reverse logic, should be: > > while (hw_read_otgsc(ci, mask)) { > > > > Good catch! Thanks. Besides above, please delete the declaration at ci.h. -- Best Regards, Peter Chen

Re: [PATCH v11 08/14] usb: otg: add OTG/dual-role core

2016-06-22 Thread Peter Chen
On Wed, Jun 22, 2016 at 09:56:22AM +0300, Felipe Balbi wrote: > > Hi, > > Peter Chen writes: > >> Peter Chen writes: > >> >> >> So far, I haven't seen anybody talking about real USB OTG (the spec) > >> >> >> when they say OT

Re: [PATCH v11 08/14] usb: otg: add OTG/dual-role core

2016-06-22 Thread Peter Chen
On Wed, Jun 22, 2016 at 09:51:19AM +0300, Felipe Balbi wrote: > > Hi, > > Peter Chen writes: > >> >> >> > So, unless we use OTG FSM defined in OTG spec, we should not > >> >> >> > mention > >> >> >> > "

Re: [PATCH v11 08/14] usb: otg: add OTG/dual-role core

2016-06-21 Thread Peter Chen
On Tue, Jun 21, 2016 at 05:47:47PM +0300, Felipe Balbi wrote: > > Hi, > > Peter Chen writes: > >> >> >> >> >>> + * @otg_dev: OTG controller device, if needs to be used with > >> >> >> >> >>> OTG core. > &

Re: [PATCH v11 08/14] usb: otg: add OTG/dual-role core

2016-06-21 Thread Peter Chen
On Tue, Jun 21, 2016 at 01:02:59PM +0300, Felipe Balbi wrote: > > Hi, > > Peter Chen writes: > >> >> So far, I haven't seen anybody talking about real USB OTG (the spec) > >> >> when they say OTG. Usually they just mean "a method for swappi

Re: [PATCH v11 08/14] usb: otg: add OTG/dual-role core

2016-06-21 Thread Peter Chen
On Tue, Jun 21, 2016 at 03:35:00PM +0300, Felipe Balbi wrote: > > Hi, > > Peter Chen writes: > >> >> >> >>> + * @otg_dev: OTG controller device, if needs to be used with > >> >> >> >>> OTG core. > >> &g

Re: [PATCH v11 08/14] usb: otg: add OTG/dual-role core

2016-06-21 Thread Peter Chen
On Tue, Jun 21, 2016 at 11:18:21AM +0300, Felipe Balbi wrote: > > Hi, > > Peter Chen writes: > >> Peter Chen writes: > >> >> >>> + > >> >> >>> + /* start host */ > >> >> >>> +

Re: [PATCH v11 08/14] usb: otg: add OTG/dual-role core

2016-06-21 Thread Peter Chen
comment. Semantics aside... > > > Consider the use case the host driver is at host/ and udc driver is > > at gadget/udc, how to finish to role swap? > > ... why does the source code placement matter? And what do you mean by > "finish role swap"? > Well, it depends on your driver design, do you want the host driver's API is still be called when current role is peripheral? One typical problem you can refer below: commit 11c011a5e777c83819078a18672543f04482b3ec Author: Srinivas Kandagatla Date: Thu May 19 11:12:56 2016 +0100 usb: echi-hcd: Add ehci_setup check before echi_shutdown In some cases, the USB code (gadget/hcd->start/stop) needs to be called during the role swap. For example, if you have mux driver, you may need to call usb_remove_hcd when ID from 0 to 1. Without Roger's framework, how can we do that? -- Best Regards, Peter Chen

Re: [PATCH v11 08/14] usb: otg: add OTG/dual-role core

2016-06-21 Thread Peter Chen
On Tue, Jun 21, 2016 at 10:19:32AM +0300, Felipe Balbi wrote: > > Hi, > > Peter Chen writes: > >> >>> + > >> >>> + /* start host */ > >> >>> + ret = hcd_ops->add(otg->primary_hcd

Re: [PATCH v11 08/14] usb: otg: add OTG/dual-role core

2016-06-20 Thread Peter Chen
swapping between XHCI and peripheral-only DWC3. > > frankly, I would NEVER talk about OTG when type-C comes into play. They > are two competing standards and, apparently, type-C is winning when it > comes to role-swapping. > In fact, OTG is mis-used by people. Currently, if the port is dual-role, It will be considered as an OTG port. You are right, if the connector is type-c, it will be called as "type-c port" by people :) -- Best Regards, Peter Chen

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