blob: 50c088afcef08e9e091d2684b57db6b027163b04 [file] [log] [blame]
Duncan Lauriee8189b72020-04-29 12:09:32 -07001/* SPDX-License-Identifier: GPL-2.0-only */
2
3#ifndef __ACPI_ACPI_SOUNDWIRE_H__
4#define __ACPI_ACPI_SOUNDWIRE_H__
5
6#include <acpi/acpi_device.h>
7#include <device/soundwire.h>
8
9/**
10 * soundwire_dp_prop_cb() - Callback to add custom data port properties.
11 * @dsd: ACPI Device Property handle for this data port.
12 * @port_id: Data Port ID from 0-14.
13 * @codec: Properties that were passed to soundwire_gen_codec().
14 */
15typedef void soundwire_dp_prop_cb(struct acpi_dp *dsd, unsigned int port_id,
16 const struct soundwire_codec *codec);
17
18/**
19 * soundwire_gen_codec() - Generate SoundWire properties for codec device.
20 * @dsd: ACPI Device Property handle.
21 * @prop: Properties for codec which includes all other properties.
22 * @dp_prop_cb: Callback to allow custom codec properties.
23 */
24void soundwire_gen_codec(struct acpi_dp *dsd, const struct soundwire_codec *codec,
25 soundwire_dp_prop_cb dp_prop_cb);
26
27/**
28 * soundwire_link_prop_cb() - Callback to add custom link properties.
29 * @dsd: ACPI Device Property handle for master link.
30 * @link_id: Link number for this master.
31 * @controller: Properties that were passed to soundwire_gen_controller().
32 */
33typedef void soundwire_link_prop_cb(struct acpi_dp *dsd, unsigned int link_id,
34 const struct soundwire_controller *controller);
35
36/**
37 * soundwire_gen_controller() - Generate SoundWire properties for master links.
38 * @dsd: ACPI Device Property handle for controller.
39 * @prop: Properties for controller which includes all other properties.
40 * @link_prop_cb: Callback to allow custom link properties.
41 */
42void soundwire_gen_controller(struct acpi_dp *dsd, const struct soundwire_controller *prop,
43 soundwire_link_prop_cb link_prop_cb);
44
45#endif /* __ACPI_ACPI_SOUNDWIRE_H__ */