Messages in this thread Patch in this message | | | From | Wendy Liang <> | Subject | [RFC LINUX PATCH 04/19] remoteproc: sysfs: Add running independent state | Date | Fri, 24 Mar 2017 12:22:20 -0700 |
| |
From: Wendy Liang <wendy.liang@xilinx.com>
Show running independent state to indicate the remote runs and it is not started by the remoteproc driver.
Signed-off-by: Wendy Liang <jliang@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com> --- drivers/remoteproc/remoteproc_sysfs.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/remoteproc/remoteproc_sysfs.c b/drivers/remoteproc/remoteproc_sysfs.c index 47be411..616057d 100644 --- a/drivers/remoteproc/remoteproc_sysfs.c +++ b/drivers/remoteproc/remoteproc_sysfs.c @@ -74,6 +74,7 @@ static ssize_t firmware_store(struct device *dev, [RPROC_RUNNING] = "running", [RPROC_CRASHED] = "crashed", [RPROC_DELETED] = "deleted", + [RPROC_RUNNING_INDEPENDENT] = "running_independent", [RPROC_LAST] = "invalid", }; @@ -97,14 +98,16 @@ static ssize_t state_store(struct device *dev, int ret = 0; if (sysfs_streq(buf, "start")) { - if (rproc->state == RPROC_RUNNING) + if (rproc->state == RPROC_RUNNING || + rproc->state == RPROC_RUNNING_INDEPENDENT) return -EBUSY; ret = rproc_boot(rproc); if (ret) dev_err(&rproc->dev, "Boot failed: %d\n", ret); } else if (sysfs_streq(buf, "stop")) { - if (rproc->state != RPROC_RUNNING) + if (rproc->state != RPROC_RUNNING && + rproc->state != RPROC_RUNNING_INDEPENDENT) return -EINVAL; rproc_shutdown(rproc); -- 1.9.1
| |