From 80250b33033d7a077f80c167a6d175771ce23d79 Mon Sep 17 00:00:00 2001 From: swj Date: Sat, 7 Aug 2010 00:32:25 -0700 Subject: [PATCH] add motor deriver for raho --- arch/arm/mach-rk2818/devices.c | 29 ++++++++++++++++++++++++++++- drivers/fpga/spi_fpga_init.c | 2 +- include/linux/i2c.h | 2 -- 3 files changed, 29 insertions(+), 4 deletions(-) diff --git a/arch/arm/mach-rk2818/devices.c b/arch/arm/mach-rk2818/devices.c index 3cd21b180669..60719ac16928 100755 --- a/arch/arm/mach-rk2818/devices.c +++ b/arch/arm/mach-rk2818/devices.c @@ -32,8 +32,12 @@ #include #include #include /* ddl@rock-chips.com : camera support */ -#include +#include +#include +#include +#include #include +#include "../../../drivers/staging/android/timed_gpio.h" static struct resource resources_sdmmc0[] = { { .start = IRQ_NR_SDMMC0, @@ -666,4 +670,27 @@ struct platform_device usb_mass_storage_device = { }, }; +#if CONFIG_ANDROID_TIMED_GPIO +static struct timed_gpio timed_gpios[] = { + { + .name = "vibrator", + .gpio = SPI_GPIO_P1_12, + .max_timeout = 1000, + .active_low = 1, + }, +}; + +static struct timed_gpio_platform_data rk28_vibrator_info = { + .num_gpios = 1, + .gpios = timed_gpios, +}; +struct platform_device rk28_device_vibrator ={ + .name = "timed-gpio", + .id = -1, + .dev = { + .platform_data = &rk28_vibrator_info, + }, + +}; +#endif diff --git a/drivers/fpga/spi_fpga_init.c b/drivers/fpga/spi_fpga_init.c index 817a1f99582c..54a11cf9db2d 100755 --- a/drivers/fpga/spi_fpga_init.c +++ b/drivers/fpga/spi_fpga_init.c @@ -312,7 +312,7 @@ static int __devinit spi_fpga_probe(struct spi_device * spi) { struct spi_fpga_port *port; int ret; - char b[12]; + char b[24]; int num; DBG("Enter::%s,LINE=%d************************\n",__FUNCTION__,__LINE__); /* diff --git a/include/linux/i2c.h b/include/linux/i2c.h index bf44183cbb60..c3027b5dff43 100644 --- a/include/linux/i2c.h +++ b/include/linux/i2c.h @@ -512,9 +512,7 @@ struct i2c_msg { __u16 len; /* msg length */ __u8 *buf; /* pointer to msg data */ __u32 scl_rate; - __u16 channel; __u16 read_type; - __u16 reg_type; }; /* To determine what functionality is present */ -- 2.34.1