2020-11-03 15:16:33

by Pali Rohár

[permalink] [raw]
Subject: [PATCH 0/9] cpufreq: Add missing modalias for tristate drivers

Some of cpufreq drivers are tristate, can be compiled as modules, but do
not have defined modalias for automatic loading. This patch series add
for all those cpufreq drivers missing MODULE_DEVICE_TABLE macro, based
on OF definitions, or MODULE_ALIAS for platform drivers.

MODULE_DEVICE_TABLE is not explictily added only for speedstep-centrino,
speedstep-ich and speedstep-smi drivers as it was removed in commit
b11d77fa300d9 ("cpufreq: Convert to new X86 CPU match macros").

Pali Rohár (9):
cpufreq: ap806: Add missing MODULE_DEVICE_TABLE
cpufreq: highbank: Add missing MODULE_DEVICE_TABLE
cpufreq: mediatek: Add missing MODULE_DEVICE_TABLE
cpufreq: qcom: Add missing MODULE_DEVICE_TABLE
cpufreq: st: Add missing MODULE_DEVICE_TABLE
cpufreq: sun50i: Add missing MODULE_DEVICE_TABLE
cpufreq: loongson1: Add missing MODULE_ALIAS
cpufreq: scpi: Add missing MODULE_ALIAS
cpufreq: vexpress-spc: Add missing MODULE_ALIAS

drivers/cpufreq/armada-8k-cpufreq.c | 6 ++++++
drivers/cpufreq/highbank-cpufreq.c | 7 +++++++
drivers/cpufreq/loongson1-cpufreq.c | 1 +
drivers/cpufreq/mediatek-cpufreq.c | 1 +
drivers/cpufreq/qcom-cpufreq-nvmem.c | 1 +
drivers/cpufreq/scpi-cpufreq.c | 1 +
drivers/cpufreq/sti-cpufreq.c | 7 +++++++
drivers/cpufreq/sun50i-cpufreq-nvmem.c | 1 +
drivers/cpufreq/vexpress-spc-cpufreq.c | 1 +
9 files changed, 26 insertions(+)

--
2.20.1


2020-11-03 15:17:47

by Pali Rohár

[permalink] [raw]
Subject: [PATCH 3/9] cpufreq: mediatek: Add missing MODULE_DEVICE_TABLE

This patch adds missing MODULE_DEVICE_TABLE definition which generates
correct modalias for automatic loading of this cpufreq driver when it is
compiled as an external module.

Signed-off-by: Pali Rohár <[email protected]>
Fixes: 501c574f4e3a5 ("cpufreq: mediatek: Add support of cpufreq to MT2701/MT7623 SoC")
---
drivers/cpufreq/mediatek-cpufreq.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/cpufreq/mediatek-cpufreq.c b/drivers/cpufreq/mediatek-cpufreq.c
index 7d1212c9b7c8..a310372dc53e 100644
--- a/drivers/cpufreq/mediatek-cpufreq.c
+++ b/drivers/cpufreq/mediatek-cpufreq.c
@@ -540,6 +540,7 @@ static const struct of_device_id mtk_cpufreq_machines[] __initconst = {

{ }
};
+MODULE_DEVICE_TABLE(of, mtk_cpufreq_machines);

static int __init mtk_cpufreq_driver_init(void)
{
--
2.20.1

2020-11-03 15:18:26

by Pali Rohár

[permalink] [raw]
Subject: [PATCH 6/9] cpufreq: sun50i: Add missing MODULE_DEVICE_TABLE

This patch adds missing MODULE_DEVICE_TABLE definition which generates
correct modalias for automatic loading of this cpufreq driver when it is
compiled as an external module.

Signed-off-by: Pali Rohár <[email protected]>
Fixes: f328584f7bff8 ("cpufreq: Add sun50i nvmem based CPU scaling driver")
---
drivers/cpufreq/sun50i-cpufreq-nvmem.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/cpufreq/sun50i-cpufreq-nvmem.c b/drivers/cpufreq/sun50i-cpufreq-nvmem.c
index 9907a165135b..2deed8d8773f 100644
--- a/drivers/cpufreq/sun50i-cpufreq-nvmem.c
+++ b/drivers/cpufreq/sun50i-cpufreq-nvmem.c
@@ -167,6 +167,7 @@ static const struct of_device_id sun50i_cpufreq_match_list[] = {
{ .compatible = "allwinner,sun50i-h6" },
{}
};
+MODULE_DEVICE_TABLE(of, sun50i_cpufreq_match_list);

static const struct of_device_id *sun50i_cpufreq_match_node(void)
{
--
2.20.1

2020-11-09 14:20:06

by Rafael J. Wysocki

[permalink] [raw]
Subject: Re: [PATCH 0/9] cpufreq: Add missing modalias for tristate drivers

On Tue, Nov 3, 2020 at 4:14 PM Pali Rohár <[email protected]> wrote:
>
> Some of cpufreq drivers are tristate, can be compiled as modules, but do
> not have defined modalias for automatic loading. This patch series add
> for all those cpufreq drivers missing MODULE_DEVICE_TABLE macro, based
> on OF definitions, or MODULE_ALIAS for platform drivers.
>
> MODULE_DEVICE_TABLE is not explictily added only for speedstep-centrino,
> speedstep-ich and speedstep-smi drivers as it was removed in commit
> b11d77fa300d9 ("cpufreq: Convert to new X86 CPU match macros").
>
> Pali Rohár (9):
> cpufreq: ap806: Add missing MODULE_DEVICE_TABLE
> cpufreq: highbank: Add missing MODULE_DEVICE_TABLE
> cpufreq: mediatek: Add missing MODULE_DEVICE_TABLE
> cpufreq: qcom: Add missing MODULE_DEVICE_TABLE
> cpufreq: st: Add missing MODULE_DEVICE_TABLE
> cpufreq: sun50i: Add missing MODULE_DEVICE_TABLE
> cpufreq: loongson1: Add missing MODULE_ALIAS
> cpufreq: scpi: Add missing MODULE_ALIAS
> cpufreq: vexpress-spc: Add missing MODULE_ALIAS
>
> drivers/cpufreq/armada-8k-cpufreq.c | 6 ++++++
> drivers/cpufreq/highbank-cpufreq.c | 7 +++++++
> drivers/cpufreq/loongson1-cpufreq.c | 1 +
> drivers/cpufreq/mediatek-cpufreq.c | 1 +
> drivers/cpufreq/qcom-cpufreq-nvmem.c | 1 +
> drivers/cpufreq/scpi-cpufreq.c | 1 +
> drivers/cpufreq/sti-cpufreq.c | 7 +++++++
> drivers/cpufreq/sun50i-cpufreq-nvmem.c | 1 +
> drivers/cpufreq/vexpress-spc-cpufreq.c | 1 +
> 9 files changed, 26 insertions(+)
>
> --

Viresh, any comments?

2020-11-10 02:38:55

by Viresh Kumar

[permalink] [raw]
Subject: Re: [PATCH 0/9] cpufreq: Add missing modalias for tristate drivers

On 09-11-20, 15:18, Rafael J. Wysocki wrote:
> On Tue, Nov 3, 2020 at 4:14 PM Pali Roh?r <[email protected]> wrote:
> >
> > Some of cpufreq drivers are tristate, can be compiled as modules, but do
> > not have defined modalias for automatic loading. This patch series add
> > for all those cpufreq drivers missing MODULE_DEVICE_TABLE macro, based
> > on OF definitions, or MODULE_ALIAS for platform drivers.
> >
> > MODULE_DEVICE_TABLE is not explictily added only for speedstep-centrino,
> > speedstep-ich and speedstep-smi drivers as it was removed in commit
> > b11d77fa300d9 ("cpufreq: Convert to new X86 CPU match macros").
> >
> > Pali Roh?r (9):
> > cpufreq: ap806: Add missing MODULE_DEVICE_TABLE
> > cpufreq: highbank: Add missing MODULE_DEVICE_TABLE
> > cpufreq: mediatek: Add missing MODULE_DEVICE_TABLE
> > cpufreq: qcom: Add missing MODULE_DEVICE_TABLE
> > cpufreq: st: Add missing MODULE_DEVICE_TABLE
> > cpufreq: sun50i: Add missing MODULE_DEVICE_TABLE
> > cpufreq: loongson1: Add missing MODULE_ALIAS
> > cpufreq: scpi: Add missing MODULE_ALIAS
> > cpufreq: vexpress-spc: Add missing MODULE_ALIAS
> >
> > drivers/cpufreq/armada-8k-cpufreq.c | 6 ++++++
> > drivers/cpufreq/highbank-cpufreq.c | 7 +++++++
> > drivers/cpufreq/loongson1-cpufreq.c | 1 +
> > drivers/cpufreq/mediatek-cpufreq.c | 1 +
> > drivers/cpufreq/qcom-cpufreq-nvmem.c | 1 +
> > drivers/cpufreq/scpi-cpufreq.c | 1 +
> > drivers/cpufreq/sti-cpufreq.c | 7 +++++++
> > drivers/cpufreq/sun50i-cpufreq-nvmem.c | 1 +
> > drivers/cpufreq/vexpress-spc-cpufreq.c | 1 +
> > 9 files changed, 26 insertions(+)
> >
> > --
>
> Viresh, any comments?

I found the patches to be fine and marked it to be applied soon in mutt. I was
waiting for the maintainers of the drivers to respond, after that I would have
applied it for 5.11.

--
viresh

2020-11-10 02:46:11

by Frank Lee

[permalink] [raw]
Subject: Re: [PATCH 6/9] cpufreq: sun50i: Add missing MODULE_DEVICE_TABLE

On Tue, Nov 3, 2020 at 11:14 PM Pali Rohár <[email protected]> wrote:
>
> This patch adds missing MODULE_DEVICE_TABLE definition which generates
> correct modalias for automatic loading of this cpufreq driver when it is
> compiled as an external module.
>
> Signed-off-by: Pali Rohár <[email protected]>
> Fixes: f328584f7bff8 ("cpufreq: Add sun50i nvmem based CPU scaling driver")
> ---
> drivers/cpufreq/sun50i-cpufreq-nvmem.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/cpufreq/sun50i-cpufreq-nvmem.c b/drivers/cpufreq/sun50i-cpufreq-nvmem.c
> index 9907a165135b..2deed8d8773f 100644
> --- a/drivers/cpufreq/sun50i-cpufreq-nvmem.c
> +++ b/drivers/cpufreq/sun50i-cpufreq-nvmem.c
> @@ -167,6 +167,7 @@ static const struct of_device_id sun50i_cpufreq_match_list[] = {
> { .compatible = "allwinner,sun50i-h6" },
> {}
> };
> +MODULE_DEVICE_TABLE(of, sun50i_cpufreq_match_list);

Reviewed-by: Yangtao Li <[email protected]>

Thx!

2020-11-10 12:43:21

by Rafael J. Wysocki

[permalink] [raw]
Subject: Re: [PATCH 0/9] cpufreq: Add missing modalias for tristate drivers

On Tue, Nov 10, 2020 at 3:35 AM Viresh Kumar <[email protected]> wrote:
>
> On 09-11-20, 15:18, Rafael J. Wysocki wrote:
> > On Tue, Nov 3, 2020 at 4:14 PM Pali Rohár <[email protected]> wrote:
> > >
> > > Some of cpufreq drivers are tristate, can be compiled as modules, but do
> > > not have defined modalias for automatic loading. This patch series add
> > > for all those cpufreq drivers missing MODULE_DEVICE_TABLE macro, based
> > > on OF definitions, or MODULE_ALIAS for platform drivers.
> > >
> > > MODULE_DEVICE_TABLE is not explictily added only for speedstep-centrino,
> > > speedstep-ich and speedstep-smi drivers as it was removed in commit
> > > b11d77fa300d9 ("cpufreq: Convert to new X86 CPU match macros").
> > >
> > > Pali Rohár (9):
> > > cpufreq: ap806: Add missing MODULE_DEVICE_TABLE
> > > cpufreq: highbank: Add missing MODULE_DEVICE_TABLE
> > > cpufreq: mediatek: Add missing MODULE_DEVICE_TABLE
> > > cpufreq: qcom: Add missing MODULE_DEVICE_TABLE
> > > cpufreq: st: Add missing MODULE_DEVICE_TABLE
> > > cpufreq: sun50i: Add missing MODULE_DEVICE_TABLE
> > > cpufreq: loongson1: Add missing MODULE_ALIAS
> > > cpufreq: scpi: Add missing MODULE_ALIAS
> > > cpufreq: vexpress-spc: Add missing MODULE_ALIAS
> > >
> > > drivers/cpufreq/armada-8k-cpufreq.c | 6 ++++++
> > > drivers/cpufreq/highbank-cpufreq.c | 7 +++++++
> > > drivers/cpufreq/loongson1-cpufreq.c | 1 +
> > > drivers/cpufreq/mediatek-cpufreq.c | 1 +
> > > drivers/cpufreq/qcom-cpufreq-nvmem.c | 1 +
> > > drivers/cpufreq/scpi-cpufreq.c | 1 +
> > > drivers/cpufreq/sti-cpufreq.c | 7 +++++++
> > > drivers/cpufreq/sun50i-cpufreq-nvmem.c | 1 +
> > > drivers/cpufreq/vexpress-spc-cpufreq.c | 1 +
> > > 9 files changed, 26 insertions(+)
> > >
> > > --
> >
> > Viresh, any comments?
>
> I found the patches to be fine and marked it to be applied soon in mutt. I was
> waiting for the maintainers of the drivers to respond, after that I would have
> applied it for 5.11.

OK, so please take all of them then (some of them are not ARM-related AFAICS).

2020-11-11 06:03:22

by Viresh Kumar

[permalink] [raw]
Subject: Re: [PATCH 0/9] cpufreq: Add missing modalias for tristate drivers

On 03-11-20, 16:11, Pali Roh?r wrote:
> Some of cpufreq drivers are tristate, can be compiled as modules, but do
> not have defined modalias for automatic loading. This patch series add
> for all those cpufreq drivers missing MODULE_DEVICE_TABLE macro, based
> on OF definitions, or MODULE_ALIAS for platform drivers.
>
> MODULE_DEVICE_TABLE is not explictily added only for speedstep-centrino,
> speedstep-ich and speedstep-smi drivers as it was removed in commit
> b11d77fa300d9 ("cpufreq: Convert to new X86 CPU match macros").
>
> Pali Roh?r (9):
> cpufreq: ap806: Add missing MODULE_DEVICE_TABLE
> cpufreq: highbank: Add missing MODULE_DEVICE_TABLE
> cpufreq: mediatek: Add missing MODULE_DEVICE_TABLE
> cpufreq: qcom: Add missing MODULE_DEVICE_TABLE
> cpufreq: st: Add missing MODULE_DEVICE_TABLE
> cpufreq: sun50i: Add missing MODULE_DEVICE_TABLE
> cpufreq: loongson1: Add missing MODULE_ALIAS
> cpufreq: scpi: Add missing MODULE_ALIAS
> cpufreq: vexpress-spc: Add missing MODULE_ALIAS
>
> drivers/cpufreq/armada-8k-cpufreq.c | 6 ++++++
> drivers/cpufreq/highbank-cpufreq.c | 7 +++++++
> drivers/cpufreq/loongson1-cpufreq.c | 1 +
> drivers/cpufreq/mediatek-cpufreq.c | 1 +
> drivers/cpufreq/qcom-cpufreq-nvmem.c | 1 +
> drivers/cpufreq/scpi-cpufreq.c | 1 +
> drivers/cpufreq/sti-cpufreq.c | 7 +++++++
> drivers/cpufreq/sun50i-cpufreq-nvmem.c | 1 +
> drivers/cpufreq/vexpress-spc-cpufreq.c | 1 +
> 9 files changed, 26 insertions(+)

Applied. Thanks.

--
viresh