linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/11] Synaptics RMI4 over SMBus
@ 2016-08-18  9:24 Benjamin Tissoires
  2016-08-18  9:24 ` [PATCH 01/11] Input: synaptics-rmi4 - add SMBus support Benjamin Tissoires
                   ` (10 more replies)
  0 siblings, 11 replies; 24+ messages in thread
From: Benjamin Tissoires @ 2016-08-18  9:24 UTC (permalink / raw)
  To: Dmitry Torokhov, Lyude Paul, Andrew Duggan, Christopher Heiny,
	Dennis Wassenberg
  Cc: Peter Hutterer, linux-kernel, linux-input

Hi,

this is finally my first whole submission of RMI4 over SMbus and the binding
of such devices found on the Thinkpad T series.

It has been a long time since we wanted to have those drivers in, but few
hiccups were on the road:
- lack of SMBus Host Notify (now merged upstream, still few fixes needed, but
  nothing preventing us to include this series).
- a unexpected behavior where the touchpad disables the SMBus commands if
  psmouse_activate has been called.
- some hairy problems with the 2 big locks found in the serio and psmouse
  driver.

This series also supports the RMI4 PS/2 pass-through required for the Thinkpad
X1 tablet even if it uses RMI4 over HID over USB.

Cheers,
Benjamin

Benjamin Tissoires (8):
  Input: synaptics-rmi4 - add SMBus support
  Input: serio - store the pt_buttons in the struct serio directly
  Input: synaptics-rmi4 - have only one struct platform data
  Input: synaptics-rmi4 - Add rmi_find_function()
  Input: synaptics - allocate a Synaptics Intertouch device
  Input: synaptics-rmi4 - add rmi_platform
  Input: synaptics-rmi4 - smbus: call psmouse_deactivate before
    binding/resume
  Input: synaptics-rmi4 - smbus: on resume, try 3 times if init fails

Dennis Wassenberg (1):
  Input: synaptics-rmi4 - f03: grab data passed by transport device

Lyude Paul (2):
  Input: synaptics-rmi4 - add support for F03
  Input: synaptics-rmi4 - f30/f03: Forward mechanical buttons on
    buttonpads to PS/2 guest

 drivers/input/mouse/psmouse-base.c |  12 +
 drivers/input/mouse/psmouse.h      |   1 +
 drivers/input/mouse/synaptics.c    | 150 +++++++++++-
 drivers/input/mouse/synaptics.h    |   5 +-
 drivers/input/rmi4/Kconfig         |  33 +++
 drivers/input/rmi4/Makefile        |   3 +
 drivers/input/rmi4/rmi_bus.c       |   3 +
 drivers/input/rmi4/rmi_bus.h       |  12 +
 drivers/input/rmi4/rmi_driver.c    |  13 +
 drivers/input/rmi4/rmi_driver.h    |  15 ++
 drivers/input/rmi4/rmi_f03.c       | 271 +++++++++++++++++++++
 drivers/input/rmi4/rmi_f11.c       |   4 +-
 drivers/input/rmi4/rmi_f12.c       |   4 +-
 drivers/input/rmi4/rmi_f30.c       |  71 +++++-
 drivers/input/rmi4/rmi_platform.c  | 235 ++++++++++++++++++
 drivers/input/rmi4/rmi_smbus.c     | 478 +++++++++++++++++++++++++++++++++++++
 include/linux/rmi.h                |  17 +-
 include/linux/serio.h              |   8 +
 include/uapi/linux/serio.h         |   1 +
 19 files changed, 1308 insertions(+), 28 deletions(-)
 create mode 100644 drivers/input/rmi4/rmi_f03.c
 create mode 100644 drivers/input/rmi4/rmi_platform.c
 create mode 100644 drivers/input/rmi4/rmi_smbus.c

-- 
2.5.5


^ permalink raw reply	[flat|nested] 24+ messages in thread
* Re: [PATCH v2] Input: Add driver for GOODiX GTx5 series touchsereen
  2017-06-19  9:29 ` Wang Yafei
@ 2017-06-19 13:24 kbuild test robot
  2017-06-19  9:29 ` Wang Yafei
  0 siblings, 1 reply; 24+ messages in thread
From: kbuild test robot @ 2017-06-19 13:24 UTC (permalink / raw)
  To: Wang Yafei
  Cc: kbuild-all, Dmitry Torokhov, Henrik Rydberg, linux-input, andrew,
	mouse, linux-kernel

Hi Wang,

