Lines Matching full:slave

161 static int rt722_sdca_update_status(struct sdw_slave *slave,  in rt722_sdca_update_status()  argument
164 struct rt722_sdca_priv *rt722 = dev_get_drvdata(&slave->dev); in rt722_sdca_update_status()
177 sdw_write_no_pm(rt722->slave, SDW_SCP_SDCA_INTMASK1, in rt722_sdca_update_status()
179 sdw_write_no_pm(rt722->slave, SDW_SCP_SDCA_INTMASK2, in rt722_sdca_update_status()
185 * Perform initialization only if slave status is present and in rt722_sdca_update_status()
191 /* perform I/O transfers required for Slave initialization */ in rt722_sdca_update_status()
192 return rt722_sdca_io_init(&slave->dev, slave); in rt722_sdca_update_status()
195 static int rt722_sdca_read_prop(struct sdw_slave *slave) in rt722_sdca_read_prop() argument
197 struct sdw_slave_prop *prop = &slave->prop; in rt722_sdca_read_prop()
219 prop->src_dpn_prop = devm_kcalloc(&slave->dev, nval, in rt722_sdca_read_prop()
237 prop->sink_dpn_prop = devm_kcalloc(&slave->dev, nval, in rt722_sdca_read_prop()
262 static int rt722_sdca_interrupt_callback(struct sdw_slave *slave, in rt722_sdca_interrupt_callback() argument
265 struct rt722_sdca_priv *rt722 = dev_get_drvdata(&slave->dev); in rt722_sdca_interrupt_callback()
271 dev_warn(&slave->dev, "%s the pending delayed_work was cancelled", __func__); in rt722_sdca_interrupt_callback()
286 ret = sdw_read_no_pm(rt722->slave, SDW_SCP_SDCA_INT1); in rt722_sdca_interrupt_callback()
290 ret = sdw_read_no_pm(rt722->slave, SDW_SCP_SDCA_INT2); in rt722_sdca_interrupt_callback()
298 ret = sdw_read_no_pm(rt722->slave, SDW_SCP_SDCA_INT1); in rt722_sdca_interrupt_callback()
302 ret = sdw_update_no_pm(rt722->slave, SDW_SCP_SDCA_INT1, in rt722_sdca_interrupt_callback()
307 ret = sdw_update_no_pm(rt722->slave, SDW_SCP_SDCA_INT1, in rt722_sdca_interrupt_callback()
312 ret = sdw_read_no_pm(rt722->slave, SDW_SCP_SDCA_INT2); in rt722_sdca_interrupt_callback()
316 ret = sdw_write_no_pm(rt722->slave, SDW_SCP_SDCA_INT2, in rt722_sdca_interrupt_callback()
323 ret = sdw_read_no_pm(rt722->slave, SDW_DP0_INT); in rt722_sdca_interrupt_callback()
328 ret = sdw_read_no_pm(rt722->slave, SDW_SCP_SDCA_INT1); in rt722_sdca_interrupt_callback()
333 ret = sdw_read_no_pm(rt722->slave, SDW_SCP_SDCA_INT2); in rt722_sdca_interrupt_callback()
344 dev_warn(&slave->dev, in rt722_sdca_interrupt_callback()
368 static int rt722_sdca_sdw_probe(struct sdw_slave *slave, in rt722_sdca_sdw_probe() argument
374 mbq_regmap = devm_regmap_init_sdw_mbq(slave, &rt722_sdca_mbq_regmap); in rt722_sdca_sdw_probe()
378 regmap = devm_regmap_init_sdw(slave, &rt722_sdca_regmap); in rt722_sdca_sdw_probe()
382 return rt722_sdca_init(&slave->dev, regmap, mbq_regmap, slave); in rt722_sdca_sdw_probe()
385 static int rt722_sdca_sdw_remove(struct sdw_slave *slave) in rt722_sdca_sdw_remove() argument
387 struct rt722_sdca_priv *rt722 = dev_get_drvdata(&slave->dev); in rt722_sdca_sdw_remove()
395 pm_runtime_disable(&slave->dev); in rt722_sdca_sdw_remove()
428 struct sdw_slave *slave = dev_to_sdw_dev(dev); in rt722_sdca_dev_system_suspend() local
441 ret1 = sdw_update_no_pm(slave, SDW_SCP_SDCA_INTMASK1, in rt722_sdca_dev_system_suspend()
443 ret2 = sdw_update_no_pm(slave, SDW_SCP_SDCA_INTMASK2, in rt722_sdca_dev_system_suspend()
449 dev_dbg(&slave->dev, "%s: could not disable SDCA interrupts\n:", __func__); in rt722_sdca_dev_system_suspend()
459 struct sdw_slave *slave = dev_to_sdw_dev(dev); in rt722_sdca_dev_resume() local
466 if (!slave->unattach_request) { in rt722_sdca_dev_resume()
469 sdw_write_no_pm(slave, SDW_SCP_SDCA_INTMASK1, SDW_SCP_SDCA_INTMASK_SDCA_6); in rt722_sdca_dev_resume()
470 sdw_write_no_pm(slave, SDW_SCP_SDCA_INTMASK2, SDW_SCP_SDCA_INTMASK_SDCA_8); in rt722_sdca_dev_resume()
477 time = wait_for_completion_timeout(&slave->initialization_complete, in rt722_sdca_dev_resume()
480 dev_err(&slave->dev, "Initialization not complete, timed out\n"); in rt722_sdca_dev_resume()
481 sdw_show_ping_status(slave->bus, true); in rt722_sdca_dev_resume()
487 slave->unattach_request = 0; in rt722_sdca_dev_resume()