Lines Matching full:slave
138 static int rt712_sdca_update_status(struct sdw_slave *slave, in rt712_sdca_update_status() argument
141 struct rt712_sdca_priv *rt712 = dev_get_drvdata(&slave->dev); in rt712_sdca_update_status()
154 sdw_write_no_pm(rt712->slave, SDW_SCP_SDCA_INTMASK1, in rt712_sdca_update_status()
156 sdw_write_no_pm(rt712->slave, SDW_SCP_SDCA_INTMASK2, in rt712_sdca_update_status()
162 * Perform initialization only if slave status is present and in rt712_sdca_update_status()
168 /* perform I/O transfers required for Slave initialization */ in rt712_sdca_update_status()
169 return rt712_sdca_io_init(&slave->dev, slave); in rt712_sdca_update_status()
172 static int rt712_sdca_read_prop(struct sdw_slave *slave) in rt712_sdca_read_prop() argument
174 struct sdw_slave_prop *prop = &slave->prop; in rt712_sdca_read_prop()
191 prop->src_dpn_prop = devm_kcalloc(&slave->dev, nval, in rt712_sdca_read_prop()
209 prop->sink_dpn_prop = devm_kcalloc(&slave->dev, nval, in rt712_sdca_read_prop()
234 static int rt712_sdca_interrupt_callback(struct sdw_slave *slave, in rt712_sdca_interrupt_callback() argument
237 struct rt712_sdca_priv *rt712 = dev_get_drvdata(&slave->dev); in rt712_sdca_interrupt_callback()
242 dev_dbg(&slave->dev, in rt712_sdca_interrupt_callback()
247 dev_warn(&slave->dev, "%s the pending delayed_work was cancelled", __func__); in rt712_sdca_interrupt_callback()
262 ret = sdw_read_no_pm(rt712->slave, SDW_SCP_SDCA_INT1); in rt712_sdca_interrupt_callback()
266 ret = sdw_read_no_pm(rt712->slave, SDW_SCP_SDCA_INT2); in rt712_sdca_interrupt_callback()
275 ret = sdw_read_no_pm(rt712->slave, SDW_SCP_SDCA_INT1); in rt712_sdca_interrupt_callback()
279 ret = sdw_write_no_pm(rt712->slave, SDW_SCP_SDCA_INT1, in rt712_sdca_interrupt_callback()
284 ret = sdw_read_no_pm(rt712->slave, SDW_SCP_SDCA_INT2); in rt712_sdca_interrupt_callback()
288 ret = sdw_write_no_pm(rt712->slave, SDW_SCP_SDCA_INT2, in rt712_sdca_interrupt_callback()
295 ret = sdw_read_no_pm(rt712->slave, SDW_DP0_INT); in rt712_sdca_interrupt_callback()
300 ret = sdw_read_no_pm(rt712->slave, SDW_SCP_SDCA_INT1); in rt712_sdca_interrupt_callback()
305 ret = sdw_read_no_pm(rt712->slave, SDW_SCP_SDCA_INT2); in rt712_sdca_interrupt_callback()
316 dev_warn(&slave->dev, in rt712_sdca_interrupt_callback()
340 static int rt712_sdca_sdw_probe(struct sdw_slave *slave, in rt712_sdca_sdw_probe() argument
346 mbq_regmap = devm_regmap_init_sdw_mbq(slave, &rt712_sdca_mbq_regmap); in rt712_sdca_sdw_probe()
350 regmap = devm_regmap_init_sdw(slave, &rt712_sdca_regmap); in rt712_sdca_sdw_probe()
354 return rt712_sdca_init(&slave->dev, regmap, mbq_regmap, slave); in rt712_sdca_sdw_probe()
357 static int rt712_sdca_sdw_remove(struct sdw_slave *slave) in rt712_sdca_sdw_remove() argument
359 struct rt712_sdca_priv *rt712 = dev_get_drvdata(&slave->dev); in rt712_sdca_sdw_remove()
366 pm_runtime_disable(&slave->dev); in rt712_sdca_sdw_remove()
402 struct sdw_slave *slave = dev_to_sdw_dev(dev); in rt712_sdca_dev_system_suspend() local
415 ret1 = sdw_update_no_pm(slave, SDW_SCP_SDCA_INTMASK1, in rt712_sdca_dev_system_suspend()
417 ret2 = sdw_update_no_pm(slave, SDW_SCP_SDCA_INTMASK2, in rt712_sdca_dev_system_suspend()
423 dev_dbg(&slave->dev, "%s: could not disable SDCA interrupts\n:", __func__); in rt712_sdca_dev_system_suspend()
433 struct sdw_slave *slave = dev_to_sdw_dev(dev); in rt712_sdca_dev_resume() local
440 if (!slave->unattach_request) { in rt712_sdca_dev_resume()
443 sdw_write_no_pm(slave, SDW_SCP_SDCA_INTMASK1, SDW_SCP_SDCA_INTMASK_SDCA_0); in rt712_sdca_dev_resume()
444 sdw_write_no_pm(slave, SDW_SCP_SDCA_INTMASK2, SDW_SCP_SDCA_INTMASK_SDCA_8); in rt712_sdca_dev_resume()
451 time = wait_for_completion_timeout(&slave->initialization_complete, in rt712_sdca_dev_resume()
454 dev_err(&slave->dev, "Initialization not complete, timed out\n"); in rt712_sdca_dev_resume()
455 sdw_show_ping_status(slave->bus, true); in rt712_sdca_dev_resume()
461 slave->unattach_request = 0; in rt712_sdca_dev_resume()