Lines Matching full:wcd
87 int wcd937x_sdw_hw_params(struct wcd937x_sdw_priv *wcd, in wcd937x_sdw_hw_params() argument
96 wcd->sconfig.ch_count = 1; in wcd937x_sdw_hw_params()
97 wcd->active_ports = 0; in wcd937x_sdw_hw_params()
99 ch_mask = wcd->port_config[i].ch_mask; in wcd937x_sdw_hw_params()
104 wcd->sconfig.ch_count++; in wcd937x_sdw_hw_params()
106 port_config[wcd->active_ports] = wcd->port_config[i]; in wcd937x_sdw_hw_params()
107 wcd->active_ports++; in wcd937x_sdw_hw_params()
110 wcd->sconfig.bps = 1; in wcd937x_sdw_hw_params()
111 wcd->sconfig.frame_rate = params_rate(params); in wcd937x_sdw_hw_params()
112 wcd->sconfig.direction = wcd->is_tx ? SDW_DATA_DIR_TX : SDW_DATA_DIR_RX; in wcd937x_sdw_hw_params()
113 wcd->sconfig.type = SDW_STREAM_PCM; in wcd937x_sdw_hw_params()
115 return sdw_stream_add_slave(wcd->sdev, &wcd->sconfig, in wcd937x_sdw_hw_params()
116 &port_config[0], wcd->active_ports, in wcd937x_sdw_hw_params()
117 wcd->sruntime); in wcd937x_sdw_hw_params()
123 struct wcd937x_sdw_priv *wcd = dev_get_drvdata(&slave->dev); in wcd9370_update_status() local
125 if (wcd->regmap && status == SDW_SLAVE_ATTACHED) { in wcd9370_update_status()
127 regcache_cache_only(wcd->regmap, false); in wcd9370_update_status()
128 return regcache_sync(wcd->regmap); in wcd9370_update_status()
143 struct wcd937x_sdw_priv *wcd = dev_get_drvdata(&slave->dev); in wcd9370_interrupt_callback() local
144 struct irq_domain *slave_irq = wcd->slave_irq; in wcd9370_interrupt_callback()
149 regmap_read(wcd->regmap, WCD937X_DIGITAL_INTR_STATUS_0, &sts1); in wcd9370_interrupt_callback()
150 regmap_read(wcd->regmap, WCD937X_DIGITAL_INTR_STATUS_1, &sts2); in wcd9370_interrupt_callback()
151 regmap_read(wcd->regmap, WCD937X_DIGITAL_INTR_STATUS_2, &sts3); in wcd9370_interrupt_callback()
1021 struct wcd937x_sdw_priv *wcd; in wcd9370_probe() local
1024 wcd = devm_kzalloc(dev, sizeof(*wcd), GFP_KERNEL); in wcd9370_probe()
1025 if (!wcd) in wcd9370_probe()
1030 wcd->is_tx = true; in wcd9370_probe()
1041 wcd->is_tx ? "TX" : "RX", ret); in wcd9370_probe()
1043 wcd->sdev = pdev; in wcd9370_probe()
1044 dev_set_drvdata(dev, wcd); in wcd9370_probe()
1051 if (wcd->is_tx) { in wcd9370_probe()
1054 wcd->ch_info = &wcd937x_sdw_tx_ch_info[0]; in wcd9370_probe()
1057 wcd->regmap = devm_regmap_init_sdw(pdev, &wcd937x_regmap_config); in wcd9370_probe()
1058 if (IS_ERR(wcd->regmap)) in wcd9370_probe()
1059 return dev_err_probe(dev, PTR_ERR(wcd->regmap), in wcd9370_probe()
1063 regcache_cache_only(wcd->regmap, true); in wcd9370_probe()
1067 wcd->ch_info = &wcd937x_sdw_rx_ch_info[0]; in wcd9370_probe()
1098 struct wcd937x_sdw_priv *wcd = dev_get_drvdata(dev); in wcd937x_sdw_runtime_suspend() local
1100 if (wcd->regmap) { in wcd937x_sdw_runtime_suspend()
1101 regcache_cache_only(wcd->regmap, true); in wcd937x_sdw_runtime_suspend()
1102 regcache_mark_dirty(wcd->regmap); in wcd937x_sdw_runtime_suspend()
1110 struct wcd937x_sdw_priv *wcd = dev_get_drvdata(dev); in wcd937x_sdw_runtime_resume() local
1112 if (wcd->regmap) { in wcd937x_sdw_runtime_resume()
1113 regcache_cache_only(wcd->regmap, false); in wcd937x_sdw_runtime_resume()
1114 regcache_sync(wcd->regmap); in wcd937x_sdw_runtime_resume()