Lines Matching full:slave
36 static ssize_t sdw_sprintf(struct sdw_slave *slave, in sdw_sprintf() argument
41 value = sdw_read_no_pm(slave, reg); in sdw_sprintf()
52 struct sdw_slave *slave = s_file->private; in sdw_slave_reg_show() local
60 ret = pm_runtime_get_sync(&slave->dev); in sdw_slave_reg_show()
62 pm_runtime_put_noidle(&slave->dev); in sdw_slave_reg_show()
71 ret += sdw_sprintf(slave, buf, ret, i); in sdw_slave_reg_show()
75 ret += sdw_sprintf(slave, buf, ret, SDW_DP0_CHANNELEN); in sdw_slave_reg_show()
77 ret += sdw_sprintf(slave, buf, ret, i); in sdw_slave_reg_show()
81 ret += sdw_sprintf(slave, buf, ret, in sdw_slave_reg_show()
85 ret += sdw_sprintf(slave, buf, ret, i); in sdw_slave_reg_show()
90 ret += sdw_sprintf(slave, buf, ret, i); in sdw_slave_reg_show()
92 ret += sdw_sprintf(slave, buf, ret, i); in sdw_slave_reg_show()
94 ret += sdw_sprintf(slave, buf, ret, i); in sdw_slave_reg_show()
96 ret += sdw_sprintf(slave, buf, ret, i); in sdw_slave_reg_show()
98 ret += sdw_sprintf(slave, buf, ret, i); in sdw_slave_reg_show()
103 * retrieved from the Slave. The Master typically keeps track in sdw_slave_reg_show()
114 ret += sdw_sprintf(slave, buf, ret, j); in sdw_slave_reg_show()
120 ret += sdw_sprintf(slave, buf, ret, j); in sdw_slave_reg_show()
126 ret += sdw_sprintf(slave, buf, ret, j); in sdw_slave_reg_show()
131 pm_runtime_mark_last_busy(&slave->dev); in sdw_slave_reg_show()
132 pm_runtime_put(&slave->dev); in sdw_slave_reg_show()
148 struct sdw_slave *slave = data; in set_command() local
156 dev_dbg(&slave->dev, "command: %s\n", value ? "read" : "write"); in set_command()
166 struct sdw_slave *slave = data; in set_start_address() local
171 dev_dbg(&slave->dev, "start address %#llx\n", value); in set_start_address()
182 struct sdw_slave *slave = data; in set_num_bytes() local
190 dev_dbg(&slave->dev, "number of bytes %lld\n", value); in set_num_bytes()
201 struct sdw_slave *slave = data; in cmd_go() local
212 ret = pm_runtime_get_sync(&slave->dev); in cmd_go()
214 pm_runtime_put_noidle(&slave->dev); in cmd_go()
221 dev_dbg(&slave->dev, "starting command\n"); in cmd_go()
226 ret = request_firmware(&fw, firmware_file, &slave->dev); in cmd_go()
228 dev_err(&slave->dev, "firmware %s not found\n", firmware_file); in cmd_go()
233 dev_err(&slave->dev, in cmd_go()
240 ret = sdw_nwrite_no_pm(slave, start_addr, num_bytes, fw->data); in cmd_go()
243 ret = sdw_nread_no_pm(slave, start_addr, num_bytes, read_buffer); in cmd_go()
246 dev_dbg(&slave->dev, "command completed %d\n", ret); in cmd_go()
249 pm_runtime_mark_last_busy(&slave->dev); in cmd_go()
250 pm_runtime_put(&slave->dev); in cmd_go()
277 void sdw_slave_debugfs_init(struct sdw_slave *slave) in sdw_slave_debugfs_init() argument
283 master = slave->bus->debugfs; in sdw_slave_debugfs_init()
285 /* create the debugfs slave-name */ in sdw_slave_debugfs_init()
286 snprintf(name, sizeof(name), "%s", dev_name(&slave->dev)); in sdw_slave_debugfs_init()
289 debugfs_create_file("registers", 0400, d, slave, &sdw_slave_reg_fops); in sdw_slave_debugfs_init()
292 debugfs_create_file("command", 0200, d, slave, &set_command_fops); in sdw_slave_debugfs_init()
293 debugfs_create_file("start_address", 0200, d, slave, &set_start_address_fops); in sdw_slave_debugfs_init()
294 debugfs_create_file("num_bytes", 0200, d, slave, &set_num_bytes_fops); in sdw_slave_debugfs_init()
295 debugfs_create_file("go", 0200, d, slave, &cmd_go_fops); in sdw_slave_debugfs_init()
297 debugfs_create_file("read_buffer", 0400, d, slave, &read_buffer_fops); in sdw_slave_debugfs_init()
301 slave->debugfs = d; in sdw_slave_debugfs_init()
304 void sdw_slave_debugfs_exit(struct sdw_slave *slave) in sdw_slave_debugfs_exit() argument
306 debugfs_remove_recursive(slave->debugfs); in sdw_slave_debugfs_exit()