Lines Matching full:slave

163 static int rt722_sdca_update_status(struct sdw_slave *slave,  in rt722_sdca_update_status()  argument
166 struct rt722_sdca_priv *rt722 = dev_get_drvdata(&slave->dev); in rt722_sdca_update_status()
179 sdw_write_no_pm(rt722->slave, SDW_SCP_SDCA_INTMASK1, in rt722_sdca_update_status()
181 sdw_write_no_pm(rt722->slave, SDW_SCP_SDCA_INTMASK2, in rt722_sdca_update_status()
187 * Perform initialization only if slave status is present and in rt722_sdca_update_status()
193 /* perform I/O transfers required for Slave initialization */ in rt722_sdca_update_status()
194 return rt722_sdca_io_init(&slave->dev, slave); in rt722_sdca_update_status()
197 static int rt722_sdca_read_prop(struct sdw_slave *slave) in rt722_sdca_read_prop() argument
199 struct sdw_slave_prop *prop = &slave->prop; in rt722_sdca_read_prop()
221 prop->src_dpn_prop = devm_kcalloc(&slave->dev, nval, in rt722_sdca_read_prop()
239 prop->sink_dpn_prop = devm_kcalloc(&slave->dev, nval, in rt722_sdca_read_prop()
267 static int rt722_sdca_interrupt_callback(struct sdw_slave *slave, in rt722_sdca_interrupt_callback() argument
270 struct rt722_sdca_priv *rt722 = dev_get_drvdata(&slave->dev); in rt722_sdca_interrupt_callback()
276 dev_warn(&slave->dev, "%s the pending delayed_work was cancelled", __func__); in rt722_sdca_interrupt_callback()
291 ret = sdw_read_no_pm(rt722->slave, SDW_SCP_SDCA_INT1); in rt722_sdca_interrupt_callback()
295 ret = sdw_read_no_pm(rt722->slave, SDW_SCP_SDCA_INT2); in rt722_sdca_interrupt_callback()
303 ret = sdw_read_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_update_no_pm(rt722->slave, SDW_SCP_SDCA_INT1, in rt722_sdca_interrupt_callback()
317 ret = sdw_read_no_pm(rt722->slave, SDW_SCP_SDCA_INT2); in rt722_sdca_interrupt_callback()
321 ret = sdw_write_no_pm(rt722->slave, SDW_SCP_SDCA_INT2, in rt722_sdca_interrupt_callback()
328 ret = sdw_read_no_pm(rt722->slave, SDW_DP0_INT); in rt722_sdca_interrupt_callback()
333 ret = sdw_read_no_pm(rt722->slave, SDW_SCP_SDCA_INT1); in rt722_sdca_interrupt_callback()
338 ret = sdw_read_no_pm(rt722->slave, SDW_SCP_SDCA_INT2); in rt722_sdca_interrupt_callback()
349 dev_warn(&slave->dev, in rt722_sdca_interrupt_callback()
373 static int rt722_sdca_sdw_probe(struct sdw_slave *slave, in rt722_sdca_sdw_probe() argument
379 mbq_regmap = devm_regmap_init_sdw_mbq(slave, &rt722_sdca_mbq_regmap); in rt722_sdca_sdw_probe()
383 regmap = devm_regmap_init_sdw(slave, &rt722_sdca_regmap); in rt722_sdca_sdw_probe()
387 return rt722_sdca_init(&slave->dev, regmap, mbq_regmap, slave); in rt722_sdca_sdw_probe()
390 static int rt722_sdca_sdw_remove(struct sdw_slave *slave) in rt722_sdca_sdw_remove() argument
392 struct rt722_sdca_priv *rt722 = dev_get_drvdata(&slave->dev); in rt722_sdca_sdw_remove()
400 pm_runtime_disable(&slave->dev); in rt722_sdca_sdw_remove()
433 struct sdw_slave *slave = dev_to_sdw_dev(dev); in rt722_sdca_dev_system_suspend() local
446 ret1 = sdw_update_no_pm(slave, SDW_SCP_SDCA_INTMASK1, in rt722_sdca_dev_system_suspend()
448 ret2 = sdw_update_no_pm(slave, SDW_SCP_SDCA_INTMASK2, in rt722_sdca_dev_system_suspend()
454 dev_dbg(&slave->dev, "%s: could not disable SDCA interrupts\n:", __func__); in rt722_sdca_dev_system_suspend()
464 struct sdw_slave *slave = dev_to_sdw_dev(dev); in rt722_sdca_dev_resume() local
471 if (!slave->unattach_request) { in rt722_sdca_dev_resume()
474 sdw_write_no_pm(slave, SDW_SCP_SDCA_INTMASK1, SDW_SCP_SDCA_INTMASK_SDCA_6); in rt722_sdca_dev_resume()
475 sdw_write_no_pm(slave, SDW_SCP_SDCA_INTMASK2, SDW_SCP_SDCA_INTMASK_SDCA_8); in rt722_sdca_dev_resume()
482 time = wait_for_completion_timeout(&slave->initialization_complete, in rt722_sdca_dev_resume()
485 dev_err(&slave->dev, "Initialization not complete, timed out\n"); in rt722_sdca_dev_resume()
486 sdw_show_ping_status(slave->bus, true); in rt722_sdca_dev_resume()
492 slave->unattach_request = 0; in rt722_sdca_dev_resume()