[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1490383355-23176-5-git-send-email-jliang@xilinx.com>
Date: Fri, 24 Mar 2017 12:22:20 -0700
From: Wendy Liang <wendy.liang@...inx.com>
To: <bjorn.andersson@...aro.org>
CC: <linux-remoteproc@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
"Wendy Liang" <wendy.liang@...inx.com>,
Wendy Liang <jliang@...inx.com>,
Michal Simek <michal.simek@...inx.com>
Subject: [RFC LINUX PATCH 04/19] remoteproc: sysfs: Add running independent state
From: Wendy Liang <wendy.liang@...inx.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@...inx.com>
Signed-off-by: Michal Simek <michal.simek@...inx.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
Powered by blists - more mailing lists