Lines Matching full:slave

146 	if (!rt5682->slave)  in rt5682_sdw_hw_params()
167 retval = sdw_stream_add_slave(rt5682->slave, &stream_config, in rt5682_sdw_hw_params()
265 if (!rt5682->slave) in rt5682_sdw_hw_free()
268 sdw_stream_remove_slave(rt5682->slave, stream->sdw_stream); in rt5682_sdw_hw_free()
333 struct sdw_slave *slave) in rt5682_sdw_init() argument
343 rt5682->slave = slave; in rt5682_sdw_init()
372 dev_dbg(&slave->dev, "%s\n", __func__); in rt5682_sdw_init()
377 static int rt5682_io_init(struct device *dev, struct sdw_slave *slave) in rt5682_io_init() argument
389 * PM runtime is only enabled when a Slave reports as Attached in rt5682_io_init()
393 pm_runtime_set_autosuspend_delay(&slave->dev, 3000); in rt5682_io_init()
394 pm_runtime_use_autosuspend(&slave->dev); in rt5682_io_init()
397 pm_runtime_set_active(&slave->dev); in rt5682_io_init()
400 pm_runtime_mark_last_busy(&slave->dev); in rt5682_io_init()
402 pm_runtime_enable(&slave->dev); in rt5682_io_init()
405 pm_runtime_get_noresume(&slave->dev); in rt5682_io_init()
491 /* Mark Slave initialization complete */ in rt5682_io_init()
496 pm_runtime_mark_last_busy(&slave->dev); in rt5682_io_init()
497 pm_runtime_put_autosuspend(&slave->dev); in rt5682_io_init()
499 dev_dbg(&slave->dev, "%s hw_init complete: %d\n", __func__, ret); in rt5682_io_init()
531 static int rt5682_update_status(struct sdw_slave *slave, in rt5682_update_status() argument
534 struct rt5682_priv *rt5682 = dev_get_drvdata(&slave->dev); in rt5682_update_status()
543 * Perform initialization only if slave status is present and in rt5682_update_status()
549 /* perform I/O transfers required for Slave initialization */ in rt5682_update_status()
550 return rt5682_io_init(&slave->dev, slave); in rt5682_update_status()
553 static int rt5682_read_prop(struct sdw_slave *slave) in rt5682_read_prop() argument
555 struct sdw_slave_prop *prop = &slave->prop; in rt5682_read_prop()
572 prop->src_dpn_prop = devm_kcalloc(&slave->dev, nval, in rt5682_read_prop()
591 prop->sink_dpn_prop = devm_kcalloc(&slave->dev, nval, in rt5682_read_prop()
663 static int rt5682_bus_config(struct sdw_slave *slave, in rt5682_bus_config() argument
666 struct rt5682_priv *rt5682 = dev_get_drvdata(&slave->dev); in rt5682_bus_config()
671 ret = rt5682_clock_config(&slave->dev); in rt5682_bus_config()
673 dev_err(&slave->dev, "Invalid clk config"); in rt5682_bus_config()
678 static int rt5682_interrupt_callback(struct sdw_slave *slave, in rt5682_interrupt_callback() argument
681 struct rt5682_priv *rt5682 = dev_get_drvdata(&slave->dev); in rt5682_interrupt_callback()
683 dev_dbg(&slave->dev, in rt5682_interrupt_callback()
703 static int rt5682_sdw_probe(struct sdw_slave *slave, in rt5682_sdw_probe() argument
709 regmap = devm_regmap_init_sdw(slave, &rt5682_sdw_regmap); in rt5682_sdw_probe()
713 rt5682_sdw_init(&slave->dev, regmap, slave); in rt5682_sdw_probe()
718 static int rt5682_sdw_remove(struct sdw_slave *slave) in rt5682_sdw_remove() argument
720 struct rt5682_priv *rt5682 = dev_get_drvdata(&slave->dev); in rt5682_sdw_remove()
726 pm_runtime_disable(&slave->dev); in rt5682_sdw_remove()
755 struct sdw_slave *slave = dev_to_sdw_dev(dev); in rt5682_dev_system_suspend() local
768 ret = sdw_update_no_pm(slave, SDW_SCP_INTMASK1, in rt5682_dev_system_suspend()
774 dev_dbg(&slave->dev, "%s: could not disable imp-def interrupts\n:", __func__); in rt5682_dev_system_suspend()
782 struct sdw_slave *slave = dev_to_sdw_dev(dev); in rt5682_dev_resume() local
789 if (!slave->unattach_request) in rt5682_dev_resume()
792 time = wait_for_completion_timeout(&slave->initialization_complete, in rt5682_dev_resume()
795 dev_err(&slave->dev, "Initialization not complete, timed out\n"); in rt5682_dev_resume()
796 sdw_show_ping_status(slave->bus, true); in rt5682_dev_resume()
802 slave->unattach_request = 0; in rt5682_dev_resume()