Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1254517 > unrolled thread

[PULL] cpuidle for 4.4

Started byDaniel Lezcano <daniel.lezcano@linaro.org>
First post2015-10-23 14:00 +0200
Last post2015-10-28 03:40 +0100
Articles 4 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PULL] cpuidle for 4.4 Daniel Lezcano <daniel.lezcano@linaro.org> - 2015-10-23 14:00 +0200
    [PATCH 2/2] cpuidle: mvebu: disable the bind/unbind attributes and use builtin_platform_driver Daniel Lezcano <daniel.lezcano@linaro.org> - 2015-10-23 14:00 +0200
    [PATCH 1/2] cpuidle: mvebu: clean up multiple platform drivers Daniel Lezcano <daniel.lezcano@linaro.org> - 2015-10-23 14:00 +0200
    Re: [PULL] cpuidle for 4.4 "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2015-10-28 03:40 +0100

#1254517 — [PULL] cpuidle for 4.4

FromDaniel Lezcano <daniel.lezcano@linaro.org>
Date2015-10-23 14:00 +0200
Subject[PULL] cpuidle for 4.4
Message-ID<qmJaO-wP-7@gated-at.bofh.it>
Hi Rafael,

this pull request contains a couple of changes from Russel King.

  - Disable bind/unbind attribute and use builtin_platform_driver for 
mvebu (Russell King)

  - Clean up the code by removing the multiple platform drivers and use 
the platform ID instead (Russell King)

Thanks !

   -- Daniel

The following changes since commit 7379047d5585187d1288486d4627873170d0005a:

   Linux 4.3-rc6 (2015-10-18 16:08:42 -0700)

are available in the git repository at:

   http://git.linaro.org/people/daniel.lezcano/linux.git cpuidle/4.4

for you to fetch changes up to ab319939a58678c19a68ff10c8a08cef462a3ba6:

   cpuidle: mvebu: disable the bind/unbind attributes and use 
builtin_platform_driver (2015-10-23 12:40:48 +0200)

----------------------------------------------------------------
Russell King (2):
       cpuidle: mvebu: clean up multiple platform drivers
       cpuidle: mvebu: disable the bind/unbind attributes and use 
builtin_platform_driver

  drivers/cpuidle/cpuidle-mvebu-v7.c | 46 
+++++++++++++++++++++-------------------------
  1 file changed, 21 insertions(+), 25 deletions(-)


-- 
  <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1254519 — [PATCH 2/2] cpuidle: mvebu: disable the bind/unbind attributes and use builtin_platform_driver

FromDaniel Lezcano <daniel.lezcano@linaro.org>
Date2015-10-23 14:00 +0200
Subject[PATCH 2/2] cpuidle: mvebu: disable the bind/unbind attributes and use builtin_platform_driver
Message-ID<qmJaP-wP-11@gated-at.bofh.it>
In reply to#1254517
From: Russell King <rmk+kernel@arm.linux.org.uk>

As the driver doesn't support unbinding, nor does it support arbitary
binding of devices, disable the bind/unbind attributes for this driver.
Also, as the driver has no remove function, it can never be modular,
so use builtin_platform_driver() to avoid the module exit boilerplate.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
 drivers/cpuidle/cpuidle-mvebu-v7.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/cpuidle/cpuidle-mvebu-v7.c b/drivers/cpuidle/cpuidle-mvebu-v7.c
index facd7d3..01a8569 100644
--- a/drivers/cpuidle/cpuidle-mvebu-v7.c
+++ b/drivers/cpuidle/cpuidle-mvebu-v7.c
@@ -127,11 +127,12 @@ static struct platform_driver mvebu_cpuidle_driver = {
 	.probe = mvebu_v7_cpuidle_probe,
 	.driver = {
 		.name = "cpuidle-mbevu",
+		.suppress_bind_attrs = true,
 	},
 	.id_table = mvebu_cpuidle_ids,
 };
 
-module_platform_driver(mvebu_cpuidle_driver);
+builtin_platform_driver(mvebu_cpuidle_driver);
 
 MODULE_AUTHOR("Gregory CLEMENT <gregory.clement@free-electrons.com>");
 MODULE_DESCRIPTION("Marvell EBU v7 cpuidle driver");
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1254520 — [PATCH 1/2] cpuidle: mvebu: clean up multiple platform drivers

FromDaniel Lezcano <daniel.lezcano@linaro.org>
Date2015-10-23 14:00 +0200
Subject[PATCH 1/2] cpuidle: mvebu: clean up multiple platform drivers
Message-ID<qmJaP-wP-13@gated-at.bofh.it>
In reply to#1254517
From: Russell King <rmk+kernel@arm.linux.org.uk>

There's no need to use multiple platform drivers, especially when we
want to do something different in the probe, but we still use a common
probe function.

We can use the platform ID system to only register one platform driver,
but have it match several devices, and give us the CPU idle driver via
the ID's driver_data.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
 drivers/cpuidle/cpuidle-mvebu-v7.c | 45 +++++++++++++++++---------------------
 1 file changed, 20 insertions(+), 25 deletions(-)

diff --git a/drivers/cpuidle/cpuidle-mvebu-v7.c b/drivers/cpuidle/cpuidle-mvebu-v7.c
index 980151f..facd7d3 100644
--- a/drivers/cpuidle/cpuidle-mvebu-v7.c
+++ b/drivers/cpuidle/cpuidle-mvebu-v7.c
@@ -99,44 +99,39 @@ static struct cpuidle_driver armada38x_idle_driver = {
 
 static int mvebu_v7_cpuidle_probe(struct platform_device *pdev)
 {
-	mvebu_v7_cpu_suspend = pdev->dev.platform_data;
+	const struct platform_device_id *id = pdev->id_entry;
 
-	if (!strcmp(pdev->dev.driver->name, "cpuidle-armada-xp"))
-		return cpuidle_register(&armadaxp_idle_driver, NULL);
-	else if (!strcmp(pdev->dev.driver->name, "cpuidle-armada-370"))
-		return cpuidle_register(&armada370_idle_driver, NULL);
-	else if (!strcmp(pdev->dev.driver->name, "cpuidle-armada-38x"))
-		return cpuidle_register(&armada38x_idle_driver, NULL);
-	else
+	if (!id)
 		return -EINVAL;
-}
 
-static struct platform_driver armadaxp_cpuidle_plat_driver = {
-	.driver = {
-		.name = "cpuidle-armada-xp",
-	},
-	.probe = mvebu_v7_cpuidle_probe,
-};
+	mvebu_v7_cpu_suspend = pdev->dev.platform_data;
 
-module_platform_driver(armadaxp_cpuidle_plat_driver);
+	return cpuidle_register((struct cpuidle_driver *)id->driver_data, NULL);
+}
 
-static struct platform_driver armada370_cpuidle_plat_driver = {
-	.driver = {
+static const struct platform_device_id mvebu_cpuidle_ids[] = {
+	{
+		.name = "cpuidle-armada-xp",
+		.driver_data = (unsigned long)&armadaxp_idle_driver,
+	}, {
 		.name = "cpuidle-armada-370",
+		.driver_data = (unsigned long)&armada370_idle_driver,
+	}, {
+		.name = "cpuidle-armada-38x",
+		.driver_data = (unsigned long)&armada38x_idle_driver,
 	},
-	.probe = mvebu_v7_cpuidle_probe,
+	{}
 };
 
-module_platform_driver(armada370_cpuidle_plat_driver);
-
-static struct platform_driver armada38x_cpuidle_plat_driver = {
+static struct platform_driver mvebu_cpuidle_driver = {
+	.probe = mvebu_v7_cpuidle_probe,
 	.driver = {
-		.name = "cpuidle-armada-38x",
+		.name = "cpuidle-mbevu",
 	},
-	.probe = mvebu_v7_cpuidle_probe,
+	.id_table = mvebu_cpuidle_ids,
 };
 
-module_platform_driver(armada38x_cpuidle_plat_driver);
+module_platform_driver(mvebu_cpuidle_driver);
 
 MODULE_AUTHOR("Gregory CLEMENT <gregory.clement@free-electrons.com>");
 MODULE_DESCRIPTION("Marvell EBU v7 cpuidle driver");
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1257598

From"Rafael J. Wysocki" <rjw@rjwysocki.net>
Date2015-10-28 03:40 +0100
Message-ID<qooOB-50K-1@gated-at.bofh.it>
In reply to#1254517
On Friday, October 23, 2015 01:54:08 PM Daniel Lezcano wrote:
> 
> Hi Rafael,
> 
> this pull request contains a couple of changes from Russel King.
> 
>   - Disable bind/unbind attribute and use builtin_platform_driver for 
> mvebu (Russell King)
> 
>   - Clean up the code by removing the multiple platform drivers and use 
> the platform ID instead (Russell King)
> 
> Thanks !
> 
>    -- Daniel
> 
> The following changes since commit 7379047d5585187d1288486d4627873170d0005a:
> 
>    Linux 4.3-rc6 (2015-10-18 16:08:42 -0700)
> 
> are available in the git repository at:
> 
>    http://git.linaro.org/people/daniel.lezcano/linux.git cpuidle/4.4
> 
> for you to fetch changes up to ab319939a58678c19a68ff10c8a08cef462a3ba6:
> 
>    cpuidle: mvebu: disable the bind/unbind attributes and use 
> builtin_platform_driver (2015-10-23 12:40:48 +0200)
> 
> ----------------------------------------------------------------
> Russell King (2):
>        cpuidle: mvebu: clean up multiple platform drivers
>        cpuidle: mvebu: disable the bind/unbind attributes and use 
> builtin_platform_driver
> 
>   drivers/cpuidle/cpuidle-mvebu-v7.c | 46 
> +++++++++++++++++++++-------------------------
>   1 file changed, 21 insertions(+), 25 deletions(-)

Pulled, thanks!

Rafael

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web