adau7118-hw.c 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. // SPDX-License-Identifier: GPL-2.0
  2. //
  3. // Analog Devices ADAU7118 8 channel PDM-to-I2S/TDM Converter Standalone Hw
  4. // driver
  5. //
  6. // Copyright 2019 Analog Devices Inc.
  7. #include <linux/module.h>
  8. #include <linux/mod_devicetable.h>
  9. #include <linux/platform_device.h>
  10. #include "adau7118.h"
  11. static int adau7118_probe_hw(struct platform_device *pdev)
  12. {
  13. return adau7118_probe(&pdev->dev, NULL, true);
  14. }
  15. static const struct of_device_id adau7118_of_match[] = {
  16. { .compatible = "adi,adau7118" },
  17. {}
  18. };
  19. MODULE_DEVICE_TABLE(of, adau7118_of_match);
  20. static const struct platform_device_id adau7118_id[] = {
  21. { .name = "adau7118" },
  22. { }
  23. };
  24. MODULE_DEVICE_TABLE(platform, adau7118_id);
  25. static struct platform_driver adau7118_driver_hw = {
  26. .driver = {
  27. .name = "adau7118",
  28. .of_match_table = adau7118_of_match,
  29. },
  30. .probe = adau7118_probe_hw,
  31. .id_table = adau7118_id,
  32. };
  33. module_platform_driver(adau7118_driver_hw);
  34. MODULE_AUTHOR("Nuno Sa <nuno.sa@analog.com>");
  35. MODULE_DESCRIPTION("ADAU7118 8 channel PDM-to-I2S/TDM Converter driver for standalone hw mode");
  36. MODULE_LICENSE("GPL");