lkml.org 
[lkml]   [2017]   [Feb]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[PATCH 1/3 v3] usb: host: fotg2: add device tree probing

    Add device tree probing for fotg2-hcd driver
    This device in a dual role hcd/otg device and it's used on Gemini Soc.

    Currently all Gemini Soc based devices uses only the hcd part.

    v2:
    fix wrong name in MODULE_DEVICE_TABLE()

    v3:
    better commit message
    remove dma_coerce_mask_and_coherent() suggested by Arnd

    Acked-by: Linus Walleij <linus.walleij@linaro.org>
    Signed-off-by: Hans Ulli Kroll <ulli.kroll@googlemail.com>
    ---
    drivers/usb/host/fotg210-hcd.c | 10 ++++++++++
    1 file changed, 10 insertions(+)

    diff --git a/drivers/usb/host/fotg210-hcd.c
    b/drivers/usb/host/fotg210-hcd.c
    index 9d0b0518290a..ff6e4275fcf6 100644
    --- a/drivers/usb/host/fotg210-hcd.c
    +++ b/drivers/usb/host/fotg210-hcd.c
    @@ -23,6 +23,7 @@
    * Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    */
    #include <linux/module.h>
    +#include <linux/of.h>
    #include <linux/device.h>
    #include <linux/dmapool.h>
    #include <linux/kernel.h>
    @@ -5676,9 +5677,18 @@ static int fotg210_hcd_remove(struct
    platform_device *pdev)
    return 0;
    }

    +#ifdef CONFIG_OF
    +static const struct of_device_id fotg210_ehci_match[] = {
    + { .compatible = "faraday,fotg210-hcd" },
    + {},
    +};
    +MODULE_DEVICE_TABLE(of, fotg210_ehci_match);
    +#endif
    +
    static struct platform_driver fotg210_hcd_driver = {
    .driver = {
    .name = "fotg210-hcd",
    + .of_match_table = of_match_ptr(fotg210_ehci_match),
    },
    .probe = fotg210_hcd_probe,
    .remove = fotg210_hcd_remove,
    --
    2.11.0
    \
     
     \ /
      Last update: 2017-02-17 12:09    [W:2.331 / U:0.088 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site