* [RESEND] [PATCH 3/3] omap4: Platform changes for CMA3000 Accelerometer driver
@ 2010-12-02 7:44 Hemanth V
2010-12-18 1:33 ` Tony Lindgren
0 siblings, 1 reply; 2+ messages in thread
From: Hemanth V @ 2010-12-02 7:44 UTC (permalink / raw)
To: linux-omap
Pl ignore the earlier patch, which seems to have rebasing issues.
Thanks
Hemanth
>From 42cb400c1bd3878977bc8fd416c9c39f81bed674 Mon Sep 17 00:00:00 2001
From: Hemanth V <hemanthv@ti.com>
Date: Thu, 2 Dec 2010 12:44:19 +0530
Subject: [PATCH] omap4: Platform changes for CMA3000 Accelerometer driver
Update 4430 SDP board file with platform data for accelerometer driver
Signed-off-by: Hemanth V <hemanthv@ti.com>
---
CMA3000 Driver is queued up for 2.6.38 merge window
arch/arm/mach-omap2/board-4430sdp.c | 30 ++++++++++++++++++++++++++++++
1 files changed, 30 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c
index ea56c30..6bda335 100644
--- a/arch/arm/mach-omap2/board-4430sdp.c
+++ b/arch/arm/mach-omap2/board-4430sdp.c
@@ -24,6 +24,8 @@
#include <linux/regulator/machine.h>
#include <linux/leds.h>
#include <linux/leds_pwm.h>
+#include <linux/input/cma3000.h>
+#include <linux/interrupt.h>
#include <mach/hardware.h>
#include <mach/omap4-common.h>
@@ -45,6 +47,7 @@
#define ETH_KS8851_POWER_ON 48
#define ETH_KS8851_QUART 138
#define OMAP4_SFH7741_SENSOR_OUTPUT_GPIO 184
+#define OMAP4_CMA3000ACCL_GPIO 186
#define OMAP4_SFH7741_ENABLE_GPIO 188
static struct gpio_led sdp4430_gpio_leds[] = {
@@ -477,6 +480,27 @@ static struct twl4030_platform_data sdp4430_twldata = {
.vaux3 = &sdp4430_vaux3,
};
+static struct cma3000_platform_data cma3000_platform_data = {
+ .fuzz_x = 25,
+ .fuzz_y = 25,
+ .fuzz_z = 25,
+ .g_range = CMARANGE_8G,
+ .mode = CMAMODE_MOTDET,
+ .mdthr = 0x8,
+ .mdfftmr = 0x33,
+ .ffthr = 0x8,
+ .irqflags = IRQF_TRIGGER_HIGH,
+};
+
+static void omap_cma3000accl_init(void)
+{
+ if (gpio_request(OMAP4_CMA3000ACCL_GPIO, "Accelerometer") < 0) {
+ pr_err("Accelerometer GPIO request failed\n");
+ return;
+ }
+ gpio_direction_input(OMAP4_CMA3000ACCL_GPIO);
+}
+
static struct i2c_board_info __initdata sdp4430_i2c_boardinfo[] = {
{
I2C_BOARD_INFO("twl6030", 0x48),
@@ -497,6 +521,11 @@ static struct i2c_board_info __initdata sdp4430_i2c_4_boardinfo[] = {
{
I2C_BOARD_INFO("hmc5843", 0x1e),
},
+ {
+ I2C_BOARD_INFO("cma3000_d01", 0x1c),
+ .platform_data = &cma3000_platform_data,
+ .irq = OMAP_GPIO_IRQ(OMAP4_CMA3000ACCL_GPIO),
+ },
};
static int __init omap4_i2c_init(void)
{
@@ -570,6 +599,7 @@ static void __init omap_4430sdp_init(void)
spi_register_board_info(sdp4430_spi_board_info,
ARRAY_SIZE(sdp4430_spi_board_info));
}
+ omap_cma3000accl_init();
}
static void __init omap_4430sdp_map_io(void)
--
1.5.4.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [RESEND] [PATCH 3/3] omap4: Platform changes for CMA3000 Accelerometer driver
2010-12-02 7:44 [RESEND] [PATCH 3/3] omap4: Platform changes for CMA3000 Accelerometer driver Hemanth V
@ 2010-12-18 1:33 ` Tony Lindgren
0 siblings, 0 replies; 2+ messages in thread
From: Tony Lindgren @ 2010-12-18 1:33 UTC (permalink / raw)
To: Hemanth V; +Cc: linux-omap
* Hemanth V <hemanthv@ti.com> [101201 23:34]:
> Pl ignore the earlier patch, which seems to have rebasing issues.
>
> Thanks
> Hemanth
>
> From 42cb400c1bd3878977bc8fd416c9c39f81bed674 Mon Sep 17 00:00:00 2001
> From: Hemanth V <hemanthv@ti.com>
> Date: Thu, 2 Dec 2010 12:44:19 +0530
> Subject: [PATCH] omap4: Platform changes for CMA3000 Accelerometer driver
>
> Update 4430 SDP board file with platform data for accelerometer driver
>
> Signed-off-by: Hemanth V <hemanthv@ti.com>
> ---
> CMA3000 Driver is queued up for 2.6.38 merge window
>
> arch/arm/mach-omap2/board-4430sdp.c | 30 ++++++++++++++++++++++++++++++
> 1 files changed, 30 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c
> index ea56c30..6bda335 100644
> --- a/arch/arm/mach-omap2/board-4430sdp.c
> +++ b/arch/arm/mach-omap2/board-4430sdp.c
> @@ -24,6 +24,8 @@
> #include <linux/regulator/machine.h>
> #include <linux/leds.h>
> #include <linux/leds_pwm.h>
> +#include <linux/input/cma3000.h>
> +#include <linux/interrupt.h>
>
> #include <mach/hardware.h>
> #include <mach/omap4-common.h>
This you should send via the input list along with the cma3000
driver:
Acked-by: Tony Lindgren <tony@atomide.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-12-18 1:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-02 7:44 [RESEND] [PATCH 3/3] omap4: Platform changes for CMA3000 Accelerometer driver Hemanth V
2010-12-18 1:33 ` Tony Lindgren
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).