Lines Matching refs:rproc
18 #define to_rproc(d) container_of(d, struct rproc, dev)
24 struct rproc *rproc = to_rproc(dev); in firmware_show() local
26 return sprintf(buf, "%s\n", rproc->firmware); in firmware_show()
34 struct rproc *rproc = to_rproc(dev); in firmware_store() local
38 err = mutex_lock_interruptible(&rproc->lock); in firmware_store()
40 dev_err(dev, "can't lock rproc %s: %d\n", rproc->name, err); in firmware_store()
44 if (rproc->state != RPROC_OFFLINE) { in firmware_store()
63 kfree(rproc->firmware); in firmware_store()
64 rproc->firmware = p; in firmware_store()
66 mutex_unlock(&rproc->lock); in firmware_store()
89 struct rproc *rproc = to_rproc(dev); in state_show() local
92 state = rproc->state > RPROC_LAST ? RPROC_LAST : rproc->state; in state_show()
101 struct rproc *rproc = to_rproc(dev); in state_store() local
105 if (rproc->state == RPROC_RUNNING) in state_store()
108 ret = rproc_boot(rproc); in state_store()
110 dev_err(&rproc->dev, "Boot failed: %d\n", ret); in state_store()
112 if (rproc->state != RPROC_RUNNING) in state_store()
115 rproc_shutdown(rproc); in state_store()
117 dev_err(&rproc->dev, "Unrecognised option: %s\n", buf); in state_store()