hc
2023-12-08 01573e231f18eb2d99162747186f59511f56b64d
kernel/sound/soc/codecs/rt5677-spi.h
....@@ -1,19 +1,33 @@
1
+/* SPDX-License-Identifier: GPL-2.0-only */
12 /*
23 * rt5677-spi.h -- RT5677 ALSA SoC audio codec driver
34 *
45 * Copyright 2013 Realtek Semiconductor Corp.
56 * Author: Oder Chiou <oder_chiou@realtek.com>
6
- *
7
- * This program is free software; you can redistribute it and/or modify
8
- * it under the terms of the GNU General Public License version 2 as
9
- * published by the Free Software Foundation.
107 */
118
129 #ifndef __RT5677_SPI_H__
1310 #define __RT5677_SPI_H__
1411
12
+#if IS_ENABLED(CONFIG_SND_SOC_RT5677_SPI)
1513 int rt5677_spi_read(u32 addr, void *rxbuf, size_t len);
1614 int rt5677_spi_write(u32 addr, const void *txbuf, size_t len);
1715 int rt5677_spi_write_firmware(u32 addr, const struct firmware *fw);
16
+void rt5677_spi_hotword_detected(void);
17
+#else
18
+static inline int rt5677_spi_read(u32 addr, void *rxbuf, size_t len)
19
+{
20
+ return -EINVAL;
21
+}
22
+static inline int rt5677_spi_write(u32 addr, const void *txbuf, size_t len)
23
+{
24
+ return -EINVAL;
25
+}
26
+static inline int rt5677_spi_write_firmware(u32 addr, const struct firmware *fw)
27
+{
28
+ return -EINVAL;
29
+}
30
+static inline void rt5677_spi_hotword_detected(void){}
31
+#endif
1832
1933 #endif /* __RT5677_SPI_H__ */