Re: [PATCH v2 1/2] usb: of: add functions to bind a companion controller

2017-02-27 Thread Peter Chen
t of_usb_update_otg_caps(struct > device_node *np, > { > return NULL; > } > +static inline struct device *usb_of_get_companion_dev(struct device *dev) > +{ > + return NULL; > +} > #endif > > #if IS_ENABLED(CONFIG_OF) && IS_ENABLED(CONFIG_USB_SUPPORT) Acked-by: Peter Chen <peter.c...@nxp.com> -- Best Regards, Peter Chen

Re: [PATCH v2 2/2] usb: host: ehci-platform: fix usb 1.1 device is not connected in system resume

2017-02-27 Thread Peter Chen
device *dev) > return err; > } > > + companion_dev = usb_of_get_companion_dev(hcd->self.controller); > + if (companion_dev) > + device_pm_wait_for_dev(hcd->self.controller, companion_dev); > + > ehci_resume(hcd, priv->reset_on_resume); > return 0; Reviewed-by: Peter Chen <peter.c...@nxp.com> -- Best Regards, Peter Chen

Re: [PATCH/RFC 2/2] usb: host: ehci-platform: fix usb 1.1 device is not connected in system resume

2017-02-21 Thread Peter Chen
b_of_get_companion_dev(hcd->self.controller); Maybe other EHCI controller has companion controller too, so it is ok for you to let it as a common API. > + if (companion_dev) > + device_pm_wait_for_dev(hcd->self.controller, companion_dev); > + > ehci_resume(hcd, priv->reset_on_resume); > return 0; > } You can send formal patch next time. -- Best Regards, Peter Chen

Re: [PATCH 05/12] usb: chipdata: Replace the extcon API

2016-12-01 Thread Peter Chen
FINE_IDA(ci_ida); > > struct platform_device *ci_hdrc_add_device(struct device *dev, > @@ -1053,7 +1037,6 @@ static int ci_hdrc_probe(struct platform_device *pdev) > if (!ret) > return 0; > > - ci_extcon_unregister(ci); > stop: > ci_role_destroy(ci); > deinit_phy: > @@ -1073,7 +1056,6 @@ static int ci_hdrc_remove(struct platform_device *pdev) > } > > dbg_remove_files(ci); > - ci_extcon_unregister(ci); > ci_role_destroy(ci); > ci_hdrc_enter_lpm(ci, true); > ci_usb_phy_exit(ci); > -- Acked-by: Peter Chen <peter.c...@nxp.com> -- Best Regards, Peter Chen

Re: [PATCH v4] phy: rcar-gen3-usb2: add sysfs for usb role swap

2016-11-08 Thread Peter Chen
eck_id(ch); > + is_host = rcar_gen3_is_host(ch); > + if (!strncmp(buf, "host", strlen("host"))) > + new_mode_is_host = true; > + else if (!strncmp(buf, "peripheral", strlen("peripheral"))) > + new_mode_is_host = false; > + else

Re: [PATCH v3] phy: rcar-gen3-usb2: add sysfs for usb role swap

2016-11-08 Thread Peter Chen
rent and new mode is the same, this returns the error */ > + if (is_host == new_mode_is_host) > + return -EINVAL; > + > + if (new_mode_is_host) { > + if (!is_b_device && !is_host) /* A-Peripheral */ > + rcar_gen3_init_from_a_peri_to_a_host(ch); > + if (is_b_device && !is_host)/* B-Peripheral */ > + rcar_gen3_init_for_b_host(ch); is_host must be false here > + } else { > + if (!is_b_device && is_host)/* A-Host */ > + rcar_gen3_init_for_a_peri(ch); > + if (is_b_device && is_host) /* B-Host */ > + rcar_gen3_init_for_peri(ch); is_host must be true here > + } > + > + return count; > +} > + How can you handle the case which ID pin is incorrect, eg, ID is 0, but it is peripheral mode at the initialization? -- Best Regards, Peter Chen

Re: [PATCH v2] phy: rcar-gen3-usb2: add sysfs for usb role swap

2016-11-01 Thread Peter Chen
ice_create_file(dev, _attr_otg_inputs); > + if (ret < 0) > + return ret; > + } > > return PTR_ERR_OR_ZERO(provider); > } > > +static int rcar_gen3_phy_usb2_remove(struct platform_device *pdev) > +{ > + struct rcar_gen3_chan *channel = platform_get_drvdata(pdev); > + > + if (channel->has_otg) > + device_remove_file(>dev, _attr_otg_inputs); > + > + return 0; > +}; > + > static struct platform_driver rcar_gen3_phy_usb2_driver = { > .driver = { > .name = "phy_rcar_gen3_usb2", > .of_match_table = rcar_gen3_phy_usb2_match_table, > }, > .probe = rcar_gen3_phy_usb2_probe, > + .remove = rcar_gen3_phy_usb2_remove, > }; > module_platform_driver(rcar_gen3_phy_usb2_driver); > > -- > 1.9.1 > > -- > 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 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 Deaco

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 <peter.c...@nxp.com> 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 <ho...@verge.net.au> >> Cc: Magnus Damm &l

[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 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 <liviu.du...@arm.com> Cc: Sudeep Holla <sudeep.ho...@arm.com> Cc: Lorenzo Pieralisi <lorenzo.pieral...@arm.com> Signed-off-by: Peter Chen <peter.c...@

[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 <will.dea...@arm.com> Cc: Suzuki K Poulose <suzuki.poul...@arm.com> Signed-off-by: Peter Chen <peter.c...@nxp.com> --- drivers/bus/arm-cci.c | 5 -

[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 <ho...@verge.net.au> Cc: Magnus Damm <magnus.d...@gmail.com> Signed-off-by: Peter Chen <peter.c...@nxp.com> --- arch/arm/mach-shmobile/pm-rmobile.c | 1 +

[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 <myungjoo@samsung.com> Cc: Chanwoo Choi <cw00.c...@samsung.com> Signed-off-by: Peter Chen <peter.c...@nxp.com> --- drivers/extcon/extcon.c | 2 ++

[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 <myungjoo@samsung.com> Cc: Kyungmin Park <kyungmin.p...@samsung.com> Signed-off-by: Peter Chen <peter.c...@nxp.com> --- drivers/devfreq/devfreq.c | 2

[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 <linus.wall...@linaro.org> Signed-off-by: Peter Chen <peter.c...@nxp.com> --- arch/arm/mach-u300/regulator.c | 12 +--- 1 file changed, 9 inse

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

2016-07-01 Thread Peter Chen
Cc: Krzysztof Kozlowski <k.kozlow...@samsung.com> Signed-off-by: Peter Chen <peter.c...@nxp.com> --- drivers/devfreq/exynos-bus.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/devfreq/exynos-bus.c b/drivers/devfreq/exynos-bus.c index 2363d0a..