add motor deriver for raho
authorswj <swj@rock-chips.com>
Sat, 7 Aug 2010 07:32:25 +0000 (00:32 -0700)
committerswj <swj@rock-chips.com>
Sat, 7 Aug 2010 07:32:25 +0000 (00:32 -0700)
arch/arm/mach-rk2818/devices.c
drivers/fpga/spi_fpga_init.c
include/linux/i2c.h

index 3cd21b180669be354495e82c63f4c0d6719c28cd..60719ac16928af999ee885e9551e6bde6d3a5ca0 100755 (executable)
 #include <mach/rk2818_nand.h>
 #include <mach/iomux.h>
 #include <mach/rk2818_camera.h>                          /* ddl@rock-chips.com : camera support */
-#include <linux/i2c.h>                                      
+#include <linux/i2c.h>  
+#include <linux/miscdevice.h>
+#include <linux/circ_buf.h>
+#include <mach/spi_fpga.h>                                    
 #include <media/soc_camera.h>
+#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 
 
index 817a1f99582c1bdfd4d22c4789d20119362ec99b..54a11cf9db2d5733b94e77c3258d346354cc7b4e 100755 (executable)
@@ -312,7 +312,7 @@ static int __devinit spi_fpga_probe(struct spi_device * spi)
 {\r
        struct spi_fpga_port *port;\r
        int ret;\r
-       char b[12];\r
+       char b[24];\r
        int num;\r
        DBG("Enter::%s,LINE=%d************************\n",__FUNCTION__,__LINE__);\r
        /*\r
index bf44183cbb609de3def3ddc1197a21fbffd7d116..c3027b5dff4396f4570d43b6fc7defab9a0ed3c1 100644 (file)
@@ -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 */