[auto build test WARNING on input/next]
[also build test WARNING on v4.12-rc5 next-20170619]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Wang-Yafei/Input-Add-driver-for-GOODiX-GTx5-series-touchsereen/20170619-200451
base:   https://git.kernel.org/pub/scm/linux/kernel/git/dtor/input.git next


coccinelle warnings: (new ones prefixed by >>)

>> drivers/input/touchscreen/goodix-ts-sunrise/goodix_gtx5_i2c.c:872:3-8: No need to set .owner here. The core will do it.
--
>> drivers/input/touchscreen/goodix-ts-sunrise/goodix_ts_core.c:1335:3-8: No need to set .owner here. The core will do it.
--
>> drivers/input/touchscreen/goodix-ts-sunrise/goodix_gtx5_update.c:752:2-3: Unneeded semicolon

Please review and possibly fold the followup patch.

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

^ permalink raw reply	[flat|nested] 24+ messages in thread
* [PATCH v2 1/2] Input: edt-ft5x06 - Add support for regulator
@ 2017-12-28 16:33 Mylène Josserand
  2017-12-30  3:15 ` [PATCH] Input: fix semicolon.cocci warnings kbuild test robot
  0 siblings, 1 reply; 24+ messages in thread
From: Mylène Josserand @ 2017-12-28 16:33 UTC (permalink / raw)
  To: dmitry.torokhov, robh+dt, mark.rutland, linux, maxime.ripard,
	wens
  Cc: linux-arm-kernel, linux-input, devicetree, linux-kernel,
	mylene.josserand, thomas.petazzoni, quentin.schulz

Add the support of regulator to use it as VCC source.

Signed-off-by: Mylène Josserand <mylene.josserand@free-electrons.com>
---
 .../bindings/input/touchscreen/edt-ft5x06.txt      |  1 +
 drivers/input/touchscreen/edt-ft5x06.c             | 33 ++++++++++++++++++++++
 2 files changed, 34 insertions(+)

diff --git a/Documentation/devicetree/bindings/input/touchscreen/edt-ft5x06.txt b/Documentation/devicetree/bindings/input/touchscreen/edt-ft5x06.txt
index 025cf8c9324a..48e975b9c1aa 100644
--- a/Documentation/devicetree/bindings/input/touchscreen/edt-ft5x06.txt
+++ b/Documentation/devicetree/bindings/input/touchscreen/edt-ft5x06.txt
@@ -30,6 +30,7 @@ Required properties:
 Optional properties:
  - reset-gpios: GPIO specification for the RESET input
  - wake-gpios:  GPIO specification for the WAKE input
+ - vcc-supply:  Regulator that supplies the touchscreen
 
  - pinctrl-names: should be "default"
  - pinctrl-0:   a phandle pointing to the pin settings for the
diff --git a/drivers/input/touchscreen/edt-ft5x06.c b/drivers/input/touchscreen/edt-ft5x06.c
index c53a3d7239e7..5ee14a25a382 100644
--- a/drivers/input/touchscreen/edt-ft5x06.c
+++ b/drivers/input/touchscreen/edt-ft5x06.c
@@ -39,6 +39,7 @@
 #include <linux/input/mt.h>
 #include <linux/input/touchscreen.h>
 #include <linux/of_device.h>
+#include <linux/regulator/consumer.h>
 
 #define WORK_REGISTER_THRESHOLD		0x00
 #define WORK_REGISTER_REPORT_RATE	0x08
@@ -91,6 +92,7 @@ struct edt_ft5x06_ts_data {
 	struct touchscreen_properties prop;
 	u16 num_x;
 	u16 num_y;
+	struct regulator *vcc;
 
 	struct gpio_desc *reset_gpio;
 	struct gpio_desc *wake_gpio;
@@ -993,6 +995,23 @@ static int edt_ft5x06_ts_probe(struct i2c_client *client,
 
 	tsdata->max_support_points = chip_data->max_support_points;
 
+	tsdata->vcc = devm_regulator_get(&client->dev, "vcc");
+	if (IS_ERR(tsdata->vcc)) {
+		error = PTR_ERR(tsdata->vcc);
+		dev_err(&client->dev, "failed to request regulator: %d\n",
+			error);
+		return error;
+	};
+
+	if (tsdata->vcc) {
+		error = regulator_enable(tsdata->vcc);
+		if (error < 0) {
+			dev_err(&client->dev, "failed to enable vcc: %d\n",
+				error);
+			return error;
+		}
+	}
+
 	tsdata->reset_gpio = devm_gpiod_get_optional(&client->dev,
 						     "reset", GPIOD_OUT_HIGH);
 	if (IS_ERR(tsdata->reset_gpio)) {
@@ -1122,20 +1141,34 @@ static int edt_ft5x06_ts_remove(struct i2c_client *client)
 static int __maybe_unused edt_ft5x06_ts_suspend(struct device *dev)
 {
 	struct i2c_client *client = to_i2c_client(dev);
+	struct edt_ft5x06_ts_data *tsdata = i2c_get_clientdata(client);
 
 	if (device_may_wakeup(dev))
 		enable_irq_wake(client->irq);
 
+	if (tsdata->vcc)
+		regulator_disable(tsdata->vcc);
+
 	return 0;
 }
 
 static int __maybe_unused edt_ft5x06_ts_resume(struct device *dev)
 {
 	struct i2c_client *client = to_i2c_client(dev);
+	struct edt_ft5x06_ts_data *tsdata = i2c_get_clientdata(client);
+	int ret;
 
 	if (device_may_wakeup(dev))
 		disable_irq_wake(client->irq);
 
+	if (tsdata->vcc) {
+		ret = regulator_enable(tsdata->vcc);
+		if (ret < 0) {
+			dev_err(dev, "failed to enable vcc: %d\n", ret);
+			return ret;
+		}
+	}
+
 	return 0;
 }
 
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2017-12-30  3:16 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-18  9:24 [PATCH 00/11] Synaptics RMI4 over SMBus Benjamin Tissoires
2016-08-18  9:24 ` [PATCH 01/11] Input: synaptics-rmi4 - add SMBus support Benjamin Tissoires
2016-08-18  9:24 ` [PATCH 02/11] Input: serio - store the pt_buttons in the struct serio directly Benjamin Tissoires
2016-08-27  1:31   ` Andrew Duggan
2016-08-18  9:24 ` [PATCH 03/11] Input: synaptics-rmi4 - have only one struct platform data Benjamin Tissoires
2016-08-27  1:35   ` Andrew Duggan
2016-08-18  9:24 ` [PATCH 04/11] Input: synaptics-rmi4 - add support for F03 Benjamin Tissoires
2016-08-27  1:35   ` Andrew Duggan
2016-08-18  9:24 ` [PATCH 05/11] Input: synaptics-rmi4 - f03: grab data passed by transport device Benjamin Tissoires
2016-08-27  1:35   ` Andrew Duggan
2016-08-18  9:24 ` [PATCH 06/11] Input: synaptics-rmi4 - Add rmi_find_function() Benjamin Tissoires
2016-08-27  1:35   ` Andrew Duggan
2016-08-18  9:24 ` [PATCH 07/11] Input: synaptics-rmi4 - f30/f03: Forward mechanical buttons on buttonpads to PS/2 guest Benjamin Tissoires
2016-08-27  1:35   ` Andrew Duggan
2016-08-30 15:13     ` Benjamin Tissoires
2016-08-30 19:16       ` Andrew Duggan
2016-08-18  9:24 ` [PATCH 08/11] Input: synaptics - allocate a Synaptics Intertouch device Benjamin Tissoires
2016-08-18  9:24 ` [PATCH 09/11] Input: synaptics-rmi4 - add rmi_platform Benjamin Tissoires
2016-08-24  2:47   ` [PATCH] Input: fix semicolon.cocci warnings kbuild test robot
2016-08-24  2:47   ` [PATCH 09/11] Input: synaptics-rmi4 - add rmi_platform kbuild test robot
2016-08-18  9:24 ` [PATCH 10/11] Input: synaptics-rmi4 - smbus: call psmouse_deactivate before binding/resume Benjamin Tissoires
2016-08-18  9:24 ` [PATCH 11/11] Input: synaptics-rmi4 - smbus: on resume, try 3 times if init fails Benjamin Tissoires
  -- strict thread matches above, loose matches on Subject: below --
2017-06-19 13:24 [PATCH v2] Input: Add driver for GOODiX GTx5 series touchsereen kbuild test robot
2017-06-19  9:29 ` Wang Yafei
2017-06-19 13:24   ` [PATCH] Input: fix semicolon.cocci warnings kbuild test robot
2017-12-28 16:33 [PATCH v2 1/2] Input: edt-ft5x06 - Add support for regulator Mylène Josserand
2017-12-30  3:15 ` [PATCH] Input: fix semicolon.cocci warnings kbuild test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).