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

Commit ea440783 authored by NISHIMOTO Hiroki's avatar NISHIMOTO Hiroki Committed by Paul Mundt
Browse files

sh: mach-ecovec24: Add motion sensor driver support.



This patch adds support for the lis3lv02d motion sensor connected via
i2c on the Ecovec board. Tested with evtest.

Signed-off-by: default avatarNISHIMOTO Hiroki <nishimoto.hiroki@renesas.com>
Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
parent 61c39bb3
Loading
Loading
Loading
Loading
+8 −0
Original line number Original line Diff line number Diff line
@@ -353,6 +353,10 @@ static struct i2c_board_info i2c1_devices[] = {
	{
	{
		I2C_BOARD_INFO("r2025sd", 0x32),
		I2C_BOARD_INFO("r2025sd", 0x32),
	},
	},
	{
		I2C_BOARD_INFO("lis3lv02d", 0x1c),
		.irq = 33,
	}
};
};


/* KEYSC */
/* KEYSC */
@@ -1115,6 +1119,10 @@ static int __init arch_setup(void)
	gpio_direction_output(GPIO_PTU0, 0);
	gpio_direction_output(GPIO_PTU0, 0);
	mdelay(20);
	mdelay(20);


	/* enable motion sensor */
	gpio_request(GPIO_FN_INTC_IRQ1, NULL);
	gpio_direction_input(GPIO_FN_INTC_IRQ1);

	/* enable I2C device */
	/* enable I2C device */
	i2c_register_board_info(0, i2c0_devices,
	i2c_register_board_info(0, i2c0_devices,
				ARRAY_SIZE(i2c0_devices));
				ARRAY_SIZE(i2c0_devices));