Lines Matching refs:slave
141 static int rt711_sdca_update_status(struct sdw_slave *slave, in rt711_sdca_update_status() argument
144 struct rt711_sdca_priv *rt711 = dev_get_drvdata(&slave->dev); in rt711_sdca_update_status()
160 sdw_write_no_pm(rt711->slave, SDW_SCP_SDCA_INTMASK1, in rt711_sdca_update_status()
162 sdw_write_no_pm(rt711->slave, SDW_SCP_SDCA_INTMASK2, in rt711_sdca_update_status()
175 return rt711_sdca_io_init(&slave->dev, slave); in rt711_sdca_update_status()
178 static int rt711_sdca_read_prop(struct sdw_slave *slave) in rt711_sdca_read_prop() argument
180 struct sdw_slave_prop *prop = &slave->prop; in rt711_sdca_read_prop()
198 prop->src_dpn_prop = devm_kcalloc(&slave->dev, nval, in rt711_sdca_read_prop()
216 prop->sink_dpn_prop = devm_kcalloc(&slave->dev, nval, in rt711_sdca_read_prop()
241 static int rt711_sdca_interrupt_callback(struct sdw_slave *slave, in rt711_sdca_interrupt_callback() argument
244 struct rt711_sdca_priv *rt711 = dev_get_drvdata(&slave->dev); in rt711_sdca_interrupt_callback()
249 dev_dbg(&slave->dev, in rt711_sdca_interrupt_callback()
254 dev_warn(&slave->dev, "%s the pending delayed_work was cancelled", __func__); in rt711_sdca_interrupt_callback()
269 ret = sdw_read_no_pm(rt711->slave, SDW_SCP_SDCA_INT1); in rt711_sdca_interrupt_callback()
273 ret = sdw_read_no_pm(rt711->slave, SDW_SCP_SDCA_INT2); in rt711_sdca_interrupt_callback()
282 ret = sdw_read_no_pm(rt711->slave, SDW_SCP_SDCA_INT1); in rt711_sdca_interrupt_callback()
286 ret = sdw_write_no_pm(rt711->slave, SDW_SCP_SDCA_INT1, in rt711_sdca_interrupt_callback()
291 ret = sdw_read_no_pm(rt711->slave, SDW_SCP_SDCA_INT2); in rt711_sdca_interrupt_callback()
295 ret = sdw_write_no_pm(rt711->slave, SDW_SCP_SDCA_INT2, in rt711_sdca_interrupt_callback()
302 ret = sdw_read_no_pm(rt711->slave, SDW_DP0_INT); in rt711_sdca_interrupt_callback()
307 ret = sdw_read_no_pm(rt711->slave, SDW_SCP_SDCA_INT1); in rt711_sdca_interrupt_callback()
312 ret = sdw_read_no_pm(rt711->slave, SDW_SCP_SDCA_INT2); in rt711_sdca_interrupt_callback()
323 dev_warn(&slave->dev, in rt711_sdca_interrupt_callback()
347 static int rt711_sdca_sdw_probe(struct sdw_slave *slave, in rt711_sdca_sdw_probe() argument
353 mbq_regmap = devm_regmap_init_sdw_mbq(slave, &rt711_sdca_mbq_regmap); in rt711_sdca_sdw_probe()
357 regmap = devm_regmap_init_sdw(slave, &rt711_sdca_regmap); in rt711_sdca_sdw_probe()
361 return rt711_sdca_init(&slave->dev, regmap, mbq_regmap, slave); in rt711_sdca_sdw_probe()
364 static int rt711_sdca_sdw_remove(struct sdw_slave *slave) in rt711_sdca_sdw_remove() argument
366 struct rt711_sdca_priv *rt711 = dev_get_drvdata(&slave->dev); in rt711_sdca_sdw_remove()
374 pm_runtime_disable(&slave->dev); in rt711_sdca_sdw_remove()
407 struct sdw_slave *slave = dev_to_sdw_dev(dev); in rt711_sdca_dev_system_suspend() local
420 ret1 = sdw_update_no_pm(slave, SDW_SCP_SDCA_INTMASK1, in rt711_sdca_dev_system_suspend()
422 ret2 = sdw_update_no_pm(slave, SDW_SCP_SDCA_INTMASK2, in rt711_sdca_dev_system_suspend()
428 dev_dbg(&slave->dev, "%s: could not disable SDCA interrupts\n:", __func__); in rt711_sdca_dev_system_suspend()
438 struct sdw_slave *slave = dev_to_sdw_dev(dev); in rt711_sdca_dev_resume() local
445 if (!slave->unattach_request) in rt711_sdca_dev_resume()
448 time = wait_for_completion_timeout(&slave->initialization_complete, in rt711_sdca_dev_resume()
451 dev_err(&slave->dev, "Initialization not complete, timed out\n"); in rt711_sdca_dev_resume()
452 sdw_show_ping_status(slave->bus, true); in rt711_sdca_dev_resume()
458 slave->unattach_request = 0; in rt711_sdca_dev_resume()