Lines Matching full:slave
156 static int rt712_sdca_update_status(struct sdw_slave *slave, in rt712_sdca_update_status() argument
159 struct rt712_sdca_priv *rt712 = dev_get_drvdata(&slave->dev); in rt712_sdca_update_status()
172 sdw_write_no_pm(rt712->slave, SDW_SCP_SDCA_INTMASK1, in rt712_sdca_update_status()
174 sdw_write_no_pm(rt712->slave, SDW_SCP_SDCA_INTMASK2, in rt712_sdca_update_status()
180 * Perform initialization only if slave status is present and in rt712_sdca_update_status()
186 /* perform I/O transfers required for Slave initialization */ in rt712_sdca_update_status()
187 return rt712_sdca_io_init(&slave->dev, slave); in rt712_sdca_update_status()
190 static int rt712_sdca_read_prop(struct sdw_slave *slave) in rt712_sdca_read_prop() argument
192 struct sdw_slave_prop *prop = &slave->prop; in rt712_sdca_read_prop()
199 sdw_slave_read_prop(slave); in rt712_sdca_read_prop()
211 prop->src_dpn_prop = devm_kcalloc(&slave->dev, nval, in rt712_sdca_read_prop()
229 prop->sink_dpn_prop = devm_kcalloc(&slave->dev, nval, in rt712_sdca_read_prop()
254 static int rt712_sdca_interrupt_callback(struct sdw_slave *slave, in rt712_sdca_interrupt_callback() argument
257 struct rt712_sdca_priv *rt712 = dev_get_drvdata(&slave->dev); in rt712_sdca_interrupt_callback()
262 dev_dbg(&slave->dev, in rt712_sdca_interrupt_callback()
267 dev_warn(&slave->dev, "%s the pending delayed_work was cancelled", __func__); in rt712_sdca_interrupt_callback()
282 ret = sdw_read_no_pm(rt712->slave, SDW_SCP_SDCA_INT1); in rt712_sdca_interrupt_callback()
286 ret = sdw_read_no_pm(rt712->slave, SDW_SCP_SDCA_INT2); in rt712_sdca_interrupt_callback()
295 ret = sdw_read_no_pm(rt712->slave, SDW_SCP_SDCA_INT1); in rt712_sdca_interrupt_callback()
299 ret = sdw_write_no_pm(rt712->slave, SDW_SCP_SDCA_INT1, in rt712_sdca_interrupt_callback()
304 ret = sdw_read_no_pm(rt712->slave, SDW_SCP_SDCA_INT2); in rt712_sdca_interrupt_callback()
308 ret = sdw_write_no_pm(rt712->slave, SDW_SCP_SDCA_INT2, in rt712_sdca_interrupt_callback()
315 ret = sdw_read_no_pm(rt712->slave, SDW_DP0_INT); in rt712_sdca_interrupt_callback()
320 ret = sdw_read_no_pm(rt712->slave, SDW_SCP_SDCA_INT1); in rt712_sdca_interrupt_callback()
325 ret = sdw_read_no_pm(rt712->slave, SDW_SCP_SDCA_INT2); in rt712_sdca_interrupt_callback()
336 dev_warn(&slave->dev, in rt712_sdca_interrupt_callback()
360 static int rt712_sdca_sdw_probe(struct sdw_slave *slave, in rt712_sdca_sdw_probe() argument
366 mbq_regmap = devm_regmap_init_sdw_mbq(slave, &rt712_sdca_mbq_regmap); in rt712_sdca_sdw_probe()
370 regmap = devm_regmap_init_sdw(slave, &rt712_sdca_regmap); in rt712_sdca_sdw_probe()
374 return rt712_sdca_init(&slave->dev, regmap, mbq_regmap, slave); in rt712_sdca_sdw_probe()
377 static int rt712_sdca_sdw_remove(struct sdw_slave *slave) in rt712_sdca_sdw_remove() argument
379 struct rt712_sdca_priv *rt712 = dev_get_drvdata(&slave->dev); in rt712_sdca_sdw_remove()
386 pm_runtime_disable(&slave->dev); in rt712_sdca_sdw_remove()
422 struct sdw_slave *slave = dev_to_sdw_dev(dev); in rt712_sdca_dev_system_suspend() local
435 ret1 = sdw_update_no_pm(slave, SDW_SCP_SDCA_INTMASK1, in rt712_sdca_dev_system_suspend()
437 ret2 = sdw_update_no_pm(slave, SDW_SCP_SDCA_INTMASK2, in rt712_sdca_dev_system_suspend()
443 dev_dbg(&slave->dev, "%s: could not disable SDCA interrupts\n:", __func__); in rt712_sdca_dev_system_suspend()
453 struct sdw_slave *slave = dev_to_sdw_dev(dev); in rt712_sdca_dev_resume() local
460 if (!slave->unattach_request) { in rt712_sdca_dev_resume()
464 sdw_write_no_pm(slave, SDW_SCP_SDCA_INTMASK1, SDW_SCP_SDCA_INTMASK_SDCA_0); in rt712_sdca_dev_resume()
465 sdw_write_no_pm(slave, SDW_SCP_SDCA_INTMASK2, SDW_SCP_SDCA_INTMASK_SDCA_8); in rt712_sdca_dev_resume()
472 time = wait_for_completion_timeout(&slave->initialization_complete, in rt712_sdca_dev_resume()
475 dev_err(&slave->dev, "%s: Initialization not complete, timed out\n", __func__); in rt712_sdca_dev_resume()
476 sdw_show_ping_status(slave->bus, true); in rt712_sdca_dev_resume()
482 slave->unattach_request = 0; in rt712_sdca_dev_resume()