adav803.c 1011 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /*
  2. * ADAV803 audio driver
  3. *
  4. * Copyright 2014 Analog Devices Inc.
  5. *
  6. * Licensed under the GPL-2.
  7. */
  8. #include <linux/module.h>
  9. #include <linux/i2c.h>
  10. #include <linux/regmap.h>
  11. #include <sound/soc.h>
  12. #include "adav80x.h"
  13. static const struct i2c_device_id adav803_id[] = {
  14. { "adav803", 0 },
  15. { }
  16. };
  17. MODULE_DEVICE_TABLE(i2c, adav803_id);
  18. static int adav803_probe(struct i2c_client *client,
  19. const struct i2c_device_id *id)
  20. {
  21. return adav80x_bus_probe(&client->dev,
  22. devm_regmap_init_i2c(client, &adav80x_regmap_config));
  23. }
  24. static int adav803_remove(struct i2c_client *client)
  25. {
  26. snd_soc_unregister_codec(&client->dev);
  27. return 0;
  28. }
  29. static struct i2c_driver adav803_driver = {
  30. .driver = {
  31. .name = "adav803",
  32. },
  33. .probe = adav803_probe,
  34. .remove = adav803_remove,
  35. .id_table = adav803_id,
  36. };
  37. module_i2c_driver(adav803_driver);
  38. MODULE_DESCRIPTION("ASoC ADAV803 driver");
  39. MODULE_AUTHOR("Lars-Peter Clausen <lars@metafoo.de>");
  40. MODULE_AUTHOR("Yi Li <yi.li@analog.com>>");
  41. MODULE_LICENSE("GPL");