* [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 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
2 siblings, 0 replies; 5+ messages in thread
From: Javier Martinez Canillas @ 2016-10-19 21:06 UTC (permalink / raw)
To: linux-kernel
Cc: linux-samsung-soc, Chanwoo Choi, linux-pm, Krzysztof Kozlowski,
Javier Martinez Canillas, Kyungmin Park, Kukjin Kim, MyungJoo Ham,
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] 5+ 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 ` Javier Martinez Canillas
2016-10-20 2:24 ` [PATCH 0/4] PM / devfreq: Fix module autoload for platform drivers Chanwoo Choi
2 siblings, 0 replies; 5+ messages in thread
From: Javier Martinez Canillas @ 2016-10-19 21:06 UTC (permalink / raw)
To: linux-kernel
Cc: Javier Martinez Canillas, Kukjin Kim, linux-pm, Chanwoo Choi,
linux-samsung-soc, Kyungmin Park, Krzysztof Kozlowski,
MyungJoo Ham, 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] 5+ messages in thread* Re: [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
2016-10-19 21:06 ` [PATCH 2/4] PM / devfreq: exynos-nocp: Fix module autoload Javier Martinez Canillas
2016-10-19 21:06 ` [PATCH 4/4] PM / devfreq: exynos-ppmu: " Javier Martinez Canillas
@ 2016-10-20 2:24 ` Chanwoo Choi
2 siblings, 0 replies; 5+ messages in thread
From: Chanwoo Choi @ 2016-10-20 2:24 UTC (permalink / raw)
To: Javier Martinez Canillas, linux-kernel
Cc: Kukjin Kim, Heiko Stuebner, linux-pm, linux-samsung-soc,
Kyungmin Park, Krzysztof Kozlowski, MyungJoo Ham, linux-rockchip,
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] 5+ messages in thread