Skip to content

Commit

Permalink
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel…
Browse files Browse the repository at this point in the history
…/git/dtor/input

Pull input updates from Dmitry Torokhov:

 - update the ili210x touchscreen driver, refreshing the code and adding
   support for ILI251X line

 - add support for st1633 to the st1232 touchscreen driver

 - add support for sx8650 to the the sx8654 touchscreen driver

 - add support for Evervision FT5726 to the edt-ft5x06 touchscreen
   driver

 - add support for gt5688 to the Goodix touchscreen driver

 - new vibrator driver for MSM SOCs

 - miscellaneous fixes for the rest of input drivers

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (53 commits)
  Input: wacom_serial4 - add support for Wacom ArtPad II tablet
  Input: elan_i2c - add id for touchpad found in Lenovo s21e-20
  Input: raspberrypi-ts - select CONFIG_INPUT_POLLDEV
  Input: msm-vibrator - use correct gpio header
  Input: ti_am335x_tsc - remove set but not used variable 'tscadc_dev'
  Input: i8042 - rework DT node name comparisons
  Input: goodix - print values in case of inconsistencies
  Input: goodix - refer to touchscreen.txt in device tree bindings
  Input: goodix - support Goodix gt5688
  Input: synaptics_i2c - remove redundant spinlock
  Input: db9 - mark expected switch fall-through
  Input: qt2160 - remove redundant spinlock
  Input: st1232 - handle common DT bindings
  Input: ims-pcu - switch to using brightness_set_blocking()
  Input: st1232 - switch to gpiod API
  Input: ili210x - fetch touchscreen geometry from DT
  Input: msm-vibrator - tweak an error message
  Input: tm2-touchkey - acknowledge that setting brightness is a blocking call
  Input: stmfts - acknowledge that setting brightness is a blocking call
  Input: ili210x - switch to using devm_device_add_group()
  ...
  • Loading branch information
torvalds committed Mar 11, 2019
2 parents 6bc3fe8 + 44fc95e commit 4f02370
Show file tree
Hide file tree
Showing 33 changed files with 1,207 additions and 367 deletions.
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
Samsung tm2-touchkey

Required properties:
- compatible: must be "cypress,tm2-touchkey"
- compatible:
* "cypress,tm2-touchkey" - for the touchkey found on the tm2 board
* "cypress,midas-touchkey" - for the touchkey found on midas boards
* "cypress,aries-touchkey" - for the touchkey found on aries boards
- reg: I2C address of the chip.
- interrupts: interrupt to which the chip is connected (see interrupt
binding[0]).
- vcc-supply : internal regulator output. 1.8V
- vdd-supply : power supply for IC 3.3V

Optional properties:
- linux,keycodes: array of keycodes (max 4), default KEY_PHONE and KEY_BACK

[0]: Documentation/devicetree/bindings/interrupt-controller/interrupts.txt

Example:
Expand All @@ -21,5 +27,6 @@ Example:
interrupts = <2 IRQ_TYPE_EDGE_FALLING>;
vcc-supply=<&ldo32_reg>;
vdd-supply=<&ldo33_reg>;
linux,keycodes = <KEY_PHONE KEY_BACK>;
};
};
25 changes: 25 additions & 0 deletions Documentation/devicetree/bindings/input/ilitek,ili2xxx.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
Ilitek ILI210x/ILI251x touchscreen controller

Required properties:
- compatible:
ilitek,ili210x for ILI210x
ilitek,ili251x for ILI251x

- reg: The I2C address of the device

- interrupts: The sink for the touchscreen's IRQ output
See ../interrupt-controller/interrupts.txt

Optional properties for main touchpad device:

- reset-gpios: GPIO specifier for the touchscreen's reset pin (active low)

Example:

touchscreen@41 {
compatible = "ilitek,ili251x";
reg = <0x41>;
interrupt-parent = <&gpio4>;
interrupts = <7 IRQ_TYPE_EDGE_FALLING>;
reset-gpios = <&gpio5 21 GPIO_ACTIVE_LOW>;
};
36 changes: 36 additions & 0 deletions Documentation/devicetree/bindings/input/msm-vibrator.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
* Device tree bindings for the Qualcomm MSM vibrator

Required properties:

- compatible: Should be one of
"qcom,msm8226-vibrator"
"qcom,msm8974-vibrator"
- reg: the base address and length of the IO memory for the registers.
- pinctrl-names: set to default.
- pinctrl-0: phandles pointing to pin configuration nodes. See
Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt
- clock-names: set to pwm
- clocks: phandle of the clock. See
Documentation/devicetree/bindings/clock/clock-bindings.txt
- enable-gpios: GPIO that enables the vibrator.

Optional properties:

