sst-acpi.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /*
  2. * Copyright (C) 2013-15, Intel Corporation. All rights reserved.
  3. *
  4. * This program is free software; you can redistribute it and/or
  5. * modify it under the terms of the GNU General Public License version
  6. * 2 as published by the Free Software Foundation.
  7. *
  8. * This program is distributed in the hope that it will be useful,
  9. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. * GNU General Public License for more details.
  12. *
  13. */
  14. #include <linux/stddef.h>
  15. #include <linux/acpi.h>
  16. /* translation fron HID to I2C name, needed for DAI codec_name */
  17. #if IS_ENABLED(CONFIG_ACPI)
  18. const char *sst_acpi_find_name_from_hid(const u8 hid[ACPI_ID_LEN]);
  19. #else
  20. static inline const char *sst_acpi_find_name_from_hid(const u8 hid[ACPI_ID_LEN])
  21. {
  22. return NULL;
  23. }
  24. #endif
  25. /* acpi match */
  26. struct sst_acpi_mach *sst_acpi_find_machine(struct sst_acpi_mach *machines);
  27. /* Descriptor for SST ASoC machine driver */
  28. struct sst_acpi_mach {
  29. /* ACPI ID for the matching machine driver. Audio codec for instance */
  30. const u8 id[ACPI_ID_LEN];
  31. /* machine driver name */
  32. const char *drv_name;
  33. /* firmware file name */
  34. const char *fw_filename;
  35. /* board name */
  36. const char *board;
  37. struct sst_acpi_mach * (*machine_quirk)(void *arg);
  38. void *pdata;
  39. };