mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 20:07:46 +09:00
reset 04d70e6 and use board-rk29-ddr3sdk.c handle orientation
This commit is contained in:
@@ -990,9 +990,10 @@ static int mma8452_init_platform_hw(void)
|
||||
|
||||
static struct mma8452_platform_data mma8452_info = {
|
||||
.model= 8452,
|
||||
.swap_xy = 1,
|
||||
.swap_xy = 0,
|
||||
.swap_xyz = 1,
|
||||
.init_platform_hw= mma8452_init_platform_hw,
|
||||
|
||||
.orientation = { -1, 0, 0, 0, 0, 1, 0, -1, 0},
|
||||
};
|
||||
#endif
|
||||
/*mpu3050*/
|
||||
|
||||
@@ -390,9 +390,8 @@ static int mma8452_get_data(struct i2c_client *client)
|
||||
|
||||
if(pdata->swap_xy)
|
||||
{
|
||||
axis.x = -x;
|
||||
axis.y = z;
|
||||
axis.z = -y;
|
||||
axis.x = -axis.x;
|
||||
swap(axis.x,axis.y);
|
||||
}
|
||||
|
||||
mmaprintkd( "%s: ------------------mma8452_GetData axis = %d %d %d--------------\n",
|
||||
|
||||
Reference in New Issue
Block a user