Skip to contentSkip to conversation

Add a driver to support InvenSense mpu3050 gyroscope chip.

PATCH RESEND In review Alan Cox 2 participants 2 messages May 24, 2011 – Jun 23, 2011

Subsystems (2)
lore
Share & tools
lore

Alan Cox

author
#0 lore raw

PATCH RESEND 1/1 Add a driver to support InvenSense mpu3050 gyroscope chip.

From: Joseph Lai <[email protected]>

This driver is registered as an input device. An IRQ is required in this basic driver configuration.

[Cleaned up PM_RUNTIME defines]

---

 drivers/input/misc/Kconfig   |   10 +
 drivers/input/misc/Makefile  |    1 
 drivers/input/misc/mpu3050.c |  421 ++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 432 insertions(+), 0 deletions(-)
 create mode 100644 drivers/input/misc/mpu3050.c
drivers/input/misc/Kconfig +10 -0
index 6f46a76..c0acd07 100644
@@ -488,4 +488,14 @@ config INPUT_BMA023
 	  To compile this driver as a module, choose M here: the
 	  module will be called bma023.
 
+config INPUT_MPU3050
+	tristate "MPU3050 Triaxial gyroscope sensor"
+	depends on I2C
+	help
+	  Say Y here if you want to support InvenSense MPU3050
+	  connected via an I2C bus.
+
+	  To compile this driver as a module, choose M here: the
+	  module will be called mpu3050.
+
 endif
drivers/input/misc/Makefile +1 -0
index 0925781..3780b83 100644
@@ -28,6 +28,7 @@ obj-$(CONFIG_INPUT_IXP4XX_BEEPER)	+= ixp4xx-beeper.o
 obj-$(CONFIG_INPUT_KEYSPAN_REMOTE)	+= keyspan_remote.o
 obj-$(CONFIG_INPUT_M68K_BEEP)		+= m68kspkr.o
 obj-$(CONFIG_INPUT_MAX8925_ONKEY)	+= max8925_onkey.o
+obj-$(CONFIG_INPUT_MPU3050)		+= mpu3050.o
 obj-$(CONFIG_INPUT_PCAP)		+= pcap_keys.o
 obj-$(CONFIG_INPUT_PCF50633_PMU)	+= pcf50633-input.o
 obj-$(CONFIG_INPUT_PCF8574)		+= pcf8574_keypad.o
drivers/input/misc/mpu3050.c new file +421 -0

421 lines not on this page · raw message

maintainer
#1 lore raw

Hi Alan,

Quoted 8 lines · Alan Cox

From: Joseph Lai <[email protected]>

This driver is registered as an input device. An IRQ is required in this basic driver configuration.

[Cleaned up PM_RUNTIME defines]

I rearranged the code a bit and consolidated PM methods. If the version below still makes sense to you I will queue it for 3.1.

Thanks.

Signature · 20 lines
Dmitry

Input: add a driver to support InvenSense mpu3050 gyroscope chip

From: Joseph Lai <[email protected]>

This driver is registered as an input device. An IRQ is required in this
basic driver configuration.

Signed-off-by: Joseph Lai <[email protected]>
[Cleaned up PM_RUNTIME defines]
Signed-off-by: Alan Cox <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
---

 drivers/input/misc/Kconfig   |   10 +
 drivers/input/misc/Makefile  |    1 
 drivers/input/misc/mpu3050.c |  376 ++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 387 insertions(+), 0 deletions(-)
 create mode 100644 drivers/input/misc/mpu3050.c
drivers/input/misc/Kconfig +10 -0
index 0f22918..6fdce4b 100644
@@ -111,6 +111,16 @@ config INPUT_MMA8450
 	  To compile this driver as a module, choose M here: the
 	  module will be called mma8450.
 
+config INPUT_MPU3050
+	tristate "MPU3050 Triaxial gyroscope sensor"
+	depends on I2C
+	help
+	  Say Y here if you want to support InvenSense MPU3050
+	  connected via an I2C bus.
+
+	  To compile this driver as a module, choose M here: the
+	  module will be called mpu3050.
+
 config INPUT_APANEL
 	tristate "Fujitsu Lifebook Application Panel buttons"
 	depends on X86 && I2C && LEDS_CLASS
drivers/input/misc/Makefile +1 -0
index 99953c3..b7e227a 100644
@@ -28,6 +28,7 @@ obj-$(CONFIG_INPUT_KEYSPAN_REMOTE)	+= keyspan_remote.o
 obj-$(CONFIG_INPUT_M68K_BEEP)		+= m68kspkr.o
 obj-$(CONFIG_INPUT_MAX8925_ONKEY)	+= max8925_onkey.o
 obj-$(CONFIG_INPUT_MMA8450)		+= mma8450.o
+obj-$(CONFIG_INPUT_MPU3050)		+= mpu3050.o
 obj-$(CONFIG_INPUT_PCAP)		+= pcap_keys.o
 obj-$(CONFIG_INPUT_PCF50633_PMU)	+= pcf50633-input.o
 obj-$(CONFIG_INPUT_PCF8574)		+= pcf8574_keypad.o
drivers/input/misc/mpu3050.c new file +376 -0

376 lines not on this page · raw message