1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #ifndef __DRIVERS_INTEL_SOUNDWIRE_H__
4 #define __DRIVERS_INTEL_SOUNDWIRE_H__
6 #include <device/soundwire.h>
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.
14 enum intel_soundwire_quirk
{
15 INTEL_SOUNDWIRE_QUIRK_STATIC_CLOCK
= BIT(0),
16 INTEL_SOUNDWIRE_QUIRK_BUS_DISABLE
= BIT(1),
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.
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
;
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.
41 int soc_fill_soundwire_controller(struct intel_soundwire_controller
**controller
);
43 #endif /* __DRIVERS_INTEL_SOUNDWIRE_H__ */