Lines Matching full: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()
157 sdw_write_no_pm(rt711->slave, SDW_SCP_SDCA_INTMASK1, in rt711_sdca_update_status()
159 sdw_write_no_pm(rt711->slave, SDW_SCP_SDCA_INTMASK2, in rt711_sdca_update_status()
165 * Perform initialization only if slave status is present and in rt711_sdca_update_status()
171 /* perform I/O transfers required for Slave initialization */ in rt711_sdca_update_status()
172 return rt711_sdca_io_init(&slave->dev, slave); in rt711_sdca_update_status()
175 static int rt711_sdca_read_prop(struct sdw_slave *slave) in rt711_sdca_read_prop() argument
177 struct sdw_slave_prop *prop = &slave->prop; in rt711_sdca_read_prop()
194 prop->src_dpn_prop = devm_kcalloc(&slave->dev, nval, in rt711_sdca_read_prop()
212 prop->sink_dpn_prop = devm_kcalloc(&slave->dev, nval, in rt711_sdca_read_prop()
237 static int rt711_sdca_interrupt_callback(struct sdw_slave *slave, in rt711_sdca_interrupt_callback() argument
240 struct rt711_sdca_priv *rt711 = dev_get_drvdata(&slave->dev); in rt711_sdca_interrupt_callback()
245 dev_dbg(&slave->dev, in rt711_sdca_interrupt_callback()
250 dev_warn(&slave->dev, "%s the pending delayed_work was cancelled", __func__); in rt711_sdca_interrupt_callback()
265 ret = sdw_read_no_pm(rt711->slave, SDW_SCP_SDCA_INT1); in rt711_sdca_interrupt_callback()
269 ret = sdw_read_no_pm(rt711->slave, SDW_SCP_SDCA_INT2); in rt711_sdca_interrupt_callback()
278 ret = sdw_read_no_pm(rt711->slave, SDW_SCP_SDCA_INT1); in rt711_sdca_interrupt_callback()
282 ret = sdw_write_no_pm(rt711->slave, SDW_SCP_SDCA_INT1, in rt711_sdca_interrupt_callback()
287 ret = sdw_read_no_pm(rt711->slave, SDW_SCP_SDCA_INT2); in rt711_sdca_interrupt_callback()
291 ret = sdw_write_no_pm(rt711->slave, SDW_SCP_SDCA_INT2, in rt711_sdca_interrupt_callback()
298 ret = sdw_read_no_pm(rt711->slave, SDW_DP0_INT); in rt711_sdca_interrupt_callback()
303 ret = sdw_read_no_pm(rt711->slave, SDW_SCP_SDCA_INT1); in rt711_sdca_interrupt_callback()
308 ret = sdw_read_no_pm(rt711->slave, SDW_SCP_SDCA_INT2); in rt711_sdca_interrupt_callback()
319 dev_warn(&slave->dev, in rt711_sdca_interrupt_callback()
343 static int rt711_sdca_sdw_probe(struct sdw_slave *slave, in rt711_sdca_sdw_probe() argument
349 mbq_regmap = devm_regmap_init_sdw_mbq(slave, &rt711_sdca_mbq_regmap); in rt711_sdca_sdw_probe()
353 regmap = devm_regmap_init_sdw(slave, &rt711_sdca_regmap); in rt711_sdca_sdw_probe()
357 return rt711_sdca_init(&slave->dev, regmap, mbq_regmap, slave); in rt711_sdca_sdw_probe()
360 static int rt711_sdca_sdw_remove(struct sdw_slave *slave) in rt711_sdca_sdw_remove() argument
362 struct rt711_sdca_priv *rt711 = dev_get_drvdata(&slave->dev); in rt711_sdca_sdw_remove()
369 pm_runtime_disable(&slave->dev); in rt711_sdca_sdw_remove()
402 struct sdw_slave *slave = dev_to_sdw_dev(dev); in rt711_sdca_dev_system_suspend() local
415 ret1 = sdw_update_no_pm(slave, SDW_SCP_SDCA_INTMASK1, in rt711_sdca_dev_system_suspend()
417 ret2 = sdw_update_no_pm(slave, SDW_SCP_SDCA_INTMASK2, in rt711_sdca_dev_system_suspend()
423 dev_dbg(&slave->dev, "%s: could not disable SDCA interrupts\n:", __func__); in rt711_sdca_dev_system_suspend()
433 struct sdw_slave *slave = dev_to_sdw_dev(dev); in rt711_sdca_dev_resume() local
440 if (!slave->unattach_request) { in rt711_sdca_dev_resume()
443 sdw_write_no_pm(slave, SDW_SCP_SDCA_INTMASK1, SDW_SCP_SDCA_INTMASK_SDCA_0); in rt711_sdca_dev_resume()
444 sdw_write_no_pm(slave, SDW_SCP_SDCA_INTMASK2, SDW_SCP_SDCA_INTMASK_SDCA_8); in rt711_sdca_dev_resume()
451 time = wait_for_completion_timeout(&slave->initialization_complete, in rt711_sdca_dev_resume()
454 dev_err(&slave->dev, "%s: Initialization not complete, timed out\n", __func__); in rt711_sdca_dev_resume()
455 sdw_show_ping_status(slave->bus, true); in rt711_sdca_dev_resume()
461 slave->unattach_request = 0; in rt711_sdca_dev_resume()