- vcc-supply: phandle to the regulator that provides power to the sensor.

Example from a LG Nexus 5 (hammerhead) phone:

vibrator@fd8c3450 {
reg = <0xfd8c3450 0x400>;
compatible = "qcom,msm8974-vibrator";

vcc-supply = <&pm8941_l19>;

clocks = <&mmcc CAMSS_GP1_CLK>;
clock-names = "pwm";

enable-gpios = <&msmgpio 60 GPIO_ACTIVE_HIGH>;

pinctrl-names = "default";
pinctrl-0 = <&vibrator_pin>;
};
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
FocalTech EDT-FT5x06 Polytouch driver
=====================================

There are 3 variants of the chip for various touch panel sizes
There are 5 variants of the chip for various touch panel sizes
FT5206GE1 2.8" .. 3.8"
FT5306DE4 4.3" .. 7"
FT5406EE8 7" .. 8.9"
FT5506EEG 7" .. 8.9"
FT5726NEI 5.7” .. 11.6"

The software interface is identical for all those chips, so that
currently there is no need for the driver to distinguish between the
Expand All @@ -19,6 +20,7 @@ Required properties:
or: "edt,edt-ft5306"
or: "edt,edt-ft5406"
or: "edt,edt-ft5506"
or: "evervision,ev-ft5726"
or: "focaltech,ft6236"

- reg: I2C slave address of the chip (0x38)
Expand All @@ -42,6 +44,15 @@ Optional properties:

- offset: allows setting the edge compensation in the range from
0 to 31.

- offset-x: Same as offset, but applies only to the horizontal position.
Range from 0 to 80, only supported by evervision,ev-ft5726
devices.

- offset-y: Same as offset, but applies only to the vertical position.
Range from 0 to 80, only supported by evervision,ev-ft5726
devices.

- touchscreen-size-x : See touchscreen.txt
- touchscreen-size-y : See touchscreen.txt
- touchscreen-fuzz-x : See touchscreen.txt
Expand Down
14 changes: 9 additions & 5 deletions Documentation/devicetree/bindings/input/touchscreen/goodix.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Device tree bindings for Goodix GT9xx series touchscreen controller
Required properties:

- compatible : Should be "goodix,gt1151"
or "goodix,gt5688"
or "goodix,gt911"
or "goodix,gt9110"
or "goodix,gt912"
Expand All @@ -18,11 +19,14 @@ Optional properties:
- irq-gpios : GPIO pin used for IRQ. The driver uses the
interrupt gpio pin as output to reset the device.
- reset-gpios : GPIO pin used for reset

- touchscreen-inverted-x : X axis is inverted (boolean)
- touchscreen-inverted-y : Y axis is inverted (boolean)
- touchscreen-swapped-x-y : X and Y axis are swapped (boolean)
(swapping is done after inverting the axis)
- touchscreen-inverted-x
- touchscreen-inverted-y
- touchscreen-size-x
- touchscreen-size-y
- touchscreen-swapped-x-y

The touchscreen-* properties are documented in touchscreen.txt in this
directory.

Example:

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
* Sitronix st1232 touchscreen controller
* Sitronix st1232 or st1633 touchscreen controller

Required properties:
- compatible: must be "sitronix,st1232"
- compatible: must contain one of
* "sitronix,st1232"
* "sitronix,st1633"
- reg: I2C address of the chip
- interrupts: interrupt to which the chip is connected

Optional properties:
- gpios: a phandle to the reset GPIO

For additional optional properties see: touchscreen.txt

Example:

i2c@00000000 {
Expand Down
10 changes: 9 additions & 1 deletion Documentation/devicetree/bindings/input/touchscreen/sx8654.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,23 @@
* Semtech SX8654 I2C Touchscreen Controller

Required properties:
- compatible: must be "semtech,sx8654"
- compatible: must be one of the following, depending on the model:
"semtech,sx8650"
"semtech,sx8654"
"semtech,sx8655"
"semtech,sx8656"
- reg: i2c slave address
- interrupts: touch controller interrupt

Optional properties:
- reset-gpios: GPIO specification for the NRST input

Example:

sx8654@48 {
compatible = "semtech,sx8654";
reg = <0x48>;
interrupt-parent = <&gpio6>;
interrupts = <3 IRQ_TYPE_EDGE_FALLING>;
reset-gpios = <&gpio4 2 GPIO_ACTIVE_LOW>;
};
2 changes: 1 addition & 1 deletion drivers/input/joystick/db9.c
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ static unsigned char db9_saturn_read_packet(struct parport *port, unsigned char
db9_saturn_write_sub(port, type, 3, powered, 0);
return data[0] = 0xe3;
}
/* else: fall through */
/* fall through */
default:
return data[0];
}
Expand Down
10 changes: 10 additions & 0 deletions drivers/input/keyboard/gpio_keys.c
Original file line number Diff line number Diff line change
Expand Up @@ -1015,8 +1015,18 @@ static int __maybe_unused gpio_keys_resume(struct device *dev)

