FILE
wcd-common.h
File preview with syntax highlighting.
linux-6.19.14/sound/soc/codecs/wcd-common.h
1/* SPDX-License-Identifier: GPL-2.0-only */ 2/* 3 * Copyright (c) 2025, Qualcomm Technologies, Inc. and/or its subsidiaries. 4 */ 5 6#ifndef __WCD_COMMON_H__ 7#define __WCD_COMMON_H__ 8 9struct device; 10struct sdw_slave; 11struct sdw_bus_params; 12struct irq_domain; 13enum sdw_slave_status; 14 15#define WCD_MAX_MICBIAS 4 16 17struct wcd_sdw_ch_info { 18 int port_num; 19 unsigned int ch_mask; 20 unsigned int master_ch_mask; 21}; 22 23#define WCD_SDW_CH(id, pn, cmask) \ 24 [id] = { \ 25 .port_num = pn, \ 26 .ch_mask = cmask, \ 27 .master_ch_mask = cmask, \ 28 } 29 30struct wcd_common { 31 struct device *dev; 32 int max_bias; 33 u32 micb_mv[WCD_MAX_MICBIAS]; 34 u32 micb_vout[WCD_MAX_MICBIAS]; 35}; 36 37extern const struct component_ops wcd_sdw_component_ops; 38int wcd_get_micb_vout_ctl_val(struct device *dev, u32 micb_mv); 39int wcd_dt_parse_micbias_info(struct wcd_common *common); 40int wcd_update_status(struct sdw_slave *slave, enum sdw_slave_status status); 41int wcd_bus_config(struct sdw_slave *slave, struct sdw_bus_params *params); 42int wcd_interrupt_callback(struct sdw_slave *slave, struct irq_domain *slave_irq, 43 unsigned int wcd_intr_status0, unsigned int wcd_intr_status1, 44 unsigned int wcd_intr_status2); 45 46#endif /* __WCD_COMMON_H__ */
~/
Read-only file preview.