mirror of
https://github.com/torvalds/linux.git
synced 2026-06-08 14:42:37 +02:00
gsensor:modify gsensor struct name
This commit is contained in:
parent
884a116a32
commit
44caee7170
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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
2
arch/arm/mach-rk29/board-rk29-newton.c
Normal file → Executable 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,
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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
2
arch/arm/mach-rk29/board-rk29-z5.c
Normal file → Executable 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,
|
||||
|
|
|
|||
|
|
@ -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
2
arch/arm/mach-rk29/board-rk29sdk.c
Normal file → Executable 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,
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -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__);
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user