phonesdk:use irq instead of polling for mpu3050
authorlw <lw@rock-chips.com>
Sat, 7 Jan 2012 02:31:04 +0000 (10:31 +0800)
committerlw <lw@rock-chips.com>
Sat, 7 Jan 2012 02:31:04 +0000 (10:31 +0800)
arch/arm/mach-rk29/board-rk29-phonesdk.c
drivers/misc/inv_mpu/mpu-dev.c

index fdf13b1f41329c91e33df562aba515ec4d674113..faeec9723b0c3108e1d900a5b399cb491e16eb5f 100755 (executable)
@@ -2129,7 +2129,7 @@ static struct i2c_board_info __initdata board_i2c0_devices[] = {
                .type                   = "kxtf9",
                .addr           = 0x0f,
                .flags                  = 0,    
-               //.irq                  = RK29_PIN6_PC4,
+               .irq                    = RK29_PIN6_PC4,
                .platform_data = &inv_mpu_kxtf9_data,
        },
 #endif
@@ -2138,7 +2138,7 @@ static struct i2c_board_info __initdata board_i2c0_devices[] = {
                .type                   = "ak8975",
                .addr                   = 0x0d,
                .flags                  = 0,    
-               //.irq                  = RK29_PIN6_PC5,
+               .irq                    = RK29_PIN6_PC5,
                .platform_data = &inv_mpu_ak8975_data,
        },
 #endif
index 1ccbaa7fa449ee9eed9c88f1405bdc83d33cefc1..3c54d55811ef65a3a11403f4b2b506cf6de4f180 100755 (executable)
@@ -943,7 +943,7 @@ int inv_mpu_register_slave(struct module *slave_module,
        }
 
        slave_pdata->address    = slave_client->addr;
-       slave_pdata->irq        = slave_client->irq;
+       slave_pdata->irq        = gpio_to_irq(slave_client->irq);
        slave_pdata->adapt_num  = i2c_adapter_id(slave_client->adapter);
 
        dev_info(&slave_client->adapter->dev,