aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/misc
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/input/misc')
-rw-r--r--drivers/input/misc/Kconfig43
-rw-r--r--drivers/input/misc/Makefile4
-rw-r--r--drivers/input/misc/drv260x.c741
-rw-r--r--drivers/input/misc/drv2667.c500
-rw-r--r--drivers/input/misc/max77693-haptic.c357
-rw-r--r--drivers/input/misc/palmas-pwrbutton.c332
-rw-r--r--drivers/input/misc/soc_button_array.c60
7 files changed, 2008 insertions, 29 deletions
<
diff --git a/drivers/input/misc/Kconfig b/drivers/input/misc/Kconfig
index 2ff4425a893b..23297ab6163f 100644
--- a/drivers/input/misc/Kconfig
+++ b/drivers/input/misc/Kconfig
@@ -144,6 +144,17 @@ config INPUT_M68K_BEEP
144 tristate "M68k Beeper support" 144 tristate "M68k Beeper support"
145 depends on M68K 145 depends on M68K
146 146
147config INPUT_MAX77693_HAPTIC
148 tristate "MAXIM MAX77693 haptic controller support"
149 depends on MFD_MAX77693 && PWM
150 select INPUT_FF_MEMLESS
151 help
152 This option enables support for the haptic controller on
153 MAXIM MAX77693 chip.
154
155 To compile this driver as module, choose M here: the
156 module will be called max77693-haptic.
157
147config INPUT_MAX8925_ONKEY 158config INPUT_MAX8925_ONKEY
148 tristate "MAX8925 ONKEY support" 159 tristate "MAX8925 ONKEY support"
149 depends on MFD_MAX8925 160 depends on MFD_MAX8925
@@ -451,6 +462,16 @@ config HP_SDC_RTC
451 Say Y here if you want to support the built-in real time clock 462 Say Y here if you want to support the built-in real time clock
452 of the HP SDC controller. 463 of the HP SDC controller.
453 464
465config INPUT_PALMAS_PWRBUTTON
466 tristate "Palmas Power button Driver"
467 depends on MFD_PALMAS
468 help
469 Say Y here if you want to enable power key reporting via the
470 Palmas family of PMICs.
471
472 To compile this driver as a module, choose M here. The module will
473 be called palmas_pwrbutton.
474
454config INPUT_PCF50633_PMU 475config INPUT_PCF50633_PMU
455 tristate "PCF50633 PMU events" 476 tristate "PCF50633 PMU events"
456 depends on MFD_PCF50633 477 depends on MFD_PCF50633
@@ -676,4 +697,26 @@ config INPUT_SOC_BUTTON_ARRAY
676 To compile this driver as a module, choose M here: the 697 To compile this driver as a module, choose M here: the
677 module will be called soc_button_array. 698 module will be called soc_button_array.
678 699
700config INPUT_DRV260X_HAPTICS
701 tristate "TI DRV260X haptics support"
702 depends on INPUT && I2C && GPIOLIB
703 select INPUT_FF_MEMLESS
704 select REGMAP_I2C
705 help
706 Say Y to enable support for the TI DRV260X haptics driver.
707
708 To compile this driver as a module, choose M here: the
709 module will be called drv260x-haptics.
710
711config INPUT_DRV2667_HAPTICS
712 tristate "TI DRV2667 haptics support"
713 depends on INPUT && I2C
714 select INPUT_FF_MEMLESS
715 select REGMAP_I2C
716 help
717 Say Y to enable support for the TI DRV2667 haptics driver.
718
719 To compile this driver as a module, choose M here: the
720 module will be called drv260x-haptics.
721
679endif 722endif
diff --git a/drivers/input/misc/Makefile b/drivers/input/misc/Makefile
index 4955ad322a01..19c760361f80 100644
--- a/drivers/input/misc/Makefile
+++ b/drivers/input/misc/Makefile
@@ -26,6 +26,8 @@ obj-$(CONFIG_INPUT_COBALT_BTNS) += cobalt_btns.o
26obj-$(CONFIG_INPUT_DA9052_ONKEY) += da9052_onkey.o 26obj-$(CONFIG_INPUT_DA9052_ONKEY) += da9052_onkey.o
27obj-$(CONFIG_INPUT_DA9055_ONKEY) += da9055_onkey.o 27obj-$(CONFIG_INPUT_DA9055_ONKEY) += da9055_onkey.o
28obj-$(CONFIG_INPUT_DM355EVM) += dm355evm_keys.o 28obj-$(CONFIG_INPUT_DM355EVM) += dm355evm_keys.o
29obj-$(CONFIG_INPUT_DRV260X_HAPTICS) += drv260x.o
30obj-$(CONFIG_INPUT_DRV2667_HAPTICS) += drv2667.o
29obj-$(CONFIG_INPUT_GP2A) += gp2ap002a00f.o 31obj-$(CONFIG_INPUT_GP2A) += gp2ap002a00f.o
30obj-$(CONFIG_INPUT_GPIO_BEEPER) += gpio-beeper.o 32obj-$(CONFIG_INPUT_GPIO_BEEPER) += gpio-beeper.o
31obj-$(CONFIG_INPUT_GPIO_TILT_POLLED) += gpio_tilt_polled.o 33obj-$(CONFIG_INPUT_GPIO_TILT_POLLED) += gpio_tilt_polled.o
@@ -35,11 +37,13 @@ obj-$(CONFIG_INPUT_IXP4XX_BEEPER) += ixp4xx-beeper.o
35obj-$(CONFIG_INPUT_KEYSPAN_REMOTE) += keyspan_remote.o 37obj-$(CONFIG_INPUT_KEYSPAN_REMOTE) += keyspan_remote.o
36obj-$(CONFIG_INPUT_KXTJ9) += kxtj9.o 38obj-$(CONFIG_INPUT_KXTJ9) += kxtj9.o
37obj-$(CONFIG_INPUT_M68K_BEEP) += m68kspkr.o 39obj-$(CONFIG_INPUT_M68K_BEEP) += m68kspkr.o
40obj-$(CONFIG_INPUT_MAX77693_HAPTIC) += max77693-haptic.o
38obj-$(CONFIG_INPUT_MAX8925_ONKEY) += max8925_onkey.o 41obj-$(CONFIG_INPUT_MAX8925_ONKEY) += max8925_onkey.o
39obj-$(CONFIG_INPUT_MAX8997_HAPTIC) += max8997_haptic.o 42obj-$(CONFIG_INPUT_MAX8997_HAPTIC) += max8997_haptic.o
40obj-$(CONFIG_INPUT_MC13783_PWRBUTTON) += mc13783-pwrbutton.o 43obj-$(CONFIG_INPUT_MC13783_PWRBUTTON) += mc13783-pwrbutton.o
41obj-$(CONFIG_INPUT_MMA8450) += mma8450.o 44obj-$(CONFIG_INPUT_MMA8450) += mma8450.o
42obj-$(CONFIG_INPUT_MPU3050) += mpu3050.o 45obj-$(CONFIG_INPUT_MPU3050) += mpu3050.o
46obj-$(CONFIG_INPUT_PALMAS_PWRBUTTON) += palmas-pwrbutton.o
43obj-$(CONFIG_INPUT_PCAP) += pcap_keys.o 47obj-$(CONFIG_INPUT_PCAP) += pcap_keys.o
44obj-$(CONFIG_INPUT_PCF50633_PMU) += pcf50633-input.o 48obj-$(CONFIG_INPUT_PCF50633_PMU) += pcf50633-input.o
45obj-$(CONFIG_INPUT_PCF8574) += pcf8574_keypad.o 49obj-$(CONFIG_INPUT_PCF8574) += pcf8574_keypad.o
diff --git a/drivers/input/misc/drv260x.c b/drivers/input/misc/drv260x.c
new file mode 100644
index 000000000000..cab87f5ce6d3
--- /dev/null
+++ b/drivers/input/misc/drv260x.c
@@ -0,0 +1,741 @@
1/*
2 * DRV260X haptics driver family
3 *
4 * Author: Dan Murphy <dmurphy@ti.com>
5 *
6 * Copyright: (C) 2014 Texas Instruments, Inc.
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 *
12 * This program is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * General Public License for more details.
16 */
17
18#include <linux/i2c.h>
19#include <linux/input.h>
20#include <linux/module.h>
21#include <linux/of_gpio.h>
22#include <linux/platform_device.h>
23#include <linux/regmap.h>
24#include <linux/slab.h>
25#include <linux/delay.h>
26#include <linux/gpio/consumer.h>
27#include <linux/regulator/consumer.h>
28
29#include <dt-bindings/input/ti-drv260x.h>
30#include <linux/platform_data/drv260x-pdata.h>
31
32#define DRV260X_STATUS 0x0
33#define DRV260X_MODE 0x1
34#define DRV260X_RT_PB_IN 0x2
35#define DRV260X_LIB_SEL 0x3
36#define DRV260X_WV_SEQ_1 0x4
37#define DRV260X_WV_SEQ_2 0x5
38#define DRV260X_WV_SEQ_3 0x6
39#define DRV260X_WV_SEQ_4 0x7
40#define DRV260X_WV_SEQ_5 0x8
41#define DRV260X_WV_SEQ_6 0x9
42#define DRV260X_WV_SEQ_7 0xa
43#define DRV260X_WV_SEQ_8 0xb
44#define DRV260X_GO 0xc
45#define DRV260X_OVERDRIVE_OFF 0xd
46#define DRV260X_SUSTAIN_P_OFF 0xe
47#define DRV260X_SUSTAIN_N_OFF 0xf
48#define DRV260X_BRAKE_OFF 0x10
49#define DRV260X_A_TO_V_CTRL 0x11
50#define DRV260X_A_TO_V_MIN_INPUT 0x12
51#define DRV260X_A_TO_V_MAX_INPUT 0x13
52#define DRV260X_A_TO_V_MIN_OUT 0x14
53#define DRV260X_A_TO_V_MAX_OUT 0x15
54#define DRV260X_RATED_VOLT 0x16
55#define DRV260X_OD_CLAMP_VOLT 0x17
56#define DRV260X_CAL_COMP 0x18
57#define DRV260X_CAL_BACK_EMF 0x19
58#define DRV260X_FEEDBACK_CTRL 0x1a
59#define DRV260X_CTRL1 0x1b
60#define DRV260X_CTRL2 0x1c
61#define DRV260X_CTRL3 0x1d
62#define DRV260X_CTRL4 0x1e
63#define DRV260X_CTRL5 0x1f
64#define DRV260X_LRA_LOOP_PERIOD 0x20
65#define DRV260X_VBAT_MON 0x21
66#define DRV260X_LRA_RES_PERIOD 0x22
67#define DRV260X_MAX_REG 0x23
68
69#define DRV260X_GO_BIT 0x01
70
71/* Library Selection */
72#define DRV260X_LIB_SEL_MASK 0x07
73#define DRV260X_LIB_SEL_RAM 0x0
74#define DRV260X_LIB_SEL_OD 0x1
75#define DRV260X_LIB_SEL_40_60 0x2
76#define DRV260X_LIB_SEL_60_80 0x3
77#define DRV260X_LIB_SEL_100_140 0x4
78#define DRV260X_LIB_SEL_140_PLUS 0x5
79
80#define DRV260X_LIB_SEL_HIZ_MASK 0x10
81#define DRV260X_LIB_SEL_HIZ_EN 0x01
82