public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
* [PATCH 0/4] PM / devfreq: Fix module autoload for platform drivers
@ 2016-10-19 21:06 ` Javier Martinez Canillas
  2016-10-19 21:06   ` [PATCH 2/4] PM / devfreq: exynos-nocp: Fix module autoload Javier Martinez Canillas
                     ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Javier Martinez Canillas @ 2016-10-19 21:06 UTC (permalink / raw)
  To: linux-arm-kernel

Hello,

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

Best regards,
Javier


Javier Martinez Canillas (4):
  PM / devfreq: rk3399_dmc: Fix module autoload
  PM / devfreq: exynos-nocp: Fix module autoload
  PM / devfreq: rockchip-dfi: Fix module autoload
  PM / devfreq: exynos-ppmu: Fix module autoload

 drivers/devfreq/event/exynos-nocp.c  | 1 +
 drivers/devfreq/event/exynos-ppmu.c  | 1 +
 drivers/devfreq/event/rockchip-dfi.c | 1 +
 drivers/devfreq/rk3399_dmc.c         | 1 +
 4 files changed, 4 insertions(+)

-- 
2.7.4

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

* [PATCH 2/4] PM / devfreq: exynos-nocp: Fix module autoload
  2016-10-19 21:06 ` [PATCH 0/4] PM / devfreq: Fix module autoload for platform drivers Javier Martinez Canillas
@ 2016-10-19 21:06   ` Javier Martinez Canillas
  2016-10-19 21:06   ` [PATCH 3/4] PM / devfreq: rockchip-dfi: " Javier Martinez Canillas
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: Javier Martinez Canillas @ 2016-10-19 21:06 UTC (permalink / raw)
  To: linux-arm-kernel

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/devfreq/event/exynos-nocp.ko | grep alias
$

After this patch:

$ modinfo drivers/devfreq/event/exynos-nocp.ko | grep alias
alias:          of:N*T*Csamsung,exynos5420-nocpC*
alias:          of:N*T*Csamsung,exynos5420-nocp

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

 drivers/devfreq/event/exynos-nocp.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/devfreq/event/exynos-nocp.c b/drivers/devfreq/event/exynos-nocp.c
index 49e712aca0c1..5c3e7b11e8a6 100644
--- a/drivers/devfreq/event/exynos-nocp.c
+++ b/drivers/devfreq/event/exynos-nocp.c
@@ -190,6 +190,7 @@ static const struct of_device_id exynos_nocp_id_match[] = {
 	{ .compatible = "samsung,exynos5420-nocp", },
 	{ /* sentinel */ },
 };
+MODULE_DEVICE_TABLE(of, exynos_nocp_id_match);
 
 static struct regmap_config exynos_nocp_regmap_config = {
 	.reg_bits = 32,
-- 
2.7.4

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

* [PATCH 3/4] PM / devfreq: rockchip-dfi: Fix module autoload
  2016-10-19 21:06 ` [PATCH 0/4] PM / devfreq: Fix module autoload for platform drivers Javier Martinez Canillas
  2016-10-19 21:06   ` [PATCH 2/4] PM / devfreq: exynos-nocp: Fix module autoload Javier Martinez Canillas
@ 2016-10-19 21:06   ` Javier Martinez Canillas
  2016-10-19 21:06   ` [PATCH 4/4] PM / devfreq: exynos-ppmu: " Javier Martinez Canillas
  2016-10-20  2:24   ` [PATCH 0/4] PM / devfreq: Fix module autoload for platform drivers Chanwoo Choi
  3 siblings, 0 replies; 6+ messages in thread
From: Javier Martinez Canillas @ 2016-10-19 21:06 UTC (permalink / raw)
  To: linux-arm-kernel

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/devfreq/event/rockchip-dfi.ko | grep alias
$

After this patch:

$ modinfo drivers/devfreq/event/rockchip-dfi.ko | grep alias
alias:          of:N*T*Crockchip,rk3399-dfiC*
alias:          of:N*T*Crockchip,rk3399-dfi

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

 drivers/devfreq/event/rockchip-dfi.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/devfreq/event/rockchip-dfi.c b/drivers/devfreq/event/rockchip-dfi.c
index 43fcc5a7f515..22b113363ffc 100644
--- a/drivers/devfreq/event/rockchip-dfi.c
+++ b/drivers/devfreq/event/rockchip-dfi.c
@@ -188,6 +188,7 @@ static const struct of_device_id rockchip_dfi_id_match[] = {
 	{ .compatible = "rockchip,rk3399-dfi" },
 	{ },
 };
