According to valgrind the modalias read from the remoteproc device is
not NUL-terminated, so do this to avoid reading in the weeds.
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Include the reason for the failure to update the "state" sysfs
attribtue in the error message.
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
The old mechanism searched for remoteproc instances from the
qcom_q6v5_mss driver, but in modern platforms the MSA based remoteproc
model has been replaced by the PAS based one. As such we use the common
qcom_q6v5_pas driver - as with other subsystems.
Use the modalias to find remoteproc drivers with the mpss-pas or mss-pil
compatible to find these, and fall back to the old heuristics if this
fails.
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Add sigterm/sigint handlers to enable graceful rmtfs server
bringdown on first instance of SIGINT/SIGTERM. Start/Stop the
remoteproc instance on RMTFS service up and SIGINT/SIGTERM
respectively. Force quit on second instance of SIGINT/SIGTERM.
Signed-off-by: Sibi Sankar <sibis@codeaurora.org>
[bjorn: Pipe for event loop signaling, reworked /sys traversal]
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>