Linux-USB Archive on lore.kernel.org
 help / color / Atom feed
* [RFC PATCH v1 1/3] usb: phy: add usb mode for usb_phy
@ 2019-10-07 12:46 Igor Opaniuk
  2019-10-07 12:46 ` [RFC PATCH v1 2/3] usb: chipidea: set mode for usb phy driver Igor Opaniuk
  2019-10-07 12:46 ` [RFC PATCH v1 3/3] usb: phy: mxs: optimize disconnect line condition Igor Opaniuk
  0 siblings, 2 replies; 7+ messages in thread
From: Igor Opaniuk @ 2019-10-07 12:46 UTC (permalink / raw)
  To: linux-usb
  Cc: Marcel Ziswiler, Philippe Schenker, Stefan Agner,
	Max Krummenacher, Oleksandr Suvorov, Igor Opaniuk, Li Jun,
	Greg Kroah-Hartman, linux-kernel

From: Igor Opaniuk <igor.opaniuk@toradex.com>

USB phy driver may need to know the current working mode of
the controller, and can provide different settings according to
host mode or device mode.

Signed-off-by: Li Jun <jun.li@nxp.com>
Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
---

 include/linux/usb/phy.h | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/include/linux/usb/phy.h b/include/linux/usb/phy.h
index e4de6bc1f69b..774941be77d7 100644
--- a/include/linux/usb/phy.h
+++ b/include/linux/usb/phy.h
@@ -63,6 +63,13 @@ enum usb_otg_state {
 	OTG_STATE_A_VBUS_ERR,
 };
 
+/* The usb role of phy to be working with */
+enum usb_current_mode {
+	USB_MODE_NONE,
+	USB_MODE_HOST,
+	USB_MODE_DEVICE,
+};
+
 struct usb_phy;
 struct usb_otg;
 
@@ -155,6 +162,13 @@ struct usb_phy {
 	 * manually detect the charger type.
 	 */
 	enum usb_charger_type (*charger_detect)(struct usb_phy *x);
+
+	/*
+	 * Set current working mode of the USB controller
+	 * (device, host)
+	 */
+	int	(*set_mode)(struct usb_phy *x,
+			enum usb_current_mode mode);
 };
 
 /* for board-specific init logic */
@@ -213,6 +227,15 @@ usb_phy_vbus_off(struct usb_phy *x)
 	return x->set_vbus(x, false);
 }
 
+static inline int
+usb_phy_set_mode(struct usb_phy *x, enum usb_current_mode mode)
+{
+	if (!x || !x->set_mode)
+		return 0;
+
+	return x->set_mode(x, mode);
+}
+
 /* for usb host and peripheral controller drivers */
 #if IS_ENABLED(CONFIG_USB_PHY)
 extern struct usb_phy *usb_get_phy(enum usb_phy_type type);
-- 
2.17.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [RFC PATCH v1 2/3] usb: chipidea: set mode for usb phy driver
  2019-10-07 12:46 [RFC PATCH v1 1/3] usb: phy: add usb mode for usb_phy Igor Opaniuk
