tools, slub: Fix off-by-one buffer corruption after readlink() call
[linux-2.6/linux-mips.git] / arch / arm / mach-ux500 / board-mop500-u8500uib.c
blob8ce46c0fdfd5fc706afa8f710de8cd7f5fe3d463
1 /*
2 * Copyright (C) ST-Ericsson SA 2010
4 * Board data for the U8500 UIB, also known as the New UIB
5 * License terms: GNU General Public License (GPL), version 2
6 */
8 #include <linux/kernel.h>
9 #include <linux/init.h>
10 #include <linux/i2c.h>
11 #include <linux/gpio.h>
12 #include <linux/interrupt.h>
13 #include <linux/mfd/tc3589x.h>
14 #include <linux/input/matrix_keypad.h>
16 #include <mach/gpio.h>
17 #include <mach/irqs.h>
19 #include "board-mop500.h"
21 /* Dummy data that can be overridden by staging driver */
22 struct i2c_board_info __initdata __weak mop500_i2c3_devices_u8500[] = {
26 * TC35893
28 static const unsigned int u8500_keymap[] = {
29 KEY(3, 1, KEY_END),
30 KEY(4, 1, KEY_POWER),
31 KEY(6, 4, KEY_VOLUMEDOWN),
32 KEY(4, 2, KEY_EMAIL),
33 KEY(3, 3, KEY_RIGHT),
34 KEY(2, 5, KEY_BACKSPACE),
36 KEY(6, 7, KEY_MENU),
37 KEY(5, 0, KEY_ENTER),
38 KEY(4, 3, KEY_0),
39 KEY(3, 4, KEY_DOT),
40 KEY(5, 2, KEY_UP),
41 KEY(3, 5, KEY_DOWN),
43 KEY(4, 5, KEY_SEND),
44 KEY(0, 5, KEY_BACK),
45 KEY(6, 2, KEY_VOLUMEUP),
46 KEY(1, 3, KEY_SPACE),
47 KEY(7, 6, KEY_LEFT),
48 KEY(5, 5, KEY_SEARCH),
51 static struct matrix_keymap_data u8500_keymap_data = {
52 .keymap = u8500_keymap,
53 .keymap_size = ARRAY_SIZE(u8500_keymap),
56 static struct tc3589x_keypad_platform_data tc35893_data = {
57 .krow = TC_KPD_ROWS,
58 .kcol = TC_KPD_COLUMNS,
59 .debounce_period = TC_KPD_DEBOUNCE_PERIOD,
60 .settle_time = TC_KPD_SETTLE_TIME,
61 .irqtype = IRQF_TRIGGER_FALLING,
62 .enable_wakeup = true,
63 .keymap_data = &u8500_keymap_data,
64 .no_autorepeat = true,
67 static struct tc3589x_platform_data tc3589x_keypad_data = {
68 .block = TC3589x_BLOCK_KEYPAD,
69 .keypad = &tc35893_data,
70 .irq_base = MOP500_EGPIO_IRQ_BASE,
73 static struct i2c_board_info __initdata mop500_i2c0_devices_u8500[] = {
75 I2C_BOARD_INFO("tc3589x", 0x44),
76 .platform_data = &tc3589x_keypad_data,
77 .irq = NOMADIK_GPIO_TO_IRQ(218),
78 .flags = I2C_CLIENT_WAKE,
83 void __init mop500_u8500uib_init(void)
85 mop500_uib_i2c_add(3, mop500_i2c3_devices_u8500,
86 ARRAY_SIZE(mop500_i2c3_devices_u8500));
88 mop500_uib_i2c_add(0, mop500_i2c0_devices_u8500,
89 ARRAY_SIZE(mop500_i2c0_devices_u8500));