summaryrefslogtreecommitdiff
path: root/drivers/rpmsg/rpmsg_core.c
AgeCommit message (Collapse)Author
2017-02-13rpmsg: rpmsg_create_ept() returns NULL on errorBjorn Andersson
The parameter validation incorrectly returned an ERR_PTR(), which is not handled by the callers to rpmsg_create_ept(), per the definition NULL should be returned. Fixes: 93e9324431c9 ("rpmsg: Handle invalid parameters in public API") Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2017-01-18rpmsg: Introduce "poll" to endpoint opsBjorn Andersson
This allows rpmsg backends to implement polling of the outgoing buffer, which provides poll support to user space when using the rpmsg character device. Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2016-12-30rpmsg: virtio_rpmsg_bus: fix channel creationLoic Pallardy
Since commit 4dffed5b3ac796b ("rpmsg: Name rpmsg devices based on channel id"), it is no more possible for a firmware to register twice a service (on different endpoints). rpmsg_register_device function is failing when calling device_add for the second time as second device has the same name as first one already register. It is because name is based only on service name and so is not more unique. Previously name was unique thanks to the use of rpmsg_dev_index. This patch adds destination and source endpoint numbers device name to create an unique identifier. Fixes: 4dffed5b3ac7 ("rpmsg: Name rpmsg devices based on channel id") Acked-by: Peter Griffin <peter.griffin@linaro.org> Signed-off-by: Loic Pallardy <loic.pallardy@st.com> [bjorn: flipped name and address in device name] Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2016-10-31rpmsg: Handle invalid parameters in public APIBjorn Andersson
There are two cases of possible uninitialized pointer usage in the API, either the parameters themselves are invalid or we're trying to jump to functions not required to be implemented by all backends. Suggested-by: Loic Pallardy <loic.pallardy@st.com> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2016-10-31rpmsg: Support drivers without primary endpointBjorn Andersson
Some types of rpmsg drivers does not have a primary endpoint to tie their existence upon, but wishes to create and destroy endpoints dynamically, e.g. based on user interactions. Allow rpmsg drivers to omit a driver callback to signal this case and make the probe path not create a primary endpoint in this case. Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2016-10-31rpmsg: Introduce a driver override mechanismBjorn Andersson
Similar to other subsystems it's useful to provide a mechanism to force a specific driver match on a device, so introduce this. Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2016-09-08rpmsg: Hide rpmsg indirection tablesBjorn Andersson
Move the device and endpoint indirection tables to the rpmsg internal header file, to hide them from the public API. Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2016-09-08rpmsg: Split rpmsg core and virtio backendBjorn Andersson
Extract the generic rpmsg core functionality from the virtio rpmsg implementation, splitting the implementation in a rpmsg core and a virtio backend. Based on initial work by Sricharan R <sricharan@codeaurora.org> Cc: Sricharan R <sricharan@codeaurora.org> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2016-09-08rpmsg: Move helper for finding rpmsg devices to coreBjorn Andersson
Extract and move the helper function for finding rpmsg child devices to the core. Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2016-09-08rpmsg: Move endpoint related interface to rpmsg coreBjorn Andersson
Move the rpmsg_send() and rpmsg_destroy_ept() interface to the rpmsg core, so that we eventually can hide the rpmsg_endpoint ops from the public API. Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2016-09-08rpmsg: Move rpmsg_device API to new fileBjorn Andersson
Extract the now indirect rpmsg_create_ept() interface to a separate file and start building up a rpmsg core. Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>