public inbox for linux-next@vger.kernel.org 
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb•auug.org.au>
To: Felipe Balbi <balbi@kernel•org>, Greg KH <greg@kroah•com>
Cc: Linux Next Mailing List <linux-next@vger•kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger•kernel.org>,
	Heikki Krogerus <heikki.krogerus@linux•intel.com>,
	Hanjie Lin <hanjie.lin@amlogic•com>,
	Yue Wang <yue.wang@amlogic•com>
Subject: linux-next: manual merge of the usb-gadget tree with the usb tree
Date: Mon, 16 Mar 2020 14:23:09 +1100	[thread overview]
Message-ID: <20200316142309.19cb3aa8@canb.auug.org.au> (raw)

[-- Attachment #1: Type: text/plain, Size: 2701 bytes --]

Hi all,

Today's linux-next merge of the usb-gadget tree got a conflict in:

  drivers/usb/dwc3/dwc3-meson-g12a.c

between commit:

  bce3052f0c16 ("usb: roles: Provide the switch drivers handle to the switch in the API")

from the usb tree and commit:

  1e355f21d3fb ("usb: dwc3: Add Amlogic A1 DWC3 glue")

from the usb-gadget tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc drivers/usb/dwc3/dwc3-meson-g12a.c
index 3309ce90ca14,902553f39889..000000000000
--- a/drivers/usb/dwc3/dwc3-meson-g12a.c
+++ b/drivers/usb/dwc3/dwc3-meson-g12a.c
@@@ -381,6 -408,53 +409,54 @@@ static struct device *dwc3_meson_g12_fi
  	return &pdev->dev;
  }
  
+ static int dwc3_meson_g12a_otg_init(struct platform_device *pdev,
+ 				    struct dwc3_meson_g12a *priv)
+ {
+ 	enum phy_mode otg_id;
+ 	int ret, irq;
+ 	struct device *dev = &pdev->dev;
+ 
+ 	if (!priv->drvdata->otg_switch_supported)
+ 		return 0;
+ 
+ 	if (priv->otg_mode == USB_DR_MODE_OTG) {
+ 		/* Ack irq before registering */
+ 		regmap_update_bits(priv->regmap, USB_R5,
+ 				   USB_R5_ID_DIG_IRQ, 0);
+ 
+ 		irq = platform_get_irq(pdev, 0);
+ 		ret = devm_request_threaded_irq(&pdev->dev, irq, NULL,
+ 						dwc3_meson_g12a_irq_thread,
+ 						IRQF_ONESHOT, pdev->name, priv);
+ 		if (ret)
+ 			return ret;
+ 	}
+ 
+ 	/* Setup OTG mode corresponding to the ID pin */
+ 	if (priv->otg_mode == USB_DR_MODE_OTG) {
+ 		otg_id = dwc3_meson_g12a_get_id(priv);
+ 		if (otg_id != priv->otg_phy_mode) {
+ 			if (dwc3_meson_g12a_otg_mode_set(priv, otg_id))
+ 				dev_warn(dev, "Failed to switch OTG mode\n");
+ 		}
+ 	}
+ 
+ 	/* Setup role switcher */
+ 	priv->switch_desc.usb2_port = dwc3_meson_g12_find_child(dev,
+ 								"snps,dwc3");
+ 	priv->switch_desc.udc = dwc3_meson_g12_find_child(dev, "snps,dwc2");
+ 	priv->switch_desc.allow_userspace_control = true;
+ 	priv->switch_desc.set = dwc3_meson_g12a_role_set;
+ 	priv->switch_desc.get = dwc3_meson_g12a_role_get;
++	priv->switch_desc.driver_data = priv;
+ 
+ 	priv->role_switch = usb_role_switch_register(dev, &priv->switch_desc);
+ 	if (IS_ERR(priv->role_switch))
+ 		dev_warn(dev, "Unable to register Role Switch\n");
+ 
+ 	return 0;
+ }
+ 
  static int dwc3_meson_g12a_probe(struct platform_device *pdev)
  {
  	struct dwc3_meson_g12a	*priv;

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

             reply	other threads:[~2020-03-16  3:23 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-16  3:23 Stephen Rothwell [this message]
2020-03-16  7:25 ` linux-next: manual merge of the usb-gadget tree with the usb tree Greg KH
2020-03-16  8:18 ` Greg KH
  -- strict thread matches above, loose matches on Subject: below --
2020-05-21  7:21 Stephen Rothwell
2018-05-17  4:03 Stephen Rothwell
2018-05-17  7:07 ` Greg KH
2017-10-18 14:49 Mark Brown
     [not found] ` <20171018144912.qlc7vlnhdqmr5tdd-7j8lgAiuQgnQXOPxS62xeg@public.gmane.org>
2017-10-18 15:40   ` Kees Cook
2017-10-18 16:04     ` Mark Brown
2017-10-18 14:42 Mark Brown
2017-10-18 15:40 ` Kees Cook
2017-10-19  7:37   ` Felipe Balbi
2017-04-07  4:45 Stephen Rothwell
2017-04-07  4:41 Stephen Rothwell
2014-11-06  3:58 Stephen Rothwell
2014-11-06  4:59 ` Felipe Balbi
2014-04-28  5:20 Stephen Rothwell
2014-04-28 16:11 ` Felipe Balbi
2013-08-02  6:38 Stephen Rothwell
2013-08-02  7:23 ` Felipe Balbi
2013-04-04  4:18 Stephen Rothwell
2013-04-04  6:27 ` Thierry Reding
2013-04-04  7:08   ` Felipe Balbi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200316142309.19cb3aa8@canb.auug.org.au \
    --to=sfr@canb$(echo .)auug.org.au \
    --cc=balbi@kernel$(echo .)org \
    --cc=greg@kroah$(echo .)com \
    --cc=hanjie.lin@amlogic$(echo .)com \
    --cc=heikki.krogerus@linux$(echo .)intel.com \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linux-next@vger$(echo .)kernel.org \
    --cc=yue.wang@amlogic$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox