From 44caee7170463aa41847cccde8b6054a9a12d690 Mon Sep 17 00:00:00 2001 From: "lw@rock-chips.com" Date: Wed, 23 May 2012 15:14:44 +0800 Subject: [PATCH] gsensor:modify gsensor struct name --- arch/arm/mach-rk29/board-rk29-a22.c | 2 +- arch/arm/mach-rk29/board-rk29-ddr3sdk.c | 2 +- arch/arm/mach-rk29/board-rk29-fih.c | 2 +- arch/arm/mach-rk29/board-rk29-k97.c | 2 +- arch/arm/mach-rk29/board-rk29-newton.c | 2 +- arch/arm/mach-rk29/board-rk29-phonesdk.c | 2 +- arch/arm/mach-rk29/board-rk29-td8801_v2.c | 2 +- arch/arm/mach-rk29/board-rk29-z5.c | 2 +- arch/arm/mach-rk29/board-rk29phonepadsdk.c | 2 +- arch/arm/mach-rk29/board-rk29sdk.c | 2 +- arch/arm/mach-rk30/board-rk30-phone-loquat.c | 8 +------- arch/arm/mach-rk30/board-rk30-phone.c | 2 +- arch/arm/mach-rk30/board-rk30-sdk.c | 2 +- arch/arm/plat-rk/include/plat/board.h | 6 +++--- drivers/input/gsensor/mma8452.c | 4 ++-- include/linux/mma8452.h | 10 ---------- 16 files changed, 18 insertions(+), 34 deletions(-) mode change 100644 => 100755 arch/arm/mach-rk29/board-rk29-newton.c mode change 100644 => 100755 arch/arm/mach-rk29/board-rk29-z5.c mode change 100644 => 100755 arch/arm/mach-rk29/board-rk29sdk.c diff --git a/arch/arm/mach-rk29/board-rk29-a22.c b/arch/arm/mach-rk29/board-rk29-a22.c index 5c01f1131b22..7b399fa403fe 100755 --- a/arch/arm/mach-rk29/board-rk29-a22.c +++ b/arch/arm/mach-rk29/board-rk29-a22.c @@ -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, diff --git a/arch/arm/mach-rk29/board-rk29-ddr3sdk.c b/arch/arm/mach-rk29/board-rk29-ddr3sdk.c index 77922adef7c8..5528ced18b1f 100755 --- a/arch/arm/mach-rk29/board-rk29-ddr3sdk.c +++ b/arch/arm/mach-rk29/board-rk29-ddr3sdk.c @@ -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, diff --git a/arch/arm/mach-rk29/board-rk29-fih.c b/arch/arm/mach-rk29/board-rk29-fih.c index 24fa6d4d2979..3fc218f5fe51 100755 --- a/arch/arm/mach-rk29/board-rk29-fih.c +++ b/arch/arm/mach-rk29/board-rk29-fih.c @@ -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, diff --git a/arch/arm/mach-rk29/board-rk29-k97.c b/arch/arm/mach-rk29/board-rk29-k97.c index 82ec490c49c2..8135e530cda4 100755 --- a/arch/arm/mach-rk29/board-rk29-k97.c +++ b/arch/arm/mach-rk29/board-rk29-k97.c @@ -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, diff --git a/arch/arm/mach-rk29/board-rk29-newton.c b/arch/arm/mach-rk29/board-rk29-newton.c old mode 100644 new mode 100755 index c1db192c188d..0346c832cdc5 --- a/arch/arm/mach-rk29/board-rk29-newton.c +++ b/arch/arm/mach-rk29/board-rk29-newton.c @@ -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, diff --git a/arch/arm/mach-rk29/board-rk29-phonesdk.c b/arch/arm/mach-rk29/board-rk29-phonesdk.c index c8ed5a3c2443..05a5b7bc1c83 100755 --- a/arch/arm/mach-rk29/board-rk29-phonesdk.c +++ b/arch/arm/mach-rk29/board-rk29-phonesdk.c @@ -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, diff --git a/arch/arm/mach-rk29/board-rk29-td8801_v2.c b/arch/arm/mach-rk29/board-rk29-td8801_v2.c index 6aa30d8ec689..d96a6590461c 100755 --- a/arch/arm/mach-rk29/board-rk29-td8801_v2.c +++ b/arch/arm/mach-rk29/board-rk29-td8801_v2.c @@ -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, diff --git a/arch/arm/mach-rk29/board-rk29-z5.c b/arch/arm/mach-rk29/board-rk29-z5.c old mode 100644 new mode 100755 index 3bb356b39ffe..6af7459b0173 --- a/arch/arm/mach-rk29/board-rk29-z5.c +++ b/arch/arm/mach-rk29/board-rk29-z5.c @@ -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, diff --git a/arch/arm/mach-rk29/board-rk29phonepadsdk.c b/arch/arm/mach-rk29/board-rk29phonepadsdk.c index b6c7b3fdb11b..51390e75aba5 100755 --- a/arch/arm/mach-rk29/board-rk29phonepadsdk.c +++ b/arch/arm/mach-rk29/board-rk29phonepadsdk.c @@ -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, diff --git a/arch/arm/mach-rk29/board-rk29sdk.c b/arch/arm/mach-rk29/board-rk29sdk.c old mode 100644 new mode 100755 index ae38fb648fbb..cd5090f77046 --- a/arch/arm/mach-rk29/board-rk29sdk.c +++ b/arch/arm/mach-rk29/board-rk29sdk.c @@ -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, diff --git a/arch/arm/mach-rk30/board-rk30-phone-loquat.c b/arch/arm/mach-rk30/board-rk30-phone-loquat.c index 6dd35d7afc86..b764fd96eb1e 100755 --- a/arch/arm/mach-rk30/board-rk30-phone-loquat.c +++ b/arch/arm/mach-rk30/board-rk30-phone-loquat.c @@ -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, diff --git a/arch/arm/mach-rk30/board-rk30-phone.c b/arch/arm/mach-rk30/board-rk30-phone.c index f22aff8b18af..516e388819c0 100755 --- a/arch/arm/mach-rk30/board-rk30-phone.c +++ b/arch/arm/mach-rk30/board-rk30-phone.c @@ -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, diff --git a/arch/arm/mach-rk30/board-rk30-sdk.c b/arch/arm/mach-rk30/board-rk30-sdk.c index 560deae7ad09..118921060dd1 100755 --- a/arch/arm/mach-rk30/board-rk30-sdk.c +++ b/arch/arm/mach-rk30/board-rk30-sdk.c @@ -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, diff --git a/arch/arm/plat-rk/include/plat/board.h b/arch/arm/plat-rk/include/plat/board.h index 44a502521ad5..98fee642d804 100755 --- a/arch/arm/plat-rk/include/plat/board.h +++ b/arch/arm/plat-rk/include/plat/board.h @@ -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); }; diff --git a/drivers/input/gsensor/mma8452.c b/drivers/input/gsensor/mma8452.c index 37f469a4a509..418f61b7e3be 100755 --- a/drivers/input/gsensor/mma8452.c +++ b/drivers/input/gsensor/mma8452.c @@ -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__); diff --git a/include/linux/mma8452.h b/include/linux/mma8452.h index 6bc81c2a5b0e..ef9e4f607a4c 100755 --- a/include/linux/mma8452.h +++ b/include/linux/mma8452.h @@ -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; -- 2.34.1