@ 2019-10-07 12:46 ` Igor Opaniuk
  2019-10-08  3:23   ` Peter Chen
  2019-10-07 12:46 ` [RFC PATCH v1 3/3] usb: phy: mxs: optimize disconnect line condition Igor Opaniuk
  1 sibling, 1 reply; 7+ messages in thread
From: Igor Opaniuk @ 2019-10-07 12:46 UTC (permalink / raw)
  To: linux-usb
  Cc: Marcel Ziswiler, Philippe Schenker, Stefan Agner,
	Max Krummenacher, Oleksandr Suvorov, Igor Opaniuk, Li Jun,
	Greg Kroah-Hartman, Peter Chen, linux-kernel

From: Igor Opaniuk <igor.opaniuk@toradex.com>

After enters one specific role, notify usb phy driver.

Signed-off-by: Li Jun <jun.li@nxp.com>
Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
---

 drivers/usb/chipidea/ci.h | 21 ++++++++++++++++++---
 1 file changed, 18 insertions(+), 3 deletions(-)

diff --git a/drivers/usb/chipidea/ci.h b/drivers/usb/chipidea/ci.h
index 6911aef500e9..a11d23910b12 100644
--- a/drivers/usb/chipidea/ci.h
+++ b/drivers/usb/chipidea/ci.h
@@ -275,9 +275,21 @@ static inline int ci_role_start(struct ci_hdrc *ci, enum ci_role role)
 		return -ENXIO;
 
 	ret = ci->roles[role]->start(ci);
-	if (!ret)
-		ci->role = role;
-	return ret;
+	if (ret)
+		return ret;
+
+	ci->role = role;
+
+	if (ci->usb_phy) {
+		if (role == CI_ROLE_HOST)
+			usb_phy_set_mode(ci->usb_phy,
+					USB_MODE_HOST);
+		else
+			usb_phy_set_mode(ci->usb_phy,
+					USB_MODE_DEVICE);
+	}
+
+	return 0;
 }
 
 static inline void ci_role_stop(struct ci_hdrc *ci)
@@ -290,6 +302,9 @@ static inline void ci_role_stop(struct ci_hdrc *ci)
 	ci->role = CI_ROLE_END;
 
 	ci->roles[role]->stop(ci);
+
+	if (ci->usb_phy)
+		usb_phy_set_mode(ci->usb_phy, USB_MODE_NONE);
 }
 
 static inline enum usb_role ci_role_to_usb_role(struct ci_hdrc *ci)
-- 
2.17.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [RFC PATCH v1 3/3] usb: phy: mxs: optimize disconnect line condition
  2019-10-07 12:46 [RFC PATCH v1 1/3] usb: phy: add usb mode for usb_phy Igor Opaniuk
  2019-10-07 12:46 ` [RFC PATCH v1 2/3] usb: chipidea: set mode for usb phy driver Igor Opaniuk
@ 2019-10-07 12:46 ` Igor Opaniuk
  2019-10-07 12:52   ` Fabio Estevam
  1 sibling, 1 reply; 7+ messages in thread
From: Igor Opaniuk @ 2019-10-07 12:46 UTC (permalink / raw)
  To: linux-usb
  Cc: Marcel Ziswiler, Philippe Schenker, Stefan Agner,
	Max Krummenacher, Oleksandr Suvorov, Igor Opaniuk, Li Jun,
	Fabio Estevam, Felipe Balbi, Greg Kroah-Hartman, NXP Linux Team,
	Pengutronix Kernel Team, Sascha Hauer, Shawn Guo,
	linux-arm-kernel, linux-kernel

From: Igor Opaniuk <igor.opaniuk@toradex.com>

We only have below cases to disconnect line when suspend:
1. Device mode without connection to any host/charger(no vbus).
2. Device mode connect to a charger, usb suspend when
system is entering suspend.

This patch can fix cases, when usb phy wrongly does disconnect
line in case usb host enters suspend but vbus is off.

Signed-off-by: Li Jun <jun.li@nxp.com>
Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
---

 drivers/usb/phy/phy-mxs-usb.c | 28 ++++++++++++++++------------
 1 file changed, 16 insertions(+), 12 deletions(-)

diff --git a/drivers/usb/phy/phy-mxs-usb.c b/drivers/usb/phy/phy-mxs-usb.c
index 70b8c8248caf..d996666e09e6 100644
--- a/drivers/usb/phy/phy-mxs-usb.c
+++ b/drivers/usb/phy/phy-mxs-usb.c
@@ -204,6 +204,7 @@ struct mxs_phy {
 	int port_id;
 	u32 tx_reg_set;
 	u32 tx_reg_mask;
+	enum usb_current_mode mode;
 };
 
 static inline bool is_imx6q_phy(struct mxs_phy *mxs_phy)
