aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/misc
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2014-05-14 19:49:19 -0400
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2014-05-14 19:49:19 -0400
commit879f99ef2c4c05d9a7f0a67a05f1415663119825 (patch)
tree0399664761f675eef741f8b08b92635069586151 /drivers/input/misc
parent70a26071f8552a0f193cf442f424decfe0f2e569 (diff)
parentd6d211db37e75de2ddc3a4f979038c40df7cc79c (diff)
Merge tag 'v3.15-rc5' into next
Merge with Linux 3.15-rc5 to sync up Wacom and other changes.
Diffstat (limited to 'drivers/input/misc')
-rw-r--r--drivers/input/misc/Kconfig4
-rw-r--r--drivers/input/misc/arizona-haptics.c19
-rw-r--r--drivers/input/misc/bma150.c4
-rw-r--r--drivers/input/misc/da9055_onkey.c1
-rw-r--r--drivers/input/misc/ixp4xx-beeper.c2
-rw-r--r--drivers/input/misc/soc_button_array.c1
6 files changed, 7 insertions, 24 deletions
diff --git a/drivers/input/misc/Kconfig b/drivers/input/misc/Kconfig
index 05ae7e7cddde..2ff4425a893b 100644
--- a/drivers/input/misc/Kconfig
+++ b/drivers/input/misc/Kconfig
@@ -156,7 +156,7 @@ config INPUT_MAX8925_ONKEY
156 156
157config INPUT_MAX8997_HAPTIC 157config INPUT_MAX8997_HAPTIC
158 tristate "MAXIM MAX8997 haptic controller support" 158 tristate "MAXIM MAX8997 haptic controller support"
159 depends on PWM && HAVE_PWM && MFD_MAX8997 159 depends on PWM && MFD_MAX8997
160 select INPUT_FF_MEMLESS 160 select INPUT_FF_MEMLESS
161 help 161 help
162 This option enables device driver support for the haptic controller 162 This option enables device driver support for the haptic controller
@@ -470,7 +470,7 @@ config INPUT_PCF8574
470 470
471config INPUT_PWM_BEEPER 471config INPUT_PWM_BEEPER
472 tristate "PWM beeper support" 472 tristate "PWM beeper support"
473 depends on PWM && HAVE_PWM 473 depends on PWM
474 help 474 help
475 Say Y here to get support for PWM based beeper devices. 475 Say Y here to get support for PWM based beeper devices.
476 476
diff --git a/drivers/input/misc/arizona-haptics.c b/drivers/input/misc/arizona-haptics.c
index 7a04f54ef961..ef2e281b0a43 100644
--- a/drivers/input/misc/arizona-haptics.c
+++ b/drivers/input/misc/arizona-haptics.c
@@ -37,7 +37,6 @@ static void arizona_haptics_work(struct work_struct *work)
37 struct arizona_haptics, 37 struct arizona_haptics,
38 work); 38 work);
39 struct arizona *arizona = haptics->arizona; 39 struct arizona *arizona = haptics->arizona;
40 struct mutex *dapm_mutex = &arizona->dapm->card->dapm_mutex;
41 int ret; 40 int ret;
42 41
43 if (!haptics->arizona->dapm) { 42 if (!haptics->arizona->dapm) {
@@ -67,13 +66,10 @@ static void arizona_haptics_work(struct work_struct *work)
67 return; 66 return;
68 } 67 }
69 68
70 mutex_lock_nested(dapm_mutex, SND_SOC_DAPM_CLASS_RUNTIME);
71
72 ret = snd_soc_dapm_enable_pin(arizona->dapm, "HAPTICS"); 69 ret = snd_soc_dapm_enable_pin(arizona->dapm, "HAPTICS");
73 if (ret != 0) { 70 if (ret != 0) {
74 dev_err(arizona->dev, "Failed to start HAPTICS: %d\n", 71 dev_err(arizona->dev, "Failed to start HAPTICS: %d\n",
75 ret); 72 ret);
76 mutex_unlock(dapm_mutex);
77 return; 73 return;
78 } 74 }
79 75
@@ -81,21 +77,14 @@ static void arizona_haptics_work(struct work_struct *work)
81 if (ret != 0) { 77 if (ret != 0) {
82 dev_err(arizona->dev, "Failed to sync DAPM: %d\n", 78 dev_err(arizona->dev, "Failed to sync DAPM: %d\n",
83 ret); 79 ret);
84 mutex_unlock(dapm_mutex);
85 return; 80 return;
86 } 81 }
87
88 mutex_unlock(dapm_mutex);
89
90 } else { 82 } else {
91 /* This disable sequence will be a noop if already enabled */ 83 /* This disable sequence will be a noop if already enabled */
92 mutex_lock_nested(dapm_mutex, SND_SOC_DAPM_CLASS_RUNTIME);
93
94 ret = snd_soc_dapm_disable_pin(arizona->dapm, "HAPTICS"); 84 ret = snd_soc_dapm_disable_pin(arizona->dapm, "HAPTICS");
95 if (ret != 0) { 85 if (ret != 0) {
96 dev_err(arizona->dev, "Failed to disable HAPTICS: %d\n", 86 dev_err(arizona->dev, "Failed to disable HAPTICS: %d\n",
97 ret); 87 ret);
98 mutex_unlock(dapm_mutex);
99 return; 88 return;
100 } 89 }
101 90
@@ -103,12 +92,9 @@ static void arizona_haptics_work(struct work_struct *work)
103 if (ret != 0) { 92 if (ret != 0) {
104 dev_err(arizona->dev, "Failed to sync DAPM: %d\n", 93 dev_err(arizona->dev, "Failed to sync DAPM: %d\n",
105 ret); 94 ret);
106 mutex_unlock(dapm_mutex);
107 return; 95 return;
108 } 96 }
109 97
110 mutex_unlock(dapm_mutex);
111
112 ret = regmap_update_bits(arizona->regmap, 98 ret = regmap_update_bits(arizona->regmap,
113 ARIZONA_HAPTICS_CONTROL_1, 99 ARIZONA_HAPTICS_CONTROL_1,
114 ARIZONA_HAP_CTRL_MASK, 100 ARIZONA_HAP_CTRL_MASK,
@@ -155,16 +141,11 @@ static int arizona_haptics_play(struct input_dev *input, void *data,
155static void arizona_haptics_close(struct input_dev *input) 141static void arizona_haptics_close(struct input_dev *input)
156{ 142{
157 struct arizona_haptics *haptics = input_get_drvdata(input); 143 struct arizona_haptics *haptics = input_get_drvdata(input);
158 struct mutex *dapm_mutex = &haptics->arizona->dapm->card->dapm_mutex;
159 144
160 cancel_work_sync(&haptics->work); 145 cancel_work_sync(&haptics->work);
161 146
162 mutex_lock_nested(dapm_mutex, SND_SOC_DAPM_CLASS_RUNTIME);
163
164 if (haptics->arizona->dapm) 147 if (haptics->arizona->dapm)
165 snd_soc_dapm_disable_pin(haptics->arizona->dapm, "HAPTICS"); 148 snd_soc_dapm_disable_pin(haptics->arizona->dapm, "HAPTICS");
166
167 mutex_unlock(dapm_mutex);
168} 149}
169 150
170static int arizona_haptics_probe(struct platform_device *pdev) 151static int arizona_haptics_probe(struct platform_device *pdev)
diff --git a/drivers/input/misc/bma150.c b/drivers/input/misc/bma150.c
index 52d3a9b28f0b..b36831c828d3 100644
--- a/drivers/input/misc/bma150.c
+++ b/drivers/input/misc/bma150.c
@@ -70,6 +70,7 @@
70#define BMA150_CFG_5_REG 0x11 70#define BMA150_CFG_5_REG 0x11
71 71
72#define BMA150_CHIP_ID 2 72#define BMA150_CHIP_ID 2
73#define BMA180_CHIP_ID 3
73#define BMA150_CHIP_ID_REG BMA150_DATA_0_REG 74#define BMA150_CHIP_ID_REG BMA150_DATA_0_REG
74 75
75#define BMA150_ACC_X_LSB_REG BMA150_DATA_2_REG 76#define BMA150_ACC_X_LSB_REG BMA150_DATA_2_REG
@@ -539,7 +540,7 @@ static int bma150_probe(struct i2c_client *client,
539 } 540 }
540 541
541 chip_id = i2c_smbus_read_byte_data(client, BMA150_CHIP_ID_REG); 542 chip_id = i2c_smbus_read_byte_data(client, BMA150_CHIP_ID_REG);
542 if (chip_id != BMA150_CHIP_ID) { 543 if (chip_id != BMA150_CHIP_ID && chip_id != BMA180_CHIP_ID) {
543 dev_err(&client->dev, "BMA150 chip id error: %d\n", chip_id); 544 dev_err(&client->dev, "BMA150 chip id error: %d\n", chip_id);
544 return -EINVAL; 545 return -EINVAL;
545 } 546 }
@@ -643,6 +644,7 @@ static UNIVERSAL_DEV_PM_OPS(bma150_pm, bma150_suspend, bma150_resume, NULL);
643 644
644static const struct i2c_device_id bma150_id[] = { 645static const struct i2c_device_id bma150_id[] = {
645 { "bma150", 0 }, 646 { "bma150", 0 },
647 { "bma180", 0 },
646 { "smb380", 0 }, 648 { "smb380", 0 },
647 { "bma023", 0 }, 649 { "bma023", 0 },
648 { } 650 { }
diff --git a/drivers/input/misc/da9055_onkey.c b/drivers/input/misc/da9055_onkey.c
index 4b11ede34950..4765799fef74 100644
--- a/drivers/input/misc/da9055_onkey.c
+++ b/drivers/input/misc/da9055_onkey.c
@@ -109,7 +109,6 @@ static int da9055_onkey_probe(struct platform_device *pdev)
109 109
110 INIT_DELAYED_WORK(&onkey->work, da9055_onkey_work); 110 INIT_DELAYED_WORK(&onkey->work, da9055_onkey_work);
111 111
112 irq = regmap_irq_get_virq(da9055->irq_data, irq);
113 err = request_threaded_irq(irq, NULL, da9055_onkey_irq, 112 err = request_threaded_irq(irq, NULL, da9055_onkey_irq,
114 IRQF_TRIGGER_HIGH | IRQF_ONESHOT, 113 IRQF_TRIGGER_HIGH | IRQF_ONESHOT,
115 "ONKEY", onkey); 114 "ONKEY", onkey);
diff --git a/drivers/input/misc/ixp4xx-beeper.c b/drivers/input/misc/ixp4xx-beeper.c
index 17ccba88d636..ed8e5e8449d3 100644
--- a/drivers/input/misc/ixp4xx-beeper.c
+++ b/drivers/input/misc/ixp4xx-beeper.c
@@ -67,7 +67,7 @@ static int ixp4xx_spkr_event(struct input_dev *dev, unsigned int type, unsigned
67 } 67 }
68 68
69 if (value > 20 && value < 32767) 69 if (value > 20 && value < 32767)
70 count = (IXP4XX_TIMER_FREQ / (value * 4)) - 1; 70 count = (ixp4xx_timer_freq / (value * 4)) - 1;
71 71
72 ixp4xx_spkr_control(pin, count); 72 ixp4xx_spkr_control(pin, count);
73 73
diff --git a/drivers/input/misc/soc_button_array.c b/drivers/input/misc/soc_button_array.c
index 08ead2aaede5..20c80f543d5e 100644
--- a/drivers/input/misc/soc_button_array.c
+++ b/drivers/input/misc/soc_button_array.c
@@ -169,6 +169,7 @@ static int soc_button_pnp_probe(struct pnp_dev *pdev,
169 soc_button_remove(pdev); 169 soc_button_remove(pdev);
170 return error; 170 return error;
171 } 171 }
172 continue;
172 } 173 }
173 174
174 priv->children[i] = pd; 175 priv->children[i] = pd;