• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
3 #ifndef __DRIVERS_INTEL_SOUNDWIRE_H__
4 #define __DRIVERS_INTEL_SOUNDWIRE_H__
5 
6 #include <device/soundwire.h>
7 #include <types.h>
8 
9 /**
10  * enum intel_soundwire_quirk - Quirks for controller master links.
11  * @INTEL_SOUNDWIRE_QUIRK_STATIC_CLOCK: Link clock is fixed.
12  * @INTEL_SOUNDWIRE_QUIRK_BUS_DISABLE: This link should be disabled.
13  */
14 enum intel_soundwire_quirk {
15 	INTEL_SOUNDWIRE_QUIRK_STATIC_CLOCK = BIT(0),
16 	INTEL_SOUNDWIRE_QUIRK_BUS_DISABLE = BIT(1),
17 };
18 
19 /**
20  * struct intel_soundwire_controller - SoundWire controller configuration for Intel SoC.
21  * @dev: Device handle for this controller.
22  * @acpi_address: ACPI address for this controller.  This is a custom address that is not
23  *                compatible with either PCI or SoundWire.
24  * @ip_clock: Frequency of the source clock connected to the controller.
25  * @quirk_mask: Quirks that can be passed to the kernel drivers.
26  * @sdw: SoundWire controller properties defined in MIPI SoundWire DisCo Specification.
27  */
28 struct intel_soundwire_controller {
29 	const struct device *dev;
30 	uint64_t acpi_address;
31 	unsigned int ip_clock;
32 	unsigned int quirk_mask;
33 	struct soundwire_controller sdw;
34 };
35 
36 /**
37  * soc_fill_soundwire_controller() - Get SoundWire controller properties from the SoC.
38  * @controller: Properties to be filled by the SoC.
39  * Return zero for success, -1 if there was any error filling the properties.
40  */
41 int soc_fill_soundwire_controller(struct intel_soundwire_controller **controller);
42 
43 #endif /* __DRIVERS_INTEL_SOUNDWIRE_H__ */
44