adav801.c 946 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. // SPDX-License-Identifier: GPL-2.0-only
  2. /*
  3. * ADAV801 audio driver
  4. *
  5. * Copyright 2014 Analog Devices Inc.
  6. */
  7. #include <linux/module.h>
  8. #include <linux/spi/spi.h>
  9. #include <linux/regmap.h>
  10. #include <sound/soc.h>
  11. #include "adav80x.h"
  12. static const struct spi_device_id adav80x_spi_id[] = {
  13. { "adav801", 0 },
  14. { }
  15. };
  16. MODULE_DEVICE_TABLE(spi, adav80x_spi_id);
  17. static int adav80x_spi_probe(struct spi_device *spi)
  18. {
  19. struct regmap_config config;
  20. config = adav80x_regmap_config;
  21. config.read_flag_mask = 0x01;
  22. return adav80x_bus_probe(&spi->dev, devm_regmap_init_spi(spi, &config));
  23. }
  24. static struct spi_driver adav80x_spi_driver = {
  25. .driver = {
  26. .name = "adav801",
  27. },
  28. .probe = adav80x_spi_probe,
  29. .id_table = adav80x_spi_id,
  30. };
  31. module_spi_driver(adav80x_spi_driver);
  32. MODULE_DESCRIPTION("ASoC ADAV801 driver");
  33. MODULE_AUTHOR("Lars-Peter Clausen <[email protected]>");
  34. MODULE_AUTHOR("Yi Li <[email protected]>>");
  35. MODULE_LICENSE("GPL");