@@ -386,17 +387,6 @@ static void __mxs_phy_disconnect_line(struct mxs_phy *mxs_phy, bool disconnect)
 		usleep_range(500, 1000);
 }
 
-static bool mxs_phy_is_otg_host(struct mxs_phy *mxs_phy)
-{
-	void __iomem *base = mxs_phy->phy.io_priv;
-	u32 phyctrl = readl(base + HW_USBPHY_CTRL);
-
-	if (IS_ENABLED(CONFIG_USB_OTG) &&
-			!(phyctrl & BM_USBPHY_CTRL_OTG_ID_VALUE))
-		return true;
-
-	return false;
-}
 
 static void mxs_phy_disconnect_line(struct mxs_phy *mxs_phy, bool on)
 {
@@ -412,13 +402,26 @@ static void mxs_phy_disconnect_line(struct mxs_phy *mxs_phy, bool on)
 
 	vbus_is_on = mxs_phy_get_vbus_status(mxs_phy);
 
-	if (on && !vbus_is_on && !mxs_phy_is_otg_host(mxs_phy))
+	if (on && ((!vbus_is_on && mxs_phy->mode != USB_MODE_HOST)))
 		__mxs_phy_disconnect_line(mxs_phy, true);
 	else
 		__mxs_phy_disconnect_line(mxs_phy, false);
 
 }
 
