Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Pull input updates from Dmitry Torokhov: "Two new touchpad drivers - Cypress APA I2C Trackpad and Cypress PS/2 touchpad and a big update to ALPS driver from Kevin Cernekee that adds support for "Rushmore" touchpads and paves way for adding support for "Dolphin" touchpads. There is also a new input driver for Goldfish emulator and also Android keyreset driver was folded into SysRq code. A few more drivers were updated with device tree bindings and others got some small cleanups and fixes." * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (55 commits) Input: cyttsp-spi - remove duplicate MODULE_ALIAS() Input: tsc2005 - add MODULE_ALIAS Input: tegra-kbc - require CONFIG_OF, remove platform data Input: synaptics - initialize pointer emulation usage Input: MT - do not apply filtering on emulated events Input: bma150 - make some defines public and fix some comments Input: bma150 - fix checking pm_runtime_get_sync() return value Input: ALPS - enable trackstick on Rushmore touchpads Input: ALPS - add support for "Rushmore" touchpads Input: ALPS - make the V3 packet field decoder "pluggable" Input: ALPS - move pixel and bitmap info into alps_data struct Input: ALPS - fix command mode check Input: ALPS - rework detection of Pinnacle AGx touchpads Input: ALPS - move {addr,nibble}_command settings into alps_set_defaults() Input: ALPS - use function pointers for different protocol handlers Input: ALPS - rework detection sequence Input: ALPS - introduce helper function for repeated commands Input: ALPS - move alps_get_model() down below hw_init code Input: ALPS - copy "model" info into alps_data struct Input: ALPS - document the alps.h data structures ...
This commit is contained in:
@@ -359,7 +359,7 @@ config TOUCHSCREEN_MCS5000
|
||||
|
||||
config TOUCHSCREEN_MMS114
|
||||
tristate "MELFAS MMS114 touchscreen"
|
||||
depends on I2C
|
||||
depends on I2C && GENERIC_HARDIRQS
|
||||
help
|
||||
Say Y here if you have the MELFAS MMS114 touchscreen controller
|
||||
chip in your system.
|
||||
|
@@ -193,7 +193,6 @@ static struct spi_driver cyttsp_spi_driver = {
|
||||
|
||||
module_spi_driver(cyttsp_spi_driver);
|
||||
|
||||
MODULE_ALIAS("spi:cyttsp");
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_DESCRIPTION("Cypress TrueTouch(R) Standard Product (TTSP) SPI driver");
|
||||
MODULE_AUTHOR("Cypress");
|
||||
|
@@ -429,12 +429,12 @@ static int mms114_probe(struct i2c_client *client,
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
data = kzalloc(sizeof(struct mms114_data), GFP_KERNEL);
|
||||
input_dev = input_allocate_device();
|
||||
data = devm_kzalloc(&client->dev, sizeof(struct mms114_data),
|
||||
GFP_KERNEL);
|
||||
input_dev = devm_input_allocate_device(&client->dev);
|
||||
if (!data || !input_dev) {
|
||||
dev_err(&client->dev, "Failed to allocate memory\n");
|
||||
error = -ENOMEM;
|
||||
goto err_free_mem;
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
data->client = client;
|
||||
@@ -466,57 +466,36 @@ static int mms114_probe(struct i2c_client *client,
|
||||
input_set_drvdata(input_dev, data);
|
||||
i2c_set_clientdata(client, data);
|
||||
|
||||
data->core_reg = regulator_get(&client->dev, "avdd");
|
||||
data->core_reg = devm_regulator_get(&client->dev, "avdd");
|
||||
if (IS_ERR(data->core_reg)) {
|
||||
error = PTR_ERR(data->core_reg);
|
||||
dev_err(&client->dev,
|
||||
"Unable to get the Core regulator (%d)\n", error);
|
||||
goto err_free_mem;
|
||||
return error;
|
||||
}
|
||||
|
||||
data->io_reg = regulator_get(&client->dev, "vdd");
|
||||
data->io_reg = devm_regulator_get(&client->dev, "vdd");
|
||||
if (IS_ERR(data->io_reg)) {
|
||||
error = PTR_ERR(data->io_reg);
|
||||
dev_err(&client->dev,
|
||||
"Unable to get the IO regulator (%d)\n", error);
|
||||
goto err_core_reg;
|
||||
return error;
|
||||
}
|
||||
|
||||
error = request_threaded_irq(client->irq, NULL, mms114_interrupt,
|
||||
IRQF_TRIGGER_FALLING | IRQF_ONESHOT, "mms114", data);
|
||||
error = devm_request_threaded_irq(&client->dev, client->irq, NULL,
|
||||
mms114_interrupt, IRQF_TRIGGER_FALLING | IRQF_ONESHOT,
|
||||
dev_name(&client->dev), data);
|
||||
if (error) {
|
||||
dev_err(&client->dev, "Failed to register interrupt\n");
|
||||
goto err_io_reg;
|
||||
return error;
|
||||
}
|
||||
disable_irq(client->irq);
|
||||
|
||||
error = input_register_device(data->input_dev);
|
||||
if (error)
|
||||
goto err_free_irq;
|
||||
|
||||
return 0;
|
||||
|
||||
err_free_irq:
|
||||
free_irq(client->irq, data);
|
||||
err_io_reg:
|
||||
regulator_put(data->io_reg);
|
||||
err_core_reg:
|
||||
regulator_put(data->core_reg);
|
||||
err_free_mem:
|
||||
input_free_device(input_dev);
|
||||
kfree(data);
|
||||
return error;
|
||||
}
|
||||
|
||||
static int mms114_remove(struct i2c_client *client)
|
||||
{
|
||||
struct mms114_data *data = i2c_get_clientdata(client);
|
||||
|
||||
free_irq(client->irq, data);
|
||||
regulator_put(data->io_reg);
|
||||
regulator_put(data->core_reg);
|
||||
input_unregister_device(data->input_dev);
|
||||
kfree(data);
|
||||
if (error) {
|
||||
dev_err(&client->dev, "Failed to register input device\n");
|
||||
return error;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -590,7 +569,6 @@ static struct i2c_driver mms114_driver = {
|
||||
.of_match_table = of_match_ptr(mms114_dt_match),
|
||||
},
|
||||
.probe = mms114_probe,
|
||||
.remove = mms114_remove,
|
||||
.id_table = mms114_id,
|
||||
};
|
||||
|
||||
|
@@ -120,6 +120,7 @@ static void stmpe_work(struct work_struct *work)
|
||||
__stmpe_reset_fifo(ts->stmpe);
|
||||
|
||||
input_report_abs(ts->idev, ABS_PRESSURE, 0);
|
||||
input_report_key(ts->idev, BTN_TOUCH, 0);
|
||||
input_sync(ts->idev);
|
||||
}
|
||||
|
||||
@@ -153,6 +154,7 @@ static irqreturn_t stmpe_ts_handler(int irq, void *data)
|
||||
input_report_abs(ts->idev, ABS_X, x);
|
||||
input_report_abs(ts->idev, ABS_Y, y);
|
||||
input_report_abs(ts->idev, ABS_PRESSURE, z);
|
||||
input_report_key(ts->idev, BTN_TOUCH, 1);
|
||||
input_sync(ts->idev);
|
||||
|
||||
/* flush the FIFO after we have read out our values. */
|
||||
|
@@ -753,3 +753,4 @@ module_spi_driver(tsc2005_driver);
|
||||
MODULE_AUTHOR("Lauri Leukkunen <lauri.leukkunen@nokia.com>");
|
||||
MODULE_DESCRIPTION("TSC2005 Touchscreen Driver");
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_ALIAS("spi:tsc2005");
|
||||
|
@@ -247,7 +247,7 @@ static int wm831x_ts_probe(struct platform_device *pdev)
|
||||
|
||||
wm831x_ts = devm_kzalloc(&pdev->dev, sizeof(struct wm831x_ts),
|
||||
GFP_KERNEL);
|
||||
input_dev = input_allocate_device();
|
||||
input_dev = devm_input_allocate_device(&pdev->dev);
|
||||
if (!wm831x_ts || !input_dev) {
|
||||
error = -ENOMEM;
|
||||
goto err_alloc;
|
||||
@@ -376,7 +376,6 @@ err_pd_irq:
|
||||
err_data_irq:
|
||||
free_irq(wm831x_ts->data_irq, wm831x_ts);
|
||||
err_alloc:
|
||||
input_free_device(input_dev);
|
||||
|
||||
return error;
|
||||
}
|
||||
@@ -387,7 +386,6 @@ static int wm831x_ts_remove(struct platform_device *pdev)
|
||||
|
||||
free_irq(wm831x_ts->pd_irq, wm831x_ts);
|
||||
free_irq(wm831x_ts->data_irq, wm831x_ts);
|
||||
input_unregister_device(wm831x_ts->input_dev);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user