Add a driver to support InvenSense mpu3050 gyroscope chip.
Subsystems (2)
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.
Signed-off-by Joseph Lai <[email protected]>
[Cleaned up PM_RUNTIME defines]
Signed-off-by Alan Cox <[email protected]>
---
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
@@ -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
@@ -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
Dmitry Torokhov
maintainerHi 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.
Signed-off-by Joseph Lai <[email protected]>[Cleaned up PM_RUNTIME defines]Signed-off-by Alan Cox <[email protected]>
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
@@ -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
@@ -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