2 * Support for Teltonika RUT1xx
4 * Copyright (C) 2008-2009 Paulius Zaleckas <paulius.zaleckas@teltonika.lt>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 #include <linux/kernel.h>
12 #include <linux/init.h>
13 #include <linux/platform_device.h>
14 #include <linux/leds.h>
15 #include <linux/input.h>
16 #include <linux/gpio_keys.h>
18 #include <asm/mach-types.h>
19 #include <asm/mach/arch.h>
20 #include <asm/mach/time.h>
24 static struct gpio_keys_button rut1xx_keys
[] = {
29 .desc
= "Reset to defaults",
34 static struct gpio_keys_platform_data rut1xx_keys_data
= {
35 .buttons
= rut1xx_keys
,
36 .nbuttons
= ARRAY_SIZE(rut1xx_keys
),
39 static struct platform_device rut1xx_keys_device
= {
43 .platform_data
= &rut1xx_keys_data
,
47 static struct gpio_led rut100_leds
[] = {
50 .default_trigger
= "heartbeat",
55 .default_trigger
= "default-on",
61 static struct gpio_led_platform_data rut100_leds_data
= {
62 .num_leds
= ARRAY_SIZE(rut100_leds
),
66 static struct platform_device rut1xx_leds
= {
70 .platform_data
= &rut100_leds_data
,
74 static struct sys_timer rut1xx_timer
= {
75 .init
= gemini_timer_init
,
78 static void __init
rut1xx_init(void)
81 platform_register_uart();
82 platform_register_pflash(SZ_8M
, NULL
, 0);
83 platform_device_register(&rut1xx_leds
);
84 platform_device_register(&rut1xx_keys_device
);
87 MACHINE_START(RUT100
, "Teltonika RUT100")
89 .map_io
= gemini_map_io
,
90 .init_irq
= gemini_init_irq
,
91 .timer
= &rut1xx_timer
,
92 .init_machine
= rut1xx_init
,