From: daniel.lezcano@linaro.org (Daniel Lezcano)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC PATCH 1/3] ARM: imx: cpuidle: Convert imx5 driver to platform driver
Date: Thu, 07 Nov 2013 09:33:34 +0100 [thread overview]
Message-ID: <527B505E.9080409@linaro.org> (raw)
In-Reply-To: <20131107075607.GA6500@S2101-09.ap.freescale.net>
On 11/07/2013 08:56 AM, Shawn Guo wrote:
> On Mon, Oct 28, 2013 at 09:49:31AM -0700, Daniel Lezcano wrote:
>> @@ -149,6 +149,13 @@ static void imx5_pm_idle(void)
>> imx5_cpu_do_idle();
>> }
>>
>> +static struct platform_device imx5_cpuidle_pdev = {
>> + .name = "cpuidle-imx5",
>> + .dev = {
>> + .platform_data = imx5_pm_idle,
>
> This is a little bit hackish and less future proof. We should probably
> create a data structure with the function hook as a field in it.
Yeah, I agree that is what I was planning for the near future as soon as
the driver is moved into the drivers/cpuidle directory. As the other
drivers are following the same scheme I want to define a common ops
structure to be shared across the different driver. But I need to have
several drivers in the same place in order to define the different idle
callback.
Is it acceptable we keep this for the moment as the other cpuidle driver
like cpuidle-at91 and then consolidate with a structure with an
additional patchset addressing several drivers at once ?
>> + },
>> +};
>> +
>> static int __init imx5_pm_common_init(void)
>> {
>> int ret;
>> @@ -166,7 +173,7 @@ static int __init imx5_pm_common_init(void)
>> /* Set the registers to the default cpu idle state. */
>> mx5_cpu_lp_set(IMX5_DEFAULT_CPU_IDLE_STATE);
>>
>> - return imx5_cpuidle_init();
>> + return platform_device_register(&imx5_cpuidle_pdev);
>> }
>>
>> void __init imx5_pm_init(void)
>> --
>> 1.7.9.5
>>
>>
>> _______________________________________________
>> linux-arm-kernel mailing list
>> linux-arm-kernel at lists.infradead.org
>> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>
--
<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
next prev parent reply other threads:[~2013-11-07 8:33 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-28 16:49 [RFC PATCH 1/3] ARM: imx: cpuidle: Convert imx5 driver to platform driver Daniel Lezcano
2013-10-28 16:49 ` [RFC PATCH 2/3] ARM: imx: cpuidle: Convert imx6q driver to platform_driver Daniel Lezcano
2013-11-07 8:07 ` Shawn Guo
2013-11-07 8:34 ` Daniel Lezcano
2013-10-28 16:49 ` [RFC PATCH 3/3] ARM: imx: cpuidle: Move the drivers to drivers/cpuidle Daniel Lezcano
2013-11-06 7:21 ` Sascha Hauer
2013-11-06 14:52 ` Shawn Guo
2013-11-07 7:56 ` [RFC PATCH 1/3] ARM: imx: cpuidle: Convert imx5 driver to platform driver Shawn Guo
2013-11-07 8:33 ` Daniel Lezcano [this message]
2013-11-08 8:04 ` Shawn Guo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=527B505E.9080409@linaro.org \
--to=daniel.lezcano@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).