+/*
+ * Set the usb current role for phy.
+ */
+static int mxs_phy_set_mode(struct usb_phy *phy,
+		enum usb_current_mode mode)
+{
+	struct mxs_phy *mxs_phy = to_mxs_phy(phy);
+
+	mxs_phy->mode = mode;
+
+	return 0;
+}
+
 static int mxs_phy_init(struct usb_phy *phy)
 {
 	int ret;
@@ -796,6 +799,7 @@ static int mxs_phy_probe(struct platform_device *pdev)
 	mxs_phy->phy.notify_disconnect	= mxs_phy_on_disconnect;
 	mxs_phy->phy.type		= USB_PHY_TYPE_USB2;
 	mxs_phy->phy.set_wakeup		= mxs_phy_set_wakeup;
+	mxs_phy->phy.set_mode		= mxs_phy_set_mode;
 	mxs_phy->phy.charger_detect	= mxs_phy_charger_detect;
 
 	mxs_phy->clk = clk;
-- 
2.17.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [RFC PATCH v1 3/3] usb: phy: mxs: optimize disconnect line condition
  2019-10-07 12:46 ` [RFC PATCH v1 3/3] usb: phy: mxs: optimize disconnect line condition Igor Opaniuk
@ 2019-10-07 12:52   ` Fabio Estevam
  2019-10-07 13:38     ` Igor Opaniuk
  0 siblings, 1 reply; 7+ messages in thread
From: Fabio Estevam @ 2019-10-07 12:52 UTC (permalink / raw)
  To: Igor Opaniuk
  Cc: USB list, Marcel Ziswiler, Philippe Schenker, Stefan Agner,
	Max Krummenacher, Oleksandr Suvorov, Igor Opaniuk, Li Jun,
	Felipe Balbi, Greg Kroah-Hartman, NXP Linux Team,
	Pengutronix Kernel Team, Sascha Hauer, Shawn Guo,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE,
	linux-kernel

Hi Igor,

On Mon, Oct 7, 2019 at 9:47 AM Igor Opaniuk <igor.opaniuk@gmail.com> wrote:
>
> From: Igor Opaniuk <igor.opaniuk@toradex.com>
>
> We only have below cases to disconnect line when suspend:
> 1. Device mode without connection to any host/charger(no vbus).
> 2. Device mode connect to a charger, usb suspend when
> system is entering suspend.
>
> This patch can fix cases, when usb phy wrongly does disconnect
> line in case usb host enters suspend but vbus is off.
>
> Signed-off-by: Li Jun <jun.li@nxp.com>
> Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>

Who is the original author of this patch, is it you or Li Jun?

If it is Li Jun, then his name should appear in the From field.

Also, it seems a Fixes tag is needed here.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [RFC PATCH v1 3/3] usb: phy: mxs: optimize disconnect line condition
  2019-10-07 12:52   ` Fabio Estevam
@ 2019-10-07 13:38     ` Igor Opaniuk
  0 siblings, 0 replies; 7+ messages in thread
From: Igor Opaniuk @ 2019-10-07 13:38 UTC (permalink / raw)
  To: Fabio Estevam
  Cc: USB list, Marcel Ziswiler, Philippe Schenker, Stefan Agner,
	Max Krummenacher, Oleksandr Suvorov, Igor Opaniuk, Li Jun,
	Felipe Balbi, Greg Kroah-Hartman, NXP Linux Team,
	Pengutronix Kernel Team, Sascha Hauer, Shawn Guo,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE,
	linux-kernel

HI Fabio,

On Mon, Oct 7, 2019 at 3:51 PM Fabio Estevam <festevam@gmail.com> wrote:
>
> Hi Igor,
>
> On Mon, Oct 7, 2019 at 9:47 AM Igor Opaniuk <igor.opaniuk@gmail.com> wrote:
> >
> > From: Igor Opaniuk <igor.opaniuk@toradex.com>
> >
> > We only have below cases to disconnect line when suspend:
> > 1. Device mode without connection to any host/charger(no vbus).
> > 2. Device mode connect to a charger, usb suspend when
> > system is entering suspend.
> >
> > This patch can fix cases, when usb phy wrongly does disconnect
> > line in case usb host enters suspend but vbus is off.
> >
> > Signed-off-by: Li Jun <jun.li@nxp.com>
> > Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
>
> Who is the original author of this patch, is it you or Li Jun?
>
> If it is Li Jun, then his name should appear in the From field.
right, it's Li Jun, will fix in v1.

>
> Also, it seems a Fixes tag is needed here.
right, will do.

-- 
Best regards - Freundliche Grüsse - Meilleures salutations

Igor Opaniuk

mailto: igor.opaniuk@gmail.com
skype: igor.opanyuk
+380 (93) 836 40 67
http://ua.linkedin.com/in/iopaniuk

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [RFC PATCH v1 2/3] usb: chipidea: set mode for usb phy driver
  2019-10-07 12:46 ` [RFC PATCH v1 2/3] usb: chipidea: set mode for usb phy driver Igor Opaniuk
@ 2019-10-08  3:23   ` Peter Chen
  2019-10-08  9:40     ` Igor Opaniuk
  0 siblings, 1 reply; 7+ messages in thread
From: Peter Chen @ 2019-10-08  3:23 UTC (permalink / raw)
  To: Igor Opaniuk
  Cc: linux-usb, Marcel Ziswiler, Philippe Schenker, Stefan Agner,
	Max Krummenacher, Oleksandr Suvorov, Igor Opaniuk, Jun Li,
	Greg Kroah-Hartman, linux-kernel

On 19-10-07 15:46:06, Igor Opaniuk wrote:
> From: Igor Opaniuk <igor.opaniuk@toradex.com>
> 
> After enters one specific role, notify usb phy driver.
> 
> Signed-off-by: Li Jun <jun.li@nxp.com>
> Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
> ---
> 
>  drivers/usb/chipidea/ci.h | 21 ++++++++++++++++++---
>  1 file changed, 18 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/usb/chipidea/ci.h b/drivers/usb/chipidea/ci.h
> index 6911aef500e9..a11d23910b12 100644
> --- a/drivers/usb/chipidea/ci.h
> +++ b/drivers/usb/chipidea/ci.h
> @@ -275,9 +275,21 @@ static inline int ci_role_start(struct ci_hdrc *ci, enum ci_role role)
>  		return -ENXIO;
>  
>  	ret = ci->roles[role]->start(ci);
> -	if (!ret)
> -		ci->role = role;
> -	return ret;
> +	if (ret)
> +		return ret;
> +
> +	ci->role = role;
> +
> +	if (ci->usb_phy) {
> +		if (role == CI_ROLE_HOST)
> +			usb_phy_set_mode(ci->usb_phy,
> +					USB_MODE_HOST);
> +		else
> +			usb_phy_set_mode(ci->usb_phy,
> +					USB_MODE_DEVICE);
> +	}
> +
> +	return 0;
>  }
>  
>  static inline void ci_role_stop(struct ci_hdrc *ci)
> @@ -290,6 +302,9 @@ static inline void ci_role_stop(struct ci_hdrc *ci)
>  	ci->role = CI_ROLE_END;
>  
>  	ci->roles[role]->stop(ci);
> +
> +	if (ci->usb_phy)
> +		usb_phy_set_mode(ci->usb_phy, USB_MODE_NONE);
>  }
>  
>  static inline enum usb_role ci_role_to_usb_role(struct ci_hdrc *ci)
> -- 

