OSDN Git Service

soc: qcom: apr: make code more reuseable
authorSrinivas Kandagatla <srinivas.kandagatla@linaro.org>
Mon, 27 Sep 2021 13:55:40 +0000 (14:55 +0100)
committerBjorn Andersson <bjorn.andersson@linaro.org>
Tue, 28 Sep 2021 03:10:07 +0000 (22:10 -0500)
commit99139b80c1b3d73026ed8be2de42c52e2976ab64
tree76bd3fd77cc25622ece84ccd9f2007999b93e975
parent1ff63d5465d0b0bf4e69562096b2d3ec9ff1a116
soc: qcom: apr: make code more reuseable

APR and other packet routers like GPR are pretty much same and
interact with other drivers in similar way.

Ex: GPR ports can be considered as APR services, only difference
is they are allocated dynamically.

Other difference is packet layout, which should not matter
with the apis abstracted. Apart from this the rest of the
functionality is pretty much identical across APR and GPR.

Make the apr code more reusable by abstracting it service level,
rather than device level so that we do not need to write
new drivers for other new packet routers like GPR.

This patch is in preparation to add GPR support to this driver.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20210927135559.738-4-srinivas.kandagatla@linaro.org
drivers/soc/qcom/apr.c
include/linux/soc/qcom/apr.h