/* * linux/arch/arm/mach-omap2/board-rx51-peripherals.c * * Copyright (C) 2008-2009 Nokia * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */#include<linux/kernel.h>#include<linux/init.h>#include<linux/platform_device.h>#include<linux/input.h>#include<linux/input/matrix_keypad.h>#include<linux/spi/spi.h>#include<linux/wl12xx.h>#include<linux/spi/tsc2005.h>#include<linux/i2c.h>#include<linux/i2c/twl.h>#include<linux/clk.h>#include<linux/delay.h>#include<linux/regulator/machine.h>#include<linux/gpio.h>#include<linux/gpio_keys.h>#include<linux/mmc/host.h>#include<linux/power/isp1704_charger.h>#include<linux/platform_data/spi-omap2-mcspi.h>#include<linux/platform_data/mtd-onenand-omap2.h>#include<asm/system_info.h>#include"common.h"#include<linux/omap-dma.h>#include"gpmc-smc91x.h"#include"board-rx51.h"#include<sound/tlv320aic3x.h>#include<sound/tpa6130a2-plat.h>#include<media/radio-si4713.h>#include<media/si4713.h>#include<linux/platform_data/leds-lp55xx.h>#include<linux/platform_data/tsl2563.h>#include<linux/lis3lv02d.h>#include<video/omap-panel-data.h>#if defined(CONFIG_IR_RX51) || defined(CONFIG_IR_RX51_MODULE)#include<media/ir-rx51.h>#endif#include"mux.h"#include"omap-pm.h"#include"hsmmc.h"#include"common-board-devices.h"#include"gpmc.h"#include"gpmc-onenand.h"#include"soc.h"#include"omap-secure.h"#define SYSTEM_REV_B_USES_VAUX3 0x1699#define SYSTEM_REV_S_USES_VAUX3 0x8#define RX51_WL1251_POWER_GPIO 87#define RX51_WL1251_IRQ_GPIO 42#define RX51_FMTX_RESET_GPIO 163#define RX51_FMTX_IRQ 53#define RX51_LP5523_CHIP_EN_GPIO 41#define RX51_USB_TRANSCEIVER_RST_GPIO 67#define RX51_TSC2005_RESET_GPIO 104#define RX51_TSC2005_IRQ_GPIO 100#define LIS302_IRQ1_GPIO 181#define LIS302_IRQ2_GPIO 180 /* Not yet in use *//* List all SPI devices here. Note that the list/probe order seems to matter! */enum{RX51_SPI_WL1251,RX51_SPI_TSC2005,/* Touch Controller */RX51_SPI_MIPID,/* LCD panel */};staticstructwl1251_platform_datawl1251_pdata;staticstructtsc2005_platform_datatsc2005_pdata;#if defined(CONFIG_SENSORS_LIS3_I2C) || defined(CONFIG_SENSORS_LIS3_I2C_MODULE)staticintlis302_setup(void){interr;intirq1=LIS302_IRQ1_GPIO;intirq2=LIS302_IRQ2_GPIO;/* gpio for interrupt pin 1 */err=gpio_request(irq1,"lis3lv02dl_irq1");if(err){printk(KERN_ERR"lis3lv02dl: gpio request failed\n");gotoout;}/* gpio for interrupt pin 2 */err=gpio_request(irq2,"lis3lv02dl_irq2");if(err){gpio_free(irq1);printk(KERN_ERR"lis3lv02dl: gpio request failed\n");gotoout;}gpio_direction_input(irq1);gpio_direction_input(irq2);out:returnerr;}staticintlis302_release(