static SIMPLE_DEV_PM_OPS(gpio_keys_pm_ops, gpio_keys_suspend, gpio_keys_resume);

static void gpio_keys_shutdown(struct platform_device *pdev)
{
int ret;

ret = gpio_keys_suspend(&pdev->dev);
if (ret)
dev_err(&pdev->dev, "failed to shutdown\n");
}

static struct platform_driver gpio_keys_device_driver = {
.probe = gpio_keys_probe,
.shutdown = gpio_keys_shutdown,
.driver = {
.name = "gpio-keys",
.pm = &gpio_keys_pm_ops,
Expand Down
5 changes: 2 additions & 3 deletions drivers/input/keyboard/mcs_touchkey.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,8 @@ static int mcs_touchkey_probe(struct i2c_client *client,
return -EINVAL;
}

data = kzalloc(sizeof(struct mcs_touchkey_data) +
sizeof(data->keycodes[0]) * (pdata->key_maxval + 1),
GFP_KERNEL);
data = kzalloc(struct_size(data, keycodes, pdata->key_maxval + 1),
GFP_KERNEL);
input_dev = input_allocate_device();
if (!data || !input_dev) {
dev_err(&client->dev, "Failed to allocate memory\n");
Expand Down
13 changes: 6 additions & 7 deletions drivers/input/keyboard/mtk-pmic-keys.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,17 @@
*
*/

#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/input.h>
#include <linux/interrupt.h>
#include <linux/platform_device.h>
#include <linux/kernel.h>
#include <linux/of.h>
#include <linux/of_device.h>
#include <linux/regmap.h>
#include <linux/mfd/mt6323/registers.h>
#include <linux/mfd/mt6397/registers.h>
#include <linux/mfd/mt6397/core.h>
#include <linux/mfd/mt6397/registers.h>
#include <linux/module.h>
#include <linux/of_device.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/regmap.h>

#define MTK_PMIC_PWRKEY_RST_EN_MASK 0x1
#define MTK_PMIC_PWRKEY_RST_EN_SHIFT 6
Expand Down
9 changes: 0 additions & 9 deletions drivers/input/keyboard/qt2160.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ struct qt2160_data {
struct i2c_client *client;
struct input_dev *input;
struct delayed_work dwork;
spinlock_t lock; /* Protects canceling/rescheduling of dwork */
unsigned short keycodes[ARRAY_SIZE(qt2160_key2code)];
u16 key_matrix;
#ifdef CONFIG_LEDS_CLASS
Expand Down Expand Up @@ -212,22 +211,15 @@ static int qt2160_get_key_matrix(struct qt2160_data *qt2160)
static irqreturn_t qt2160_irq(int irq, void *_qt2160)
{
struct qt2160_data *qt2160 = _qt2160;
unsigned long flags;

spin_lock_irqsave(&qt2160->lock, flags);

mod_delayed_work(system_wq, &qt2160->dwork, 0);

spin_unlock_irqrestore(&qt2160->lock, flags);

return IRQ_HANDLED;
}

static void qt2160_schedule_read(struct qt2160_data *qt2160)
{
spin_lock_irq(&qt2160->lock);
schedule_delayed_work(&qt2160->dwork, QT2160_CYCLE_INTERVAL);
spin_unlock_irq(&qt2160->lock);
}

static void qt2160_worker(struct work_struct *work)
Expand Down Expand Up @@ -391,7 +383,6 @@ static int qt2160_probe(struct i2c_client *client,
qt2160->client = client;
qt2160->input = input;
INIT_DELAYED_WORK(&qt2160->dwork, qt2160_worker);
spin_lock_init(&qt2160->lock);

input->name = "AT42QT2160 Touch Sense Keyboard";
input->id.bustype = BUS_I2C;
Expand Down
4 changes: 1 addition & 3 deletions drivers/input/keyboard/tca6416-keypad.c
Original file line number Diff line number Diff line change
Expand Up @@ -219,9 +219,7 @@ static int tca6416_keypad_probe(struct i2c_client *client,
return -EINVAL;
}

chip = kzalloc(sizeof(struct tca6416_keypad_chip) +
pdata->nbuttons * sizeof(struct tca6416_button),
GFP_KERNEL);
chip = kzalloc(struct_size(chip, buttons, pdata->nbuttons), GFP_KERNEL);
input = input_allocate_device();
if (!chip || !input) {
error = -ENOMEM;
Expand Down
Loading

0 comments on commit 4f02370

Please sign in to comment.