gsensor:modify gsensor struct name

This commit is contained in:
lw@rock-chips.com 2012-05-23 15:14:44 +08:00 committed by lw
parent 884a116a32
commit 44caee7170
16 changed files with 18 additions and 34 deletions

View File

@ -601,7 +601,7 @@ static int mma8452_init_platform_hw(void)
}
static struct mma8452_platform_data mma8452_info = {
static struct gsensor_platform_data mma8452_info = {
.model= 8452,
.swap_xy = 0,
.swap_xyz = 1,

View File

@ -1079,7 +1079,7 @@ static int mma8452_init_platform_hw(void)
}
static struct mma8452_platform_data mma8452_info = {
static struct gsensor_platform_data mma8452_info = {
.model= 8452,
.swap_xy = 0,
.swap_xyz = 1,

View File

@ -527,7 +527,7 @@ static int mma8452_init_platform_hw(void)
}
static struct mma8452_platform_data mma8452_info = {
static struct gsensor_platform_data mma8452_info = {
.model= 8452,
.swap_xy = 0,
.init_platform_hw= mma8452_init_platform_hw,

View File

@ -1019,7 +1019,7 @@ static int mma8452_init_platform_hw(void)
}
static struct mma8452_platform_data mma8452_info = {
static struct gsensor_platform_data mma8452_info = {
.model= 8452,
.swap_xyz= 1,
.swap_xy=0,

2
arch/arm/mach-rk29/board-rk29-newton.c Normal file → Executable file
View File

@ -797,7 +797,7 @@ static int mma8452_init_platform_hw(void)
}
static struct mma8452_platform_data mma8452_info = {
static struct gsensor_platform_data mma8452_info = {
.model= 8452,
.swap_xy = 0,
.init_platform_hw= mma8452_init_platform_hw,

View File

@ -616,7 +616,7 @@ static int mma8452_init_platform_hw(void)
}
static struct mma8452_platform_data mma8452_info = {
static struct gsensor_platform_data mma8452_info = {
.model= 8452,
.swap_xy = 0,
.init_platform_hw= mma8452_init_platform_hw,

View File

@ -662,7 +662,7 @@ static int mma8452_init_platform_hw(void)
}
static struct mma8452_platform_data mma8452_info = {
static struct gsensor_platform_data mma8452_info = {
.model= 8452,
.swap_xy = 0,
.init_platform_hw= mma8452_init_platform_hw,

2
arch/arm/mach-rk29/board-rk29-z5.c Normal file → Executable file
View File

@ -683,7 +683,7 @@ static int mma8452_init_platform_hw(void)
}
static struct mma8452_platform_data mma8452_info = {
static struct gsensor_platform_data mma8452_info = {
.model= 8452,
.swap_xy = 0,
.init_platform_hw= mma8452_init_platform_hw,

View File

@ -752,7 +752,7 @@ static int mma8452_init_platform_hw(void)
}
static struct mma8452_platform_data mma8452_info = {
static struct gsensor_platform_data mma8452_info = {
.model= 8452,
.swap_xy = 0,
.init_platform_hw= mma8452_init_platform_hw,

2
arch/arm/mach-rk29/board-rk29sdk.c Normal file → Executable file
View File

@ -862,7 +862,7 @@ static int mma8452_init_platform_hw(void)
}
static struct mma8452_platform_data mma8452_info = {
static struct gsensor_platform_data mma8452_info = {
.model= 8452,
.swap_xy = 1,
.init_platform_hw= mma8452_init_platform_hw,

View File

@ -809,16 +809,10 @@ static int mma8452_init_platform_hw(void)
{
rk30_mux_api_set(GPIO4C0_SMCDATA0_TRACEDATA0_NAME, GPIO4C_GPIO4C0);
if (gpio_request(MMA8452_INT_PIN, NULL) != 0) {
gpio_free(MMA8452_INT_PIN);
printk("mma8452_init_platform_hw gpio_request error\n");
return -EIO;
}
gpio_pull_updown(MMA8452_INT_PIN, 1);
return 0;
}
static struct mma8452_platform_data mma8452_info = {
static struct gsensor_platform_data mma8452_info = {
.model = 8452,
.swap_xy = 0,
.swap_xyz = 1,

View File

@ -900,7 +900,7 @@ static int mma8452_init_platform_hw(void)
return 0;
}
static struct mma8452_platform_data mma8452_info = {
static struct gsensor_platform_data mma8452_info = {
.model = 8452,
.swap_xy = 0,
.swap_xyz = 1,

View File

@ -693,7 +693,7 @@ static int mma8452_init_platform_hw(void)
return 0;
}
static struct mma8452_platform_data mma8452_info = {
static struct gsensor_platform_data mma8452_info = {
.model = 8452,
.swap_xy = 0,
.swap_xyz = 1,

View File

@ -78,15 +78,15 @@ struct rk29_sdmmc_platform_data {
int write_prt;
};
struct mma8452_platform_data {
struct gsensor_platform_data {
u16 model;
u16 swap_xy;
u16 swap_xyz;
signed char orientation[9];
int (*get_pendown_state)(void);
int (*init_platform_hw)(void);
int (*mma8452_platform_sleep)(void);
int (*mma8452_platform_wakeup)(void);
int (*gsensor_platform_sleep)(void);
int (*gsensor_platform_wakeup)(void);
void (*exit_platform_hw)(void);
};

View File

@ -400,7 +400,7 @@ static int mma8452_get_data(struct i2c_client *client)
int ret;
int x,y,z;
struct mma8452_axis axis;
struct mma8452_platform_data *pdata = pdata = client->dev.platform_data;
struct gsensor_platform_data *pdata = pdata = client->dev.platform_data;
/* enabled only if FREAD MODE */
/*
@ -761,7 +761,7 @@ static int mma8452_init_client(struct i2c_client *client)
static int mma8452_probe(struct i2c_client *client, const struct i2c_device_id *id)
{
struct mma8452_data *mma8452;
struct mma8452_platform_data *pdata = pdata = client->dev.platform_data;
struct gsensor_platform_data *pdata = pdata = client->dev.platform_data;
int err;
mmaprintkf("%s enter\n",__FUNCTION__);

View File

@ -126,16 +126,6 @@
#define MMA8452_REG_LEN 11
/*
struct mma8452_platform_data {
int reset;
int clk_on;
int intr;
};
*/
struct mma8452_axis {
int x;
int y;