+MODULE_DEVICE_TABLE(of, rockchip_dfi_id_match);
 
 static int rockchip_dfi_probe(struct platform_device *pdev)
 {
-- 
2.7.4

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

* [PATCH 4/4] PM / devfreq: exynos-ppmu: Fix module autoload
  2016-10-19 21:06 ` [PATCH 0/4] PM / devfreq: Fix module autoload for platform drivers Javier Martinez Canillas
  2016-10-19 21:06   ` [PATCH 2/4] PM / devfreq: exynos-nocp: Fix module autoload Javier Martinez Canillas
  2016-10-19 21:06   ` [PATCH 3/4] PM / devfreq: rockchip-dfi: " Javier Martinez Canillas
@ 2016-10-19 21:06   ` Javier Martinez Canillas
  2016-10-20  2:24   ` [PATCH 0/4] PM / devfreq: Fix module autoload for platform drivers Chanwoo Choi
  3 siblings, 0 replies; 6+ messages in thread
From: Javier Martinez Canillas @ 2016-10-19 21:06 UTC (permalink / raw)
  To: linux-arm-kernel

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/devfreq/event/exynos-ppmu.ko | grep alias
$

After this patch:

$ modinfo drivers/devfreq/event/exynos-ppmu.ko | grep alias
alias:          of:N*T*Csamsung,exynos-ppmu-v2C*
alias:          of:N*T*Csamsung,exynos-ppmu-v2
alias:          of:N*T*Csamsung,exynos-ppmuC*
alias:          of:N*T*Csamsung,exynos-ppmu

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

---

 drivers/devfreq/event/exynos-ppmu.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/devfreq/event/exynos-ppmu.c b/drivers/devfreq/event/exynos-ppmu.c
index f55cf0eb2a66..a112034997eb 100644
--- a/drivers/devfreq/event/exynos-ppmu.c
+++ b/drivers/devfreq/event/exynos-ppmu.c
@@ -351,6 +351,7 @@ static const struct of_device_id exynos_ppmu_id_match[] = {
 	},
 	{ /* sentinel */ },
 };
+MODULE_DEVICE_TABLE(of, exynos_ppmu_id_match);
 
 static struct devfreq_event_ops *exynos_bus_get_ops(struct device_node *np)
 {
-- 
2.7.4

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

* RE: [PATCH 0/4] PM / devfreq: Fix module autoload for platform drivers
       [not found] <CGME20161019210645epcas1p449463edf9c3cb3681b0a4e8116ccf7f2@epcas1p4.samsung.com>
@ 2016-10-20  2:22 ` MyungJoo Ham
  0 siblings, 0 replies; 6+ messages in thread
From: MyungJoo Ham @ 2016-10-20  2:22 UTC (permalink / raw)
  To: linux-arm-kernel

> Hello,
> 
> I noticed that module autoload won't be working in some of the defreq
> platform drivers. This patch series contains the fixes for these.
> 
> Best regards,
> Javier
> 
> 
> Javier Martinez Canillas (4):
>   PM / devfreq: rk3399_dmc: Fix module autoload
>   PM / devfreq: exynos-nocp: Fix module autoload
>   PM / devfreq: rockchip-dfi: Fix module autoload
>   PM / devfreq: exynos-ppmu: Fix module autoload

Acked-by: MyungJoo Ham <myungjoo.ham@samsung•com>

All the four are not at for-4.9-rc branch.
https://git.kernel.org/cgit/linux/kernel/git/mzx/devfreq.git/log/?h=for-4.9-rc


Cheers,
MyungJoo

> 
>  drivers/devfreq/event/exynos-nocp.c  | 1 +
>  drivers/devfreq/event/exynos-ppmu.c  | 1 +
>  drivers/devfreq/event/rockchip-dfi.c | 1 +
>  drivers/devfreq/rk3399_dmc.c         | 1 +
>  4 files changed, 4 insertions(+)
> 
> -- 
> 2.7.4

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

* [PATCH 0/4] PM / devfreq: Fix module autoload for platform drivers
  2016-10-19 21:06 ` [PATCH 0/4] PM / devfreq: Fix module autoload for platform drivers Javier Martinez Canillas
                     ` (2 preceding siblings ...)
  2016-10-19 21:06   ` [PATCH 4/4] PM / devfreq: exynos-ppmu: " Javier Martinez Canillas
@ 2016-10-20  2:24   ` Chanwoo Choi
  3 siblings, 0 replies; 6+ messages in thread
From: Chanwoo Choi @ 2016-10-20  2:24 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Javier,

On 2016? 10? 20? 06:06, Javier Martinez Canillas wrote:
> Hello,
> 
> I noticed that module autoload won't be working in some of the defreq
> platform drivers. This patch series contains the fixes for these.
> 
> Best regards,
> Javier
> 
> 
> Javier Martinez Canillas (4):
>   PM / devfreq: rk3399_dmc: Fix module autoload
>   PM / devfreq: exynos-nocp: Fix module autoload
>   PM / devfreq: rockchip-dfi: Fix module autoload
>   PM / devfreq: exynos-ppmu: Fix module autoload
> 
>  drivers/devfreq/event/exynos-nocp.c  | 1 +
>  drivers/devfreq/event/exynos-ppmu.c  | 1 +
>  drivers/devfreq/event/rockchip-dfi.c | 1 +
>  drivers/devfreq/rk3399_dmc.c         | 1 +
>  4 files changed, 4 insertions(+)
> 

Looks good to me of all patches.

Reviewed-by: Chanwoo Choi <cw00.choi@samsung•com>

-- 
Best Regards,
Chanwoo Choi

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

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

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <CGME20161019210649epcas1p4e0c178cb75709bb242da10d9c1fd77d2@epcas1p4.samsung.com>
2016-10-19 21:06 ` [PATCH 0/4] PM / devfreq: Fix module autoload for platform drivers Javier Martinez Canillas
2016-10-19 21:06   ` [PATCH 2/4] PM / devfreq: exynos-nocp: Fix module autoload Javier Martinez Canillas
2016-10-19 21:06   ` [PATCH 3/4] PM / devfreq: rockchip-dfi: " Javier Martinez Canillas
2016-10-19 21:06   ` [PATCH 4/4] PM / devfreq: exynos-ppmu: " Javier Martinez Canillas
2016-10-20  2:24   ` [PATCH 0/4] PM / devfreq: Fix module autoload for platform drivers Chanwoo Choi
     [not found] <CGME20161019210645epcas1p449463edf9c3cb3681b0a4e8116ccf7f2@epcas1p4.samsung.com>
2016-10-20  2:22 ` MyungJoo Ham

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