18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-only */ 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * rt5677-spi.h -- RT5677 ALSA SoC audio codec driver 48c2ecf20Sopenharmony_ci * 58c2ecf20Sopenharmony_ci * Copyright 2013 Realtek Semiconductor Corp. 68c2ecf20Sopenharmony_ci * Author: Oder Chiou <oder_chiou@realtek.com> 78c2ecf20Sopenharmony_ci */ 88c2ecf20Sopenharmony_ci 98c2ecf20Sopenharmony_ci#ifndef __RT5677_SPI_H__ 108c2ecf20Sopenharmony_ci#define __RT5677_SPI_H__ 118c2ecf20Sopenharmony_ci 128c2ecf20Sopenharmony_ci#if IS_ENABLED(CONFIG_SND_SOC_RT5677_SPI) 138c2ecf20Sopenharmony_ciint rt5677_spi_read(u32 addr, void *rxbuf, size_t len); 148c2ecf20Sopenharmony_ciint rt5677_spi_write(u32 addr, const void *txbuf, size_t len); 158c2ecf20Sopenharmony_ciint rt5677_spi_write_firmware(u32 addr, const struct firmware *fw); 168c2ecf20Sopenharmony_civoid rt5677_spi_hotword_detected(void); 178c2ecf20Sopenharmony_ci#else 188c2ecf20Sopenharmony_cistatic inline int rt5677_spi_read(u32 addr, void *rxbuf, size_t len) 198c2ecf20Sopenharmony_ci{ 208c2ecf20Sopenharmony_ci return -EINVAL; 218c2ecf20Sopenharmony_ci} 228c2ecf20Sopenharmony_cistatic inline int rt5677_spi_write(u32 addr, const void *txbuf, size_t len) 238c2ecf20Sopenharmony_ci{ 248c2ecf20Sopenharmony_ci return -EINVAL; 258c2ecf20Sopenharmony_ci} 268c2ecf20Sopenharmony_cistatic inline int rt5677_spi_write_firmware(u32 addr, const struct firmware *fw) 278c2ecf20Sopenharmony_ci{ 288c2ecf20Sopenharmony_ci return -EINVAL; 298c2ecf20Sopenharmony_ci} 308c2ecf20Sopenharmony_cistatic inline void rt5677_spi_hotword_detected(void){} 318c2ecf20Sopenharmony_ci#endif 328c2ecf20Sopenharmony_ci 338c2ecf20Sopenharmony_ci#endif /* __RT5677_SPI_H__ */ 34