Ejemplo n.º 1
0
static uint32_t touchkey_keymap[] = {
	/* MCS_KEY_MAP(value, keycode) */
	MCS_KEY_MAP(0, KEY_MENU),		/* KEY_SEND */
	MCS_KEY_MAP(1, KEY_BACK),		/* KEY_END */
};

static struct mcs_platform_data touchkey_data = {
	.keymap		= touchkey_keymap,
	.keymap_size	= ARRAY_SIZE(touchkey_keymap),
	.key_maxval	= 2,
};

/* GPIO I2C 3_TOUCH 2.8V */
#define I2C_GPIO_BUS_12		12
static struct i2c_gpio_platform_data i2c_gpio12_data = {
	.sda_pin	= EXYNOS4_GPE4(0),	/* XMDMDATA_8 */
	.scl_pin	= EXYNOS4_GPE4(1),	/* XMDMDATA_9 */
};

static struct platform_device i2c_gpio12 = {
	.name		= "i2c-gpio",
	.id		= I2C_GPIO_BUS_12,
	.dev		= {
		.platform_data	= &i2c_gpio12_data,
	},
};

static struct i2c_board_info i2c_gpio12_devs[] __initdata = {
	{
		I2C_BOARD_INFO("mcs5080_touchkey", 0x20),
		.platform_data = &touchkey_data,
		},
	}, {
		.chip	= {
			.base	= EXYNOS4_GPE2(0),
			.ngpio	= EXYNOS4_GPIO_E2_NR,
			.label	= "GPE2",
		},
	}, {
		.chip	= {
			.base	= EXYNOS4_GPE3(0),
			.ngpio	= EXYNOS4_GPIO_E3_NR,
			.label	= "GPE3",
		},
	}, {
		.chip	= {
			.base	= EXYNOS4_GPE4(0),
			.ngpio	= EXYNOS4_GPIO_E4_NR,
			.label	= "GPE4",
		},
	}, {
		.chip	= {
			.base	= EXYNOS4_GPF0(0),
			.ngpio	= EXYNOS4_GPIO_F0_NR,
			.label	= "GPF0",
		},
	}, {
		.chip	= {
			.base	= EXYNOS4_GPF1(0),
			.ngpio	= EXYNOS4_GPIO_F1_NR,
			.label	= "GPF1",
		},