0015-usb-host-fotg2-add-device-tree-probing.patch 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. From 8f45c69ba80a993a6dba2397825b27e11fa9dea7 Mon Sep 17 00:00:00 2001
  2. From: Hans Ulli Kroll <[email protected]>
  3. Date: Thu, 9 Feb 2017 15:20:49 +0100
  4. Subject: [PATCH 15/18] usb: host: fotg2: add device tree probing
  5. Add device tree probing to the fotg2 driver.
  6. Signed-off-by: Hans Ulli Kroll <[email protected]>
  7. [Drop DMA mask coercion, drivers/of/platform.c does the job]
  8. Signed-off-by: Linus Walleij <[email protected]>
  9. ---
  10. drivers/usb/host/fotg210-hcd.c | 10 ++++++++++
  11. 1 file changed, 10 insertions(+)
  12. diff --git a/drivers/usb/host/fotg210-hcd.c b/drivers/usb/host/fotg210-hcd.c
  13. index 058ff82ea789..6e4b40cd5916 100644
  14. --- a/drivers/usb/host/fotg210-hcd.c
  15. +++ b/drivers/usb/host/fotg210-hcd.c
  16. @@ -10,6 +10,7 @@
  17. * Most of code borrowed from the Linux-3.7 EHCI driver
  18. */
  19. #include <linux/module.h>
  20. +#include <linux/of.h>
  21. #include <linux/device.h>
  22. #include <linux/dmapool.h>
  23. #include <linux/kernel.h>
  24. @@ -5672,9 +5673,18 @@ static int fotg210_hcd_remove(struct platform_device *pdev)
  25. return 0;
  26. }
  27. +#ifdef CONFIG_OF
  28. +static const struct of_device_id fotg210_of_match[] = {
  29. + { .compatible = "faraday,fotg210" },
  30. + {},
  31. +};
  32. +MODULE_DEVICE_TABLE(of, fotg210_of_match);
  33. +#endif
  34. +
  35. static struct platform_driver fotg210_hcd_driver = {
  36. .driver = {
  37. .name = "fotg210-hcd",
  38. + .of_match_table = of_match_ptr(fotg210_of_match),
  39. },
  40. .probe = fotg210_hcd_probe,
  41. .remove = fotg210_hcd_remove,
  42. --
  43. 2.19.2