linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drivers: qcom: spm: avoid module usage in non-modular SPM driver
@ 2016-01-04 17:15 Lina Iyer
  2016-01-04 17:30 ` Paul Gortmaker
  0 siblings, 1 reply; 6+ messages in thread
From: Lina Iyer @ 2016-01-04 17:15 UTC (permalink / raw)
  To: andy.gross, sboyd; +Cc: linux-pm, linux-arm-msm, Lina Iyer, Paul Gortmaker

SPM driver provides cpuidle support on some QC SoC's. The functionality
is non-modular and there is no need for module support. Convert module
platform init to builtin platform driver init. The driver functionality
is not affected by this change.

Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Lina Iyer <lina.iyer@linaro.org>
---
 drivers/soc/qcom/spm.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/soc/qcom/spm.c b/drivers/soc/qcom/spm.c
index b04b05a..199c085 100644
--- a/drivers/soc/qcom/spm.c
+++ b/drivers/soc/qcom/spm.c
@@ -12,7 +12,6 @@
  * GNU General Public License for more details.
  */
 
-#include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/io.h>
@@ -378,8 +377,4 @@ static struct platform_driver spm_driver = {
 		.of_match_table = spm_match_table,
 	},
 };
-module_platform_driver(spm_driver);
-
-MODULE_LICENSE("GPL v2");
-MODULE_DESCRIPTION("SAW power controller driver");
-MODULE_ALIAS("platform:saw");
+builtin_platform_driver(spm_driver);
-- 
2.1.4


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

* Re: [PATCH] drivers: qcom: spm: avoid module usage in non-modular SPM driver
  2016-01-04 17:15 [PATCH] drivers: qcom: spm: avoid module usage in non-modular SPM driver Lina Iyer
@ 2016-01-04 17:30 ` Paul Gortmaker
  2016-01-04 17:40   ` Lina Iyer
  0 siblings, 1 reply; 6+ messages in thread
From: Paul Gortmaker @ 2016-01-04 17:30 UTC (permalink / raw)
  To: Lina Iyer; +Cc: andy.gross, sboyd, linux-pm, linux-arm-msm

[[PATCH] drivers: qcom: spm: avoid module usage in non-modular SPM driver] On 04/01/2016 (Mon 10:15) Lina Iyer wrote:

> SPM driver provides cpuidle support on some QC SoC's. The functionality
> is non-modular and there is no need for module support. Convert module
> platform init to builtin platform driver init. The driver functionality
> is not affected by this change.
> 
> Cc: Paul Gortmaker <paul.gortmaker@windriver.com>

I have a similar patch locally that I'd not sent yet, the only
difference is that I moved the description tag to the top of the file
since there wasn't a description therei, i.e. this chunk:

diff --git a/drivers/soc/qcom/spm.c b/drivers/soc/qcom/spm.c
index b04b05a0904e..9e06a241257f 100644
--- a/drivers/soc/qcom/spm.c
+++ b/drivers/soc/qcom/spm.c
@@ -2,6 +2,8 @@
  * Copyright (c) 2011-2014, The Linux Foundation. All rights reserved.
  * Copyright (c) 2014,2015, Linaro Ltd.
  *
+ * SAW power controller driver
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 and
  * only version 2 as published by the Free Software Foundation.


Paul.
--

> Signed-off-by: Lina Iyer <lina.iyer@linaro.org>
> ---
>  drivers/soc/qcom/spm.c | 7 +------
>  1 file changed, 1 insertion(+), 6 deletions(-)
> 
> diff --git a/drivers/soc/qcom/spm.c b/drivers/soc/qcom/spm.c
> index b04b05a..199c085 100644
> --- a/drivers/soc/qcom/spm.c
> +++ b/drivers/soc/qcom/spm.c
> @@ -12,7 +12,6 @@
>   * GNU General Public License for more details.
>   */
>  
> -#include <linux/module.h>
>  #include <linux/kernel.h>
>  #include <linux/init.h>
>  #include <linux/io.h>
> @@ -378,8 +377,4 @@ static struct platform_driver spm_driver = {
>  		.of_match_table = spm_match_table,
>  	},
>  };
> -module_platform_driver(spm_driver);
> -
> -MODULE_LICENSE("GPL v2");
> -MODULE_DESCRIPTION("SAW power controller driver");
> -MODULE_ALIAS("platform:saw");
> +builtin_platform_driver(spm_driver);
> -- 
> 2.1.4
> 

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

* Re: [PATCH] drivers: qcom: spm: avoid module usage in non-modular SPM driver
  2016-01-04 17:30 ` Paul Gortmaker
@ 2016-01-04 17:40   ` Lina Iyer
  2016-01-04 17:52     ` Paul Gortmaker
  0 siblings, 1 reply; 6+ messages in thread
From: Lina Iyer @ 2016-01-04 17:40 UTC (permalink / raw)
  To: Paul Gortmaker; +Cc: andy.gross, sboyd, linux-pm, linux-arm-msm

On Mon, Jan 04 2016 at 10:30 -0700, Paul Gortmaker wrote:
>[[PATCH] drivers: qcom: spm: avoid module usage in non-modular SPM driver] On 04/01/2016 (Mon 10:15) Lina Iyer wrote:
>
>> SPM driver provides cpuidle support on some QC SoC's. The functionality
>> is non-modular and there is no need for module support. Convert module
>> platform init to builtin platform driver init. The driver functionality
>> is not affected by this change.
>>
>> Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
>
>I have a similar patch locally that I'd not sent yet, the only
>difference is that I moved the description tag to the top of the file
>since there wasn't a description therei, i.e. this chunk:
>
>diff --git a/drivers/soc/qcom/spm.c b/drivers/soc/qcom/spm.c
>index b04b05a0904e..9e06a241257f 100644
>--- a/drivers/soc/qcom/spm.c
>+++ b/drivers/soc/qcom/spm.c
>@@ -2,6 +2,8 @@
>  * Copyright (c) 2011-2014, The Linux Foundation. All rights reserved.
>  * Copyright (c) 2014,2015, Linaro Ltd.
>  *
>+ * SAW power controller driver
>+ *
Makes sense.

I can add this to my patch and resend if thats OK with you?

-- Lina

>  * This program is free software; you can redistribute it and/or modify
>  * it under the terms of the GNU General Public License version 2 and
>  * only version 2 as published by the Free Software Foundation.
>
>
>Paul.
>--
>
>> Signed-off-by: Lina Iyer <lina.iyer@linaro.org>
>> ---
>>  drivers/soc/qcom/spm.c | 7 +------
>>  1 file changed, 1 insertion(+), 6 deletions(-)
>>
>> diff --git a/drivers/soc/qcom/spm.c b/drivers/soc/qcom/spm.c
>> index b04b05a..199c085 100644
>> --- a/drivers/soc/qcom/spm.c
>> +++ b/drivers/soc/qcom/spm.c
>> @@ -12,7 +12,6 @@
>>   * GNU General Public License for more details.
>>   */
>>
>> -#include <linux/module.h>
>>  #include <linux/kernel.h>
>>  #include <linux/init.h>
>>  #include <linux/io.h>
>> @@ -378,8 +377,4 @@ static struct platform_driver spm_driver = {
>>  		.of_match_table = spm_match_table,
>>  	},
>>  };
>> -module_platform_driver(spm_driver);
>> -
>> -MODULE_LICENSE("GPL v2");
>> -MODULE_DESCRIPTION("SAW power controller driver");
>> -MODULE_ALIAS("platform:saw");
>> +builtin_platform_driver(spm_driver);
>> --
>> 2.1.4
>>

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

* Re: [PATCH] drivers: qcom: spm: avoid module usage in non-modular SPM driver
  2016-01-04 17:40   ` Lina Iyer
@ 2016-01-04 17:52     ` Paul Gortmaker
  2016-01-04 18:02       ` Lina Iyer
  0 siblings, 1 reply; 6+ messages in thread
From: Paul Gortmaker @ 2016-01-04 17:52 UTC (permalink / raw)
  To: Lina Iyer; +Cc: andy.gross, sboyd, linux-pm, linux-arm-msm

[Re: [PATCH] drivers: qcom: spm: avoid module usage in non-modular SPM driver] On 04/01/2016 (Mon 10:40) Lina Iyer wrote:

> On Mon, Jan 04 2016 at 10:30 -0700, Paul Gortmaker wrote:
> >[[PATCH] drivers: qcom: spm: avoid module usage in non-modular SPM driver] On 04/01/2016 (Mon 10:15) Lina Iyer wrote:
> >
> >>SPM driver provides cpuidle support on some QC SoC's. The functionality
> >>is non-modular and there is no need for module support. Convert module
> >>platform init to builtin platform driver init. The driver functionality
> >>is not affected by this change.
> >>
> >>Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
> >
> >I have a similar patch locally that I'd not sent yet, the only
> >difference is that I moved the description tag to the top of the file
> >since there wasn't a description there, i.e. this chunk:
> >
> >diff --git a/drivers/soc/qcom/spm.c b/drivers/soc/qcom/spm.c
> >index b04b05a0904e..9e06a241257f 100644
> >--- a/drivers/soc/qcom/spm.c
> >+++ b/drivers/soc/qcom/spm.c
> >@@ -2,6 +2,8 @@
> > * Copyright (c) 2011-2014, The Linux Foundation. All rights reserved.
> > * Copyright (c) 2014,2015, Linaro Ltd.
> > *
> >+ * SAW power controller driver
> >+ *
> Makes sense.
> 
> I can add this to my patch and resend if thats OK with you?

Sure, go ahead and add an Acked by if you want to.  I'll just drop it
from my queue when I see yours added and appear in linux-next.

Looking at my queue, there are still two others in SOC I'll need to send
eventually:

drivers-soc-make-sunxi_sram.c-explicitly-non-modular.patch
drivers-soc-tegra-make-fuse-tegra.c-explicitly-non-m.patch

...and there are lots of others that I need to do a final review and test
on before sending, so one less here and there is definitely welcome.

Thanks,
Paul.
--

> 
> -- Lina
> 
> > * This program is free software; you can redistribute it and/or modify
> > * it under the terms of the GNU General Public License version 2 and
> > * only version 2 as published by the Free Software Foundation.
> >
> >
> >Paul.
> >--
> >
> >>Signed-off-by: Lina Iyer <lina.iyer@linaro.org>
> >>---
> >> drivers/soc/qcom/spm.c | 7 +------
> >> 1 file changed, 1 insertion(+), 6 deletions(-)
> >>
> >>diff --git a/drivers/soc/qcom/spm.c b/drivers/soc/qcom/spm.c
> >>index b04b05a..199c085 100644
> >>--- a/drivers/soc/qcom/spm.c
> >>+++ b/drivers/soc/qcom/spm.c
> >>@@ -12,7 +12,6 @@
> >>  * GNU General Public License for more details.
> >>  */
> >>
> >>-#include <linux/module.h>
> >> #include <linux/kernel.h>
> >> #include <linux/init.h>
> >> #include <linux/io.h>
> >>@@ -378,8 +377,4 @@ static struct platform_driver spm_driver = {
> >> 		.of_match_table = spm_match_table,
> >> 	},
> >> };
> >>-module_platform_driver(spm_driver);
> >>-
> >>-MODULE_LICENSE("GPL v2");
> >>-MODULE_DESCRIPTION("SAW power controller driver");
> >>-MODULE_ALIAS("platform:saw");
> >>+builtin_platform_driver(spm_driver);
> >>--
> >>2.1.4
> >>

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

* Re: [PATCH] drivers: qcom: spm: avoid module usage in non-modular SPM driver
  2016-01-04 17:52     ` Paul Gortmaker
@ 2016-01-04 18:02       ` Lina Iyer
  2016-01-04 18:30         ` Paul Gortmaker
  0 siblings, 1 reply; 6+ messages in thread
From: Lina Iyer @ 2016-01-04 18:02 UTC (permalink / raw)
  To: Paul Gortmaker; +Cc: andy.gross, sboyd, linux-pm, linux-arm-msm

On Mon, Jan 04 2016 at 10:52 -0700, Paul Gortmaker wrote:
>[Re: [PATCH] drivers: qcom: spm: avoid module usage in non-modular SPM driver] On 04/01/2016 (Mon 10:40) Lina Iyer wrote:
>
>> On Mon, Jan 04 2016 at 10:30 -0700, Paul Gortmaker wrote:
>> >[[PATCH] drivers: qcom: spm: avoid module usage in non-modular SPM driver] On 04/01/2016 (Mon 10:15) Lina Iyer wrote:
>> >
>> >>SPM driver provides cpuidle support on some QC SoC's. The functionality
>> >>is non-modular and there is no need for module support. Convert module
>> >>platform init to builtin platform driver init. The driver functionality
>> >>is not affected by this change.
>> >>
>> >>Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
>> >
>> >I have a similar patch locally that I'd not sent yet, the only
>> >difference is that I moved the description tag to the top of the file
>> >since there wasn't a description there, i.e. this chunk:
>> >
>> >diff --git a/drivers/soc/qcom/spm.c b/drivers/soc/qcom/spm.c
>> >index b04b05a0904e..9e06a241257f 100644
>> >--- a/drivers/soc/qcom/spm.c
>> >+++ b/drivers/soc/qcom/spm.c
>> >@@ -2,6 +2,8 @@
>> > * Copyright (c) 2011-2014, The Linux Foundation. All rights reserved.
>> > * Copyright (c) 2014,2015, Linaro Ltd.
>> > *
>> >+ * SAW power controller driver
>> >+ *
>> Makes sense.
>>
>> I can add this to my patch and resend if thats OK with you?
>
>Sure, go ahead and add an Acked by if you want to.  I'll just drop it
>from my queue when I see yours added and appear in linux-next.
>
>Looking at my queue, there are still two others in SOC I'll need to send
>eventually:
>
>drivers-soc-make-sunxi_sram.c-explicitly-non-modular.patch
>drivers-soc-tegra-make-fuse-tegra.c-explicitly-non-m.patch
>
>...and there are lots of others that I need to do a final review and test
>on before sending, so one less here and there is definitely welcome.
>
I figured if you are making changes to drivers, then you would do it for
SPM but it needs to be tested out. I tested it out on a IFC6540 Dragonboard.

Thanks.

-- Lina

>Thanks,
>Paul.
>--
>
>>
>> -- Lina
>>
>> > * This program is free software; you can redistribute it and/or modify
>> > * it under the terms of the GNU General Public License version 2 and
>> > * only version 2 as published by the Free Software Foundation.
>> >
>> >
>> >Paul.
>> >--
>> >
>> >>Signed-off-by: Lina Iyer <lina.iyer@linaro.org>
>> >>---
>> >> drivers/soc/qcom/spm.c | 7 +------
>> >> 1 file changed, 1 insertion(+), 6 deletions(-)
>> >>
>> >>diff --git a/drivers/soc/qcom/spm.c b/drivers/soc/qcom/spm.c
>> >>index b04b05a..199c085 100644
>> >>--- a/drivers/soc/qcom/spm.c
>> >>+++ b/drivers/soc/qcom/spm.c
>> >>@@ -12,7 +12,6 @@
>> >>  * GNU General Public License for more details.
>> >>  */
>> >>
>> >>-#include <linux/module.h>
>> >> #include <linux/kernel.h>
>> >> #include <linux/init.h>
>> >> #include <linux/io.h>
>> >>@@ -378,8 +377,4 @@ static struct platform_driver spm_driver = {
>> >> 		.of_match_table = spm_match_table,
>> >> 	},
>> >> };
>> >>-module_platform_driver(spm_driver);
>> >>-
>> >>-MODULE_LICENSE("GPL v2");
>> >>-MODULE_DESCRIPTION("SAW power controller driver");
>> >>-MODULE_ALIAS("platform:saw");
>> >>+builtin_platform_driver(spm_driver);
>> >>--
>> >>2.1.4
>> >>

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

* Re: [PATCH] drivers: qcom: spm: avoid module usage in non-modular SPM driver
  2016-01-04 18:02       ` Lina Iyer
@ 2016-01-04 18:30         ` Paul Gortmaker
  0 siblings, 0 replies; 6+ messages in thread
From: Paul Gortmaker @ 2016-01-04 18:30 UTC (permalink / raw)
  To: Lina Iyer; +Cc: andy.gross, sboyd, linux-pm, linux-arm-msm

[Re: [PATCH] drivers: qcom: spm: avoid module usage in non-modular SPM driver] On 04/01/2016 (Mon 11:02) Lina Iyer wrote:

> On Mon, Jan 04 2016 at 10:52 -0700, Paul Gortmaker wrote:

[...]

> >Looking at my queue, there are still two others in SOC I'll need to send
> >eventually:
> >
> >drivers-soc-make-sunxi_sram.c-explicitly-non-modular.patch
> >drivers-soc-tegra-make-fuse-tegra.c-explicitly-non-m.patch
> >
> >...and there are lots of others that I need to do a final review and test
> >on before sending, so one less here and there is definitely welcome.
> >
> I figured if you are making changes to drivers, then you would do it for
> SPM but it needs to be tested out. I tested it out on a IFC6540 Dragonboard.

Well, if the compiled code is invariant due to substitution of
equivalent macros as it is in this case, then compile testing for any
fat finger issues is sufficient, as the run time will be invariant.

But thanks for testing it regardless.

Paul.
--

> 
> Thanks.
> 
> -- Lina
> 
> >Thanks,
> >Paul.
> >--
> >
> >>
> >>-- Lina
> >>
> >>> * This program is free software; you can redistribute it and/or modify
> >>> * it under the terms of the GNU General Public License version 2 and
> >>> * only version 2 as published by the Free Software Foundation.
> >>>
> >>>
> >>>Paul.
> >>>--
> >>>
> >>>>Signed-off-by: Lina Iyer <lina.iyer@linaro.org>
> >>>>---
> >>>> drivers/soc/qcom/spm.c | 7 +------
> >>>> 1 file changed, 1 insertion(+), 6 deletions(-)
> >>>>
> >>>>diff --git a/drivers/soc/qcom/spm.c b/drivers/soc/qcom/spm.c
> >>>>index b04b05a..199c085 100644
> >>>>--- a/drivers/soc/qcom/spm.c
> >>>>+++ b/drivers/soc/qcom/spm.c
> >>>>@@ -12,7 +12,6 @@
> >>>>  * GNU General Public License for more details.
> >>>>  */
> >>>>
> >>>>-#include <linux/module.h>
> >>>> #include <linux/kernel.h>
> >>>> #include <linux/init.h>
> >>>> #include <linux/io.h>
> >>>>@@ -378,8 +377,4 @@ static struct platform_driver spm_driver = {
> >>>> 		.of_match_table = spm_match_table,
> >>>> 	},
> >>>> };
> >>>>-module_platform_driver(spm_driver);
> >>>>-
> >>>>-MODULE_LICENSE("GPL v2");
> >>>>-MODULE_DESCRIPTION("SAW power controller driver");
> >>>>-MODULE_ALIAS("platform:saw");
> >>>>+builtin_platform_driver(spm_driver);
> >>>>--
> >>>>2.1.4
> >>>>

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

end of thread, other threads:[~2016-01-04 18:30 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-04 17:15 [PATCH] drivers: qcom: spm: avoid module usage in non-modular SPM driver Lina Iyer
2016-01-04 17:30 ` Paul Gortmaker
2016-01-04 17:40   ` Lina Iyer
2016-01-04 17:52     ` Paul Gortmaker
2016-01-04 18:02       ` Lina Iyer
2016-01-04 18:30         ` Paul Gortmaker

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).