Hi Igor,

Thanks for doing that.

We just find this series patch will break ARM32 multi_v7_defconfig
build. You may need to fix it at next revision, see below.

  CC [M]  drivers/gpu/drm/nouveau/nvkm/subdev/fb/gm200.o
In file included from /home/b29397/work/projects/usb/drivers/phy/ti/phy-omap-usb2.c:20:0:
/home/b29397/work/projects/usb/include/linux/phy/omap_control_phy.h:36:2: error: redeclaration of enumerator ‘USB_MODE_HOST’
  USB_MODE_HOST,
  ^~~~~~~~~~~~~
In file included from /home/b29397/work/projects/usb/include/linux/usb/otg.h:14:0,
                 from /home/b29397/work/projects/usb/include/linux/phy/omap_usb.h:13,
                 from /home/b29397/work/projects/usb/drivers/phy/ti/phy-omap-usb2.c:14:
/home/b29397/work/projects/usb/include/linux/usb/phy.h:69:2: note: previous definition of ‘USB_MODE_HOST’ was here
  USB_MODE_HOST,
  ^~~~~~~~~~~~~
In file included from /home/b29397/work/projects/usb/drivers/phy/ti/phy-omap-usb2.c:20:0:
/home/b29397/work/projects/usb/include/linux/phy/omap_control_phy.h:37:2: error: redeclaration of enumerator ‘USB_MODE_DEVICE’
  USB_MODE_DEVICE,
  ^~~~~~~~~~~~~~~
In file included from /home/b29397/work/projects/usb/include/linux/usb/otg.h:14:0,
                 from /home/b29397/work/projects/usb/include/linux/phy/omap_usb.h:13,
                 from /home/b29397/work/projects/usb/drivers/phy/ti/phy-omap-usb2.c:14:
/home/b29397/work/projects/usb/include/linux/usb/phy.h:70:2: note: previous definition of ‘USB_MODE_DEVICE’ was here
  USB_MODE_DEVICE,
  ^~~~~~~~~~~~~~~
/home/b29397/work/projects/usb/scripts/Makefile.build:280: recipe for target 'drivers/phy/ti/phy-omap-usb2.o' failed
make[4]: *** [drivers/phy/ti/phy-omap-usb2.o] Error 1
make[4]: *** Waiting for unfinished jobs....
  CC      drivers/pinctrl/qcom/pinctrl-ssbi-gpio.o
  CC      drivers/regulator/bcm590xx-regulator.o
  CC      drivers/pinctrl/qcom/pinctrl-spmi-mpp.o
  CC      drivers/pinctrl/qcom/pinctrl-ssbi-mpp.o
  CC      drivers/rpmsg/imx_rpmsg.o
  CC [M]  drivers/rpmsg/rpmsg_core.o
  CC      drivers/regulator/da9210-regulator.o
  CC      drivers/gpu/drm/drm_crtc_helper.o
  CC      drivers/pinctrl/samsung/pinctrl-exynos.o
  CC      drivers/gpu/drm/drm_dp_helper.o
/home/b29397/work/projects/usb/scripts/Makefile.build:497: recipe for target 'drivers/phy/ti' failed
make[3]: *** [drivers/phy/ti] Error 2

-- 

Thanks,
Peter Chen

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [RFC PATCH v1 2/3] usb: chipidea: set mode for usb phy driver
  2019-10-08  3:23   ` Peter Chen
@ 2019-10-08  9:40     ` Igor Opaniuk
  0 siblings, 0 replies; 7+ messages in thread
From: Igor Opaniuk @ 2019-10-08  9:40 UTC (permalink / raw)
  To: Peter Chen
  Cc: linux-usb, Marcel Ziswiler, Philippe Schenker, Stefan Agner,
	Max Krummenacher, Oleksandr Suvorov, Igor Opaniuk, Jun Li,
	Greg Kroah-Hartman, linux-kernel

Hi Peter,

On Tue, Oct 8, 2019 at 6:23 AM Peter Chen <peter.chen@nxp.com> wrote:
>
> On 19-10-07 15:46:06, Igor Opaniuk wrote:
> > From: Igor Opaniuk <igor.opaniuk@toradex.com>
> >
> > After enters one specific role, notify usb phy driver.
> >
> > Signed-off-by: Li Jun <jun.li@nxp.com>
> > Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
> > ---
> >
> >  drivers/usb/chipidea/ci.h | 21 ++++++++++++++++++---
> >  1 file changed, 18 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/usb/chipidea/ci.h b/drivers/usb/chipidea/ci.h
> > index 6911aef500e9..a11d23910b12 100644
> > --- a/drivers/usb/chipidea/ci.h
> > +++ b/drivers/usb/chipidea/ci.h
> > @@ -275,9 +275,21 @@ static inline int ci_role_start(struct ci_hdrc *ci, enum ci_role role)
> >               return -ENXIO;
> >
> >       ret = ci->roles[role]->start(ci);
> > -     if (!ret)
> > -             ci->role = role;
> > -     return ret;
> > +     if (ret)
> > +             return ret;
> > +
> > +     ci->role = role;
> > +
> > +     if (ci->usb_phy) {
> > +             if (role == CI_ROLE_HOST)
> > +                     usb_phy_set_mode(ci->usb_phy,
> > +                                     USB_MODE_HOST);
> > +             else
> > +                     usb_phy_set_mode(ci->usb_phy,
> > +                                     USB_MODE_DEVICE);
> > +     }
> > +
> > +     return 0;
> >  }
> >
> >  static inline void ci_role_stop(struct ci_hdrc *ci)
> > @@ -290,6 +302,9 @@ static inline void ci_role_stop(struct ci_hdrc *ci)
> >       ci->role = CI_ROLE_END;
> >
> >       ci->roles[role]->stop(ci);
> > +
> > +     if (ci->usb_phy)
> > +             usb_phy_set_mode(ci->usb_phy, USB_MODE_NONE);
> >  }
> >
> >  static inline enum usb_role ci_role_to_usb_role(struct ci_hdrc *ci)
> > --
>
> Hi Igor,
>
> Thanks for doing that.
>
> We just find this series patch will break ARM32 multi_v7_defconfig
> build. You may need to fix it at next revision, see below.
>
>   CC [M]  drivers/gpu/drm/nouveau/nvkm/subdev/fb/gm200.o
> In file included from /home/b29397/work/projects/usb/drivers/phy/ti/phy-omap-usb2.c:20:0:
> /home/b29397/work/projects/usb/include/linux/phy/omap_control_phy.h:36:2: error: redeclaration of enumerator ‘USB_MODE_HOST’
>   USB_MODE_HOST,
>   ^~~~~~~~~~~~~
> In file included from /home/b29397/work/projects/usb/include/linux/usb/otg.h:14:0,
>                  from /home/b29397/work/projects/usb/include/linux/phy/omap_usb.h:13,
>                  from /home/b29397/work/projects/usb/drivers/phy/ti/phy-omap-usb2.c:14:
> /home/b29397/work/projects/usb/include/linux/usb/phy.h:69:2: note: previous definition of ‘USB_MODE_HOST’ was here
>   USB_MODE_HOST,
>   ^~~~~~~~~~~~~
> In file included from /home/b29397/work/projects/usb/drivers/phy/ti/phy-omap-usb2.c:20:0:
> /home/b29397/work/projects/usb/include/linux/phy/omap_control_phy.h:37:2: error: redeclaration of enumerator ‘USB_MODE_DEVICE’
>   USB_MODE_DEVICE,
>   ^~~~~~~~~~~~~~~
> In file included from /home/b29397/work/projects/usb/include/linux/usb/otg.h:14:0,
>                  from /home/b29397/work/projects/usb/include/linux/phy/omap_usb.h:13,
>                  from /home/b29397/work/projects/usb/drivers/phy/ti/phy-omap-usb2.c:14:
> /home/b29397/work/projects/usb/include/linux/usb/phy.h:70:2: note: previous definition of ‘USB_MODE_DEVICE’ was here
>   USB_MODE_DEVICE,
>   ^~~~~~~~~~~~~~~
> /home/b29397/work/projects/usb/scripts/Makefile.build:280: recipe for target 'drivers/phy/ti/phy-omap-usb2.o' failed
> make[4]: *** [drivers/phy/ti/phy-omap-usb2.o] Error 1
> make[4]: *** Waiting for unfinished jobs....
>   CC      drivers/pinctrl/qcom/pinctrl-ssbi-gpio.o
>   CC      drivers/regulator/bcm590xx-regulator.o
>   CC      drivers/pinctrl/qcom/pinctrl-spmi-mpp.o
>   CC      drivers/pinctrl/qcom/pinctrl-ssbi-mpp.o
>   CC      drivers/rpmsg/imx_rpmsg.o
>   CC [M]  drivers/rpmsg/rpmsg_core.o
>   CC      drivers/regulator/da9210-regulator.o
>   CC      drivers/gpu/drm/drm_crtc_helper.o
>   CC      drivers/pinctrl/samsung/pinctrl-exynos.o
>   CC      drivers/gpu/drm/drm_dp_helper.o
> /home/b29397/work/projects/usb/scripts/Makefile.build:497: recipe for target 'drivers/phy/ti' failed
> make[3]: *** [drivers/phy/ti] Error 2
>
> --
>
> Thanks,
> Peter Chen

Seems familiar to me, AFAIK we already fixed that in
our downstream kernel, will add the fix for v1.

Thanks!

--
Best regards - Freundliche Grüsse - Meilleures salutations

Igor Opaniuk

mailto: igor.opaniuk@gmail.com
skype: igor.opanyuk
+380 (93) 836 40 67
http://ua.linkedin.com/in/iopaniuk

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, back to index

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-07 12:46 [RFC PATCH v1 1/3] usb: phy: add usb mode for usb_phy Igor Opaniuk
2019-10-07 12:46 ` [RFC PATCH v1 2/3] usb: chipidea: set mode for usb phy driver Igor Opaniuk
2019-10-08  3:23   ` Peter Chen
2019-10-08  9:40     ` Igor Opaniuk
2019-10-07 12:46 ` [RFC PATCH v1 3/3] usb: phy: mxs: optimize disconnect line condition Igor Opaniuk
2019-10-07 12:52   ` Fabio Estevam
2019-10-07 13:38     ` Igor Opaniuk

Linux-USB Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-usb/0 linux-usb/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-usb linux-usb/ https://lore.kernel.org/linux-usb \
		linux-usb@vger.kernel.org
	public-inbox-index linux-usb

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-usb


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git