All of lore.kernel.org
 help / color / mirror / Atom feed
From: Linus Walleij <linus.walleij@linaro.org>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Felipe Balbi <balbi@kernel.org>
Cc: linux-usb@vger.kernel.org,
	Linus Walleij <linus.walleij@linaro.org>,
	Robert Jarzmik <robert.jarzmik@free.fr>
Subject: [2/2] USB: gadget: pxa25x: Add DT probing
Date: Sun,  3 Feb 2019 00:59:08 +0100	[thread overview]
Message-ID: <20190202235908.30751-2-linus.walleij@linaro.org> (raw)

This makes it possible to instantiate the PXA25x UDC
driver from the device tree.

Cc: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 drivers/usb/gadget/udc/pxa25x_udc.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/drivers/usb/gadget/udc/pxa25x_udc.c b/drivers/usb/gadget/udc/pxa25x_udc.c
index d4be53559f2e..480828b76059 100644
--- a/drivers/usb/gadget/udc/pxa25x_udc.c
+++ b/drivers/usb/gadget/udc/pxa25x_udc.c
@@ -2529,6 +2529,16 @@ static int pxa25x_udc_resume(struct platform_device *dev)
 
 /*-------------------------------------------------------------------------*/
 
+static const struct of_device_id udc_of_match[] = {
+	{
+		.compatible = "intel,ixp4xx-udc",
+	},
+	{
+		.compatible = "marvell,pxa25x-udc",
+	},
+	{},
+};
+
 static struct platform_driver udc_driver = {
 	.shutdown	= pxa25x_udc_shutdown,
 	.probe		= pxa25x_udc_probe,
@@ -2537,6 +2547,7 @@ static struct platform_driver udc_driver = {
 	.resume		= pxa25x_udc_resume,
 	.driver		= {
 		.name	= "pxa25x-udc",
+		.of_match_table = of_match_ptr(udc_of_match),
 	},
 };
 

             reply	other threads:[~2019-02-02 23:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-02 23:59 Linus Walleij [this message]
2019-02-06 21:31 [2/2] USB: gadget: pxa25x: Add DT probing Robert Jarzmik

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=20190202235908.30751-2-linus.walleij@linaro.org \
    --to=linus.walleij@linaro.org \
    --cc=balbi@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=robert.jarzmik@free.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.