Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e2e54362 authored by Chander Kashyap's avatar Chander Kashyap Committed by Kukjin Kim
Browse files

cpuidle: big.LITTLE: add of_device_id structure



This driver will be used by many big.Little Soc's. As of now it does
string matching of hardcoded compatible string to init the driver. This
comparison list will keep on growing with addition of new SoC's.
Hence add of_device_id structure to collect the compatible strings of
SoC's using this driver.

Signed-off-by: default avatarChander Kashyap <chander.kashyap@linaro.org>
Reviewed-by: default avatarTomasz Figa <t.figa@samsung.com>
Acked-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: default avatarKukjin Kim <kgene.kim@samsung.com>
parent 1795cd9b
Loading
Loading
Loading
Loading
+10 −1
Original line number Original line Diff line number Diff line
@@ -163,14 +163,23 @@ static int __init bl_idle_driver_init(struct cpuidle_driver *drv, int cpu_id)
	return 0;
	return 0;
}
}


static const struct of_device_id compatible_machine_match[] = {
	{ .compatible = "arm,vexpress,v2p-ca15_a7" },
	{},
};

static int __init bl_idle_init(void)
static int __init bl_idle_init(void)
{
{
	int ret;
	int ret;
	struct device_node *root = of_find_node_by_path("/");

	if (!root)
		return -ENODEV;


	/*
	/*
	 * Initialize the driver just for a compliant set of machines
	 * Initialize the driver just for a compliant set of machines
	 */
	 */
	if (!of_machine_is_compatible("arm,vexpress,v2p-ca15_a7"))
	if (!of_match_node(compatible_machine_match, root))
		return -ENODEV;
		return -ENODEV;
	/*
	/*
	 * For now the differentiation between little and big cores
	 * For now the differentiation between little and big cores