Path: blob/master/arch/arm/mach-gemini/board-rut1xx.c
10817 views
/*1* Support for Teltonika RUT1xx2*3* Copyright (C) 2008-2009 Paulius Zaleckas <[email protected]>4*5* This program is free software; you can redistribute it and/or modify6* it under the terms of the GNU General Public License as published by7* the Free Software Foundation; either version 2 of the License, or8* (at your option) any later version.9*/10#include <linux/kernel.h>11#include <linux/init.h>12#include <linux/platform_device.h>13#include <linux/leds.h>14#include <linux/input.h>15#include <linux/gpio_keys.h>1617#include <asm/mach-types.h>18#include <asm/mach/arch.h>19#include <asm/mach/time.h>2021#include "common.h"2223static struct gpio_keys_button rut1xx_keys[] = {24{25.code = KEY_SETUP,26.gpio = 60,27.active_low = 1,28.desc = "Reset to defaults",29.type = EV_KEY,30},31};3233static struct gpio_keys_platform_data rut1xx_keys_data = {34.buttons = rut1xx_keys,35.nbuttons = ARRAY_SIZE(rut1xx_keys),36};3738static struct platform_device rut1xx_keys_device = {39.name = "gpio-keys",40.id = -1,41.dev = {42.platform_data = &rut1xx_keys_data,43},44};4546static struct gpio_led rut100_leds[] = {47{48.name = "Power",49.default_trigger = "heartbeat",50.gpio = 17,51},52{53.name = "GSM",54.default_trigger = "default-on",55.gpio = 7,56.active_low = 1,57},58};5960static struct gpio_led_platform_data rut100_leds_data = {61.num_leds = ARRAY_SIZE(rut100_leds),62.leds = rut100_leds,63};6465static struct platform_device rut1xx_leds = {66.name = "leds-gpio",67.id = -1,68.dev = {69.platform_data = &rut100_leds_data,70},71};7273static struct sys_timer rut1xx_timer = {74.init = gemini_timer_init,75};7677static void __init rut1xx_init(void)78{79gemini_gpio_init();80platform_register_uart();81platform_register_pflash(SZ_8M, NULL, 0);82platform_device_register(&rut1xx_leds);83platform_device_register(&rut1xx_keys_device);84platform_register_rtc();85}8687MACHINE_START(RUT100, "Teltonika RUT100")88.boot_params = 0x100,89.map_io = gemini_map_io,90.init_irq = gemini_init_irq,91.timer = &rut1xx_timer,92.init_machine = rut1xx_init,93MACHINE_END949596