Blame view
arch/arm/mach-ux500/board-mop500-u8500uib.c
2.06 KB
705e09844 mach-ux500: dynam... |
1 2 3 |
/* * Copyright (C) ST-Ericsson SA 2010 * |
71f933f4e mach-ux500: add U... |
4 |
* Board data for the U8500 UIB, also known as the New UIB |
705e09844 mach-ux500: dynam... |
5 6 |
* License terms: GNU General Public License (GPL), version 2 */ |
2f8163baa ARM: gpio: conver... |
7 |
#include <linux/gpio.h> |
705e09844 mach-ux500: dynam... |
8 9 |
#include <linux/kernel.h> #include <linux/init.h> |
71f933f4e mach-ux500: add U... |
10 11 12 13 14 |
#include <linux/i2c.h> #include <linux/gpio.h> #include <linux/interrupt.h> #include <linux/mfd/tc3589x.h> #include <linux/input/matrix_keypad.h> |
71f933f4e mach-ux500: add U... |
15 |
|
71f933f4e mach-ux500: add U... |
16 |
#include <mach/irqs.h> |
705e09844 mach-ux500: dynam... |
17 18 |
#include "board-mop500.h" |
857f72767 staging: ste_rmi4... |
19 20 |
/* Dummy data that can be overridden by staging driver */ struct i2c_board_info __initdata __weak mop500_i2c3_devices_u8500[] = { |
71f933f4e mach-ux500: add U... |
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
}; /* * TC35893 */ static const unsigned int u8500_keymap[] = { KEY(3, 1, KEY_END), KEY(4, 1, KEY_POWER), KEY(6, 4, KEY_VOLUMEDOWN), KEY(4, 2, KEY_EMAIL), KEY(3, 3, KEY_RIGHT), KEY(2, 5, KEY_BACKSPACE), KEY(6, 7, KEY_MENU), KEY(5, 0, KEY_ENTER), KEY(4, 3, KEY_0), KEY(3, 4, KEY_DOT), KEY(5, 2, KEY_UP), KEY(3, 5, KEY_DOWN), KEY(4, 5, KEY_SEND), KEY(0, 5, KEY_BACK), KEY(6, 2, KEY_VOLUMEUP), KEY(1, 3, KEY_SPACE), KEY(7, 6, KEY_LEFT), KEY(5, 5, KEY_SEARCH), }; static struct matrix_keymap_data u8500_keymap_data = { .keymap = u8500_keymap, .keymap_size = ARRAY_SIZE(u8500_keymap), }; static struct tc3589x_keypad_platform_data tc35893_data = { .krow = TC_KPD_ROWS, .kcol = TC_KPD_COLUMNS, .debounce_period = TC_KPD_DEBOUNCE_PERIOD, .settle_time = TC_KPD_SETTLE_TIME, .irqtype = IRQF_TRIGGER_FALLING, .enable_wakeup = true, .keymap_data = &u8500_keymap_data, .no_autorepeat = true, }; static struct tc3589x_platform_data tc3589x_keypad_data = { .block = TC3589x_BLOCK_KEYPAD, .keypad = &tc35893_data, .irq_base = MOP500_EGPIO_IRQ_BASE, }; static struct i2c_board_info __initdata mop500_i2c0_devices_u8500[] = { { I2C_BOARD_INFO("tc3589x", 0x44), .platform_data = &tc3589x_keypad_data, .irq = NOMADIK_GPIO_TO_IRQ(218), .flags = I2C_CLIENT_WAKE, }, }; |
705e09844 mach-ux500: dynam... |
79 80 |
void __init mop500_u8500uib_init(void) { |
71f933f4e mach-ux500: add U... |
81 82 83 84 85 |
mop500_uib_i2c_add(3, mop500_i2c3_devices_u8500, ARRAY_SIZE(mop500_i2c3_devices_u8500)); mop500_uib_i2c_add(0, mop500_i2c0_devices_u8500, ARRAY_SIZE(mop500_i2c0_devices_u8500)); |
705e09844 mach-ux500: dynam... |
86 |
} |