public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] remoteproc: Fix module autoload for qcom platform drivers
@ 2016-10-18 21:24 Javier Martinez Canillas
  2016-10-18 21:24 ` [PATCH 1/3] remoteproc: qcom: q6v5_pil: Fix module autoload Javier Martinez Canillas
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Javier Martinez Canillas @ 2016-10-18 21:24 UTC (permalink / raw)
  To: linux-kernel
  Cc: Javier Martinez Canillas, Bjorn Andersson, Ohad Ben-Cohen,
	linux-remoteproc

Hello,

I noticed that module autoload won't be working in some of the qcom
remoteproc drivers. This patch series contains the fixes for these.

Best regards,
Javier


Javier Martinez Canillas (3):
  remoteproc: qcom: q6v5_pil: Fix module autoload
  remoteproc: qcom: wcnss: Fix module autoload
  remoteproc: qcom: wcnss_iris: Fix module autoload

 drivers/remoteproc/qcom_q6v5_pil.c   | 1 +
 drivers/remoteproc/qcom_wcnss.c      | 1 +
 drivers/remoteproc/qcom_wcnss_iris.c | 1 +
 3 files changed, 3 insertions(+)

-- 
2.7.4

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/3] remoteproc: qcom: q6v5_pil: Fix module autoload
  2016-10-18 21:24 [PATCH 0/3] remoteproc: Fix module autoload for qcom platform drivers Javier Martinez Canillas
@ 2016-10-18 21:24 ` Javier Martinez Canillas
  2016-10-18 21:24 ` [PATCH 2/3] remoteproc: qcom: wcnss: " Javier Martinez Canillas
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Javier Martinez Canillas @ 2016-10-18 21:24 UTC (permalink / raw)
  To: linux-kernel
  Cc: Javier Martinez Canillas, Bjorn Andersson, Ohad Ben-Cohen,
	linux-remoteproc

If the driver is built as a module, autoload won't work because the module
alias information is not filled. So user-space can't match the registered
device with the corresponding module.

Export the module alias information using the MODULE_DEVICE_TABLE() macro.

Before this patch:

$ modinfo drivers/remoteproc/qcom_q6v5_pil.ko | grep alias
$

After this patch:

$ modinfo drivers/remoteproc/qcom_q6v5_pil.ko | grep alias
alias:          of:N*T*Cqcom,q6v5-pilC*
alias:          of:N*T*Cqcom,q6v5-pil

Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
---

 drivers/remoteproc/qcom_q6v5_pil.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/remoteproc/qcom_q6v5_pil.c b/drivers/remoteproc/qcom_q6v5_pil.c
index 2e0caaaa766a..b08989b48df7 100644
--- a/drivers/remoteproc/qcom_q6v5_pil.c
+++ b/drivers/remoteproc/qcom_q6v5_pil.c
@@ -894,6 +894,7 @@ static const struct of_device_id q6v5_of_match[] = {
 	{ .compatible = "qcom,q6v5-pil", },
 	{ },
 };
+MODULE_DEVICE_TABLE(of, q6v5_of_match);
 
 static struct platform_driver q6v5_driver = {
 	.probe = q6v5_probe,
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/3] remoteproc: qcom: wcnss: Fix module autoload
  2016-10-18 21:24 [PATCH 0/3] remoteproc: Fix module autoload for qcom platform drivers Javier Martinez Canillas
  2016-10-18 21:24 ` [PATCH 1/3] remoteproc: qcom: q6v5_pil: Fix module autoload Javier Martinez Canillas
@ 2016-10-18 21:24 ` Javier Martinez Canillas
  2016-10-18 21:24 ` [PATCH 3/3] remoteproc: qcom: wcnss_iris: " Javier Martinez Canillas
  2016-10-18 22:19 ` [PATCH 0/3] remoteproc: Fix module autoload for qcom platform drivers Bjorn Andersson
  3 siblings, 0 replies; 5+ messages in thread
From: Javier Martinez Canillas @ 2016-10-18 21:24 UTC (permalink / raw)
  To: linux-kernel
  Cc: Javier Martinez Canillas, Bjorn Andersson, Ohad Ben-Cohen,
	linux-remoteproc

If the driver is built as a module, autoload won't work because the module
alias information is not filled. So user-space can't match the registered
device with the corresponding module.

Export the module alias information using the MODULE_DEVICE_TABLE() macro.

Before this patch:

$ modinfo drivers/remoteproc/qcom_wcnss.ko | grep alias
$

After this patch:

$ modinfo drivers/remoteproc/qcom_wcnss.ko | grep alias
alias:          of:N*T*Cqcom,pronto-v2-pilC*
alias:          of:N*T*Cqcom,pronto-v2-pil
alias:          of:N*T*Cqcom,pronto-v1-pilC*
alias:          of:N*T*Cqcom,pronto-v1-pil
alias:          of:N*T*Cqcom,riva-pilC*
alias:          of:N*T*Cqcom,riva-pil

Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
---

 drivers/remoteproc/qcom_wcnss.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/remoteproc/qcom_wcnss.c b/drivers/remoteproc/qcom_wcnss.c
index f5cedeaafba1..e5d9de94c1db 100644
--- a/drivers/remoteproc/qcom_wcnss.c
+++ b/drivers/remoteproc/qcom_wcnss.c
@@ -609,6 +609,7 @@ static const struct of_device_id wcnss_of_match[] = {
 	{ .compatible = "qcom,pronto-v2-pil", &pronto_v2_data },
 	{ },
 };
+MODULE_DEVICE_TABLE(of, wcnss_of_match);
 
 static struct platform_driver wcnss_driver = {
 	.probe = wcnss_probe,
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 3/3] remoteproc: qcom: wcnss_iris: Fix module autoload
  2016-10-18 21:24 [PATCH 0/3] remoteproc: Fix module autoload for qcom platform drivers Javier Martinez Canillas
  2016-10-18 21:24 ` [PATCH 1/3] remoteproc: qcom: q6v5_pil: Fix module autoload Javier Martinez Canillas
  2016-10-18 21:24 ` [PATCH 2/3] remoteproc: qcom: wcnss: " Javier Martinez Canillas
@ 2016-10-18 21:24 ` Javier Martinez Canillas
  2016-10-18 22:19 ` [PATCH 0/3] remoteproc: Fix module autoload for qcom platform drivers Bjorn Andersson
  3 siblings, 0 replies; 5+ messages in thread
From: Javier Martinez Canillas @ 2016-10-18 21:24 UTC (permalink / raw)
  To: linux-kernel
  Cc: Javier Martinez Canillas, Bjorn Andersson, Ohad Ben-Cohen,
	linux-remoteproc

If the driver is built as a module, autoload won't work because the module
alias information is not filled. So user-space can't match the registered
device with the corresponding module.

Export the module alias information using the MODULE_DEVICE_TABLE() macro.

Before this patch:

$ modinfo drivers/remoteproc/qcom_wcnss_iris.ko | grep alias
$

After this patch:

$ modinfo drivers/remoteproc/qcom_wcnss_iris.ko | grep alias
alias:          of:N*T*Cqcom,wcn3680C*
alias:          of:N*T*Cqcom,wcn3680
alias:          of:N*T*Cqcom,wcn3660C*
alias:          of:N*T*Cqcom,wcn3660
alias:          of:N*T*Cqcom,wcn3620C*
alias:          of:N*T*Cqcom,wcn3620

Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>

---

 drivers/remoteproc/qcom_wcnss_iris.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/remoteproc/qcom_wcnss_iris.c b/drivers/remoteproc/qcom_wcnss_iris.c
index f0ca24a8dd0b..07ef653cfbdf 100644
--- a/drivers/remoteproc/qcom_wcnss_iris.c
+++ b/drivers/remoteproc/qcom_wcnss_iris.c
@@ -173,6 +173,7 @@ static const struct of_device_id iris_of_match[] = {
 	{ .compatible = "qcom,wcn3680", .data = &wcn3680_data },
 	{}
 };
+MODULE_DEVICE_TABLE(of, iris_of_match);
 
 static struct platform_driver wcnss_driver = {
 	.probe = qcom_iris_probe,
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 0/3] remoteproc: Fix module autoload for qcom platform drivers
  2016-10-18 21:24 [PATCH 0/3] remoteproc: Fix module autoload for qcom platform drivers Javier Martinez Canillas
                   ` (2 preceding siblings ...)
  2016-10-18 21:24 ` [PATCH 3/3] remoteproc: qcom: wcnss_iris: " Javier Martinez Canillas
@ 2016-10-18 22:19 ` Bjorn Andersson
  3 siblings, 0 replies; 5+ messages in thread
From: Bjorn Andersson @ 2016-10-18 22:19 UTC (permalink / raw)
  To: Javier Martinez Canillas; +Cc: linux-kernel, Ohad Ben-Cohen, linux-remoteproc

On Tue 18 Oct 14:24 PDT 2016, Javier Martinez Canillas wrote:

> Hello,
> 
> I noticed that module autoload won't be working in some of the qcom
> remoteproc drivers. This patch series contains the fixes for these.
> 

Thanks for spotting this, applied all three patches.

Regards,
Bjorn

> Best regards,
> Javier
> 
> 
> Javier Martinez Canillas (3):
>   remoteproc: qcom: q6v5_pil: Fix module autoload
>   remoteproc: qcom: wcnss: Fix module autoload
>   remoteproc: qcom: wcnss_iris: Fix module autoload
> 
>  drivers/remoteproc/qcom_q6v5_pil.c   | 1 +
>  drivers/remoteproc/qcom_wcnss.c      | 1 +
>  drivers/remoteproc/qcom_wcnss_iris.c | 1 +
>  3 files changed, 3 insertions(+)
> 
> -- 
> 2.7.4
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-10-18 22:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-18 21:24 [PATCH 0/3] remoteproc: Fix module autoload for qcom platform drivers Javier Martinez Canillas
2016-10-18 21:24 ` [PATCH 1/3] remoteproc: qcom: q6v5_pil: Fix module autoload Javier Martinez Canillas
2016-10-18 21:24 ` [PATCH 2/3] remoteproc: qcom: wcnss: " Javier Martinez Canillas
2016-10-18 21:24 ` [PATCH 3/3] remoteproc: qcom: wcnss_iris: " Javier Martinez Canillas
2016-10-18 22:19 ` [PATCH 0/3] remoteproc: Fix module autoload for qcom platform drivers Bjorn Andersson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox