rpmsg: smd: Create device for all channels
authorBjorn Andersson <bjorn.andersson@linaro.org>
Tue, 12 Dec 2017 23:58:54 +0000 (15:58 -0800)
committerBjorn Andersson <bjorn.andersson@linaro.org>
Tue, 19 Dec 2017 05:49:55 +0000 (21:49 -0800)
commitc12fc4519f607f83b6874a5388bb4df0759f687c
tree3186777b0e2596b0e73e3dfff1c92e2798cc07f9
parent268105fbc0f82e1daa44b57112ef3fd81f69a174
rpmsg: smd: Create device for all channels

Rather than selectively creating devices only for the channels that the
remote have moved to "opening" state let's create devices for all
channels found. The driver model will match drivers to the ones we care
about and attempt to open these.

The one case where this fails is if the user loads a firmware that lacks
a particular channel of the previous firmware that was running, in which
case we would find the old channel and attempt to probe it. The channel
opening handshake will ensure this will result in a graceful failure.

The result of this patch is that we will actively open the RPM channel
even though it's left in a state other than "opening" after the boot
loader's closing of the channel.

Tested-by: Will Newton <will.newton@gmail.com>
Reported-by: Jeremy McNicoll <jmcnicol@redhat.com>
Reported-by: Will Newton <will.newton@gmail.com>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
drivers/rpmsg/qcom_smd.c