Staging: Panel: panel: Fixed checkpatch line length warnings
[linux/fpc-iii.git] / arch / arm / mach-mmp / teton_bga.c
blobe4d95b4c6bb272a427c5e4d6dae3cb7676b11ae9
1 /*
2 * linux/arch/arm/mach-mmp/teton_bga.c
4 * Support for the Marvell PXA168 Teton BGA Development Platform.
6 * Author: Mark F. Brown <mark.brown314@gmail.com>
8 * This code is based on aspenite.c
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 as
12 * publishhed by the Free Software Foundation.
15 #include <linux/init.h>
16 #include <linux/kernel.h>
17 #include <linux/platform_device.h>
18 #include <linux/gpio.h>
19 #include <linux/gpio-pxa.h>
20 #include <linux/input.h>
21 #include <linux/platform_data/keypad-pxa27x.h>
22 #include <linux/i2c.h>
24 #include <asm/mach-types.h>
25 #include <asm/mach/arch.h>
26 #include <mach/addr-map.h>
27 #include <mach/mfp-pxa168.h>
28 #include <mach/pxa168.h>
29 #include <mach/teton_bga.h>
30 #include <mach/irqs.h>
32 #include "common.h"
34 static unsigned long teton_bga_pin_config[] __initdata = {
35 /* UART1 */
36 GPIO107_UART1_TXD,
37 GPIO108_UART1_RXD,
39 /* Keypad */
40 GPIO109_KP_MKIN1,
41 GPIO110_KP_MKIN0,
42 GPIO111_KP_MKOUT7,
43 GPIO112_KP_MKOUT6,
45 /* I2C Bus */
46 GPIO105_CI2C_SDA,
47 GPIO106_CI2C_SCL,
49 /* RTC */
50 GPIO78_GPIO,
53 static struct pxa_gpio_platform_data pxa168_gpio_pdata = {
54 .irq_base = MMP_GPIO_TO_IRQ(0),
57 static unsigned int teton_bga_matrix_key_map[] = {
58 KEY(0, 6, KEY_ESC),
59 KEY(0, 7, KEY_ENTER),
60 KEY(1, 6, KEY_LEFT),
61 KEY(1, 7, KEY_RIGHT),
64 static struct pxa27x_keypad_platform_data teton_bga_keypad_info __initdata = {
65 .matrix_key_rows = 2,
66 .matrix_key_cols = 8,
67 .matrix_key_map = teton_bga_matrix_key_map,
68 .matrix_key_map_size = ARRAY_SIZE(teton_bga_matrix_key_map),
69 .debounce_interval = 30,
72 static struct i2c_board_info teton_bga_i2c_info[] __initdata = {
74 I2C_BOARD_INFO("ds1337", 0x68),
75 .irq = MMP_GPIO_TO_IRQ(RTC_INT_GPIO)
79 static void __init teton_bga_init(void)
81 mfp_config(ARRAY_AND_SIZE(teton_bga_pin_config));
83 /* on-chip devices */
84 pxa168_add_uart(1);
85 pxa168_add_keypad(&teton_bga_keypad_info);
86 pxa168_add_twsi(0, NULL, ARRAY_AND_SIZE(teton_bga_i2c_info));
87 platform_device_add_data(&pxa168_device_gpio, &pxa168_gpio_pdata,
88 sizeof(struct pxa_gpio_platform_data));
89 platform_device_register(&pxa168_device_gpio);
92 MACHINE_START(TETON_BGA, "PXA168-based Teton BGA Development Platform")
93 .map_io = mmp_map_io,
94 .nr_irqs = MMP_NR_IRQS,
95 .init_irq = pxa168_init_irq,
96 .init_time = pxa168_timer_init,
97 .init_machine = teton_bga_init,
98 .restart = pxa168_restart,
99 MACHINE_END