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

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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. --- a/drivers/usb/host/fotg210-hcd.c
  13. +++ b/drivers/usb/host/fotg210-hcd.c
  14. @@ -10,6 +10,7 @@
  15. * Most of code borrowed from the Linux-3.7 EHCI driver
  16. */
  17. #include <linux/module.h>
  18. +#include <linux/of.h>
  19. #include <linux/device.h>
  20. #include <linux/dmapool.h>
  21. #include <linux/kernel.h>
  22. @@ -5672,9 +5673,18 @@ static int fotg210_hcd_remove(struct pla
  23. return 0;
  24. }
  25. +#ifdef CONFIG_OF
  26. +static const struct of_device_id fotg210_of_match[] = {
  27. + { .compatible = "faraday,fotg210" },
  28. + {},
  29. +};
  30. +MODULE_DEVICE_TABLE(of, fotg210_of_match);
  31. +#endif
  32. +
  33. static struct platform_driver fotg210_hcd_driver = {
  34. .driver = {
  35. .name = "fotg210-hcd",
  36. + .of_match_table = of_match_ptr(fotg210_of_match),
  37. },
  38. .probe = fotg210_hcd_probe,
  39. .remove = fotg210_hcd_remove,