[RFC PATCH 2/3] ARM: imx: cpuidle: Convert imx6q driver to platform_driver

Shawn Guo shawn.guo at linaro.org
Thu Nov 7 03:07:47 EST 2013


On Mon, Oct 28, 2013 at 09:49:32AM -0700, Daniel Lezcano wrote:
> +static struct platform_device imx6q_cpuidle_device = {
> +	.name = "cpuidle-imx6q",
> +	.dev = {
> +		.platform_data = imx6q_pm_idle,
> +	},
> +};
> +
>  void __init imx6q_pm_init(void)
>  {
> +	/*
> +	 * WAIT mode is broken on TO 1.0 and 1.1, so there is no point
> +	 * to run cpuidle on them.
> +	 */
> +	if (imx6q_revision() > IMX_CHIP_REVISION_1_1) {
> +
> +		/* Need to enable SCU standby for entering WAIT modes */
> +		imx_scu_standby_enable();
> +
> +		/* Set chicken bit to get a reliable WAIT mode support */
> +		imx6q_set_chicken_bit();

So this is a behavior change.  Before the patch, these two functions
will not get called if CONFIG_CPU_IDLE is not enabled.  We only want to
call them when cpuidle driver is instantiated.

Shawn

> +
> +		platform_device_register(&imx6q_cpuidle_device);
> +	}
> +
>  	suspend_set_ops(&imx6q_pm_ops);
>  }
> -- 
> 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




More information about the linux-arm-kernel mailing list