spi-brcmstb-qspi.c 1011 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. // SPDX-License-Identifier: GPL-2.0-only
  2. /*
  3. * Copyright 2016 Broadcom
  4. */
  5. #include <linux/device.h>
  6. #include <linux/module.h>
  7. #include <linux/platform_device.h>
  8. #include <linux/of.h>
  9. #include "spi-bcm-qspi.h"
  10. static const struct of_device_id brcmstb_qspi_of_match[] = {
  11. { .compatible = "brcm,spi-brcmstb-qspi" },
  12. { .compatible = "brcm,spi-brcmstb-mspi" },
  13. {},
  14. };
  15. MODULE_DEVICE_TABLE(of, brcmstb_qspi_of_match);
  16. static int brcmstb_qspi_probe(struct platform_device *pdev)
  17. {
  18. return bcm_qspi_probe(pdev, NULL);
  19. }
  20. static int brcmstb_qspi_remove(struct platform_device *pdev)
  21. {
  22. return bcm_qspi_remove(pdev);
  23. }
  24. static struct platform_driver brcmstb_qspi_driver = {
  25. .probe = brcmstb_qspi_probe,
  26. .remove = brcmstb_qspi_remove,
  27. .driver = {
  28. .name = "brcmstb_qspi",
  29. .pm = &bcm_qspi_pm_ops,
  30. .of_match_table = brcmstb_qspi_of_match,
  31. }
  32. };
  33. module_platform_driver(brcmstb_qspi_driver);
  34. MODULE_LICENSE("GPL v2");
  35. MODULE_AUTHOR("Kamal Dasu");
  36. MODULE_DESCRIPTION("Broadcom SPI driver for settop SoC");