linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 10/26] Input: synaptics-rmi4 - f11: allow the top software button property to be set
@ 2015-11-05 23:39 Andrew Duggan
  2015-11-09 13:05 ` Linus Walleij
  0 siblings, 1 reply; 2+ messages in thread
From: Andrew Duggan @ 2015-11-05 23:39 UTC (permalink / raw)
  To: linux-input, linux-kernel
  Cc: Benjamin Tissoires, Dmitry Torokhov, Linus Walleij,
	Benjamin Tissoires, Christopher Heiny, Stephen Chandler Paul

From: Benjamin Tissoires <benjamin.tissoires@redhat.com>

Currently, in PS/2 we only have the PNPIds list to detect the property.
Unfortunately, it looks like the information is not embeded in the RMI4
protocol either, so allow the Top software buttons property to be set
in the platform data.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Tested-by: Andrew Duggan <aduggan@synaptics.com>
---
 drivers/input/rmi4/rmi_f11.c | 5 +++++
 include/linux/rmi.h          | 3 +++
 2 files changed, 8 insertions(+)

diff --git a/drivers/input/rmi4/rmi_f11.c b/drivers/input/rmi4/rmi_f11.c
index 768c199..02e3a6b 100644
--- a/drivers/input/rmi4/rmi_f11.c
+++ b/drivers/input/rmi4/rmi_f11.c
@@ -515,6 +515,7 @@ struct f11_2d_sensor {
 	int pkt_size;
 	u8 sensor_index;
 	u32 type_a;	/* boolean but debugfs API requires u32 */
+	bool topbuttonpad;
 	enum rmi_f11_sensor_type sensor_type;
 	struct input_dev *input;
 	bool unified_input;
@@ -1285,6 +1286,7 @@ static int rmi_f11_initialize(struct rmi_function *fn)
 		sensor->axis_align =
 			pdata->f11_sensor_data->axis_align;
 		sensor->type_a = pdata->f11_sensor_data->type_a;
+		sensor->topbuttonpad = pdata->f11_sensor_data->topbuttonpad;
 
 		if (sensor->sens_query.has_physical_props) {
 			sensor->x_mm = sensor->sens_query.x_sensor_size_mm;
@@ -1409,6 +1411,9 @@ static int rmi_f11_register_devices(struct rmi_function *fn)
 	if (sensor->report_abs)
 		f11_set_abs_params(fn, f11);
 
+	if (sensor->topbuttonpad)
+		set_bit(INPUT_PROP_TOPBUTTONPAD, input_dev->propbit);
+
 	if (sensor->report_rel) {
 		set_bit(EV_REL, input_dev->evbit);
 		set_bit(REL_X, input_dev->relbit);
diff --git a/include/linux/rmi.h b/include/linux/rmi.h
index b771f41..4ffe9fe 100644
--- a/include/linux/rmi.h
+++ b/include/linux/rmi.h
@@ -93,6 +93,8 @@ enum rmi_f11_sensor_type {
  * available.
  * @disable_report_mask - Force data to not be reported even if it is supported
  * by the firware.
+ * @topbuttonpad - Used with the "5 buttons touchpads" found on the Lenovo 40
+ * series
  */
 struct rmi_f11_sensor_data {
 	struct rmi_f11_2d_axis_alignment axis_align;
@@ -101,6 +103,7 @@ struct rmi_f11_sensor_data {
 	int x_mm;
 	int y_mm;
 	int disable_report_mask;
+	bool topbuttonpad;
 };
 
 /**
-- 
2.1.4


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

* Re: [PATCH 10/26] Input: synaptics-rmi4 - f11: allow the top software button property to be set
  2015-11-05 23:39 [PATCH 10/26] Input: synaptics-rmi4 - f11: allow the top software button property to be set Andrew Duggan
@ 2015-11-09 13:05 ` Linus Walleij
  0 siblings, 0 replies; 2+ messages in thread
From: Linus Walleij @ 2015-11-09 13:05 UTC (permalink / raw)
  To: Andrew Duggan
  Cc: Linux Input, linux-kernel@vger.kernel.org, Benjamin Tissoires,
	Dmitry Torokhov, Benjamin Tissoires, Christopher Heiny,
	Stephen Chandler Paul

On Fri, Nov 6, 2015 at 12:39 AM, Andrew Duggan <aduggan@synaptics.com> wrote:

> From: Benjamin Tissoires <benjamin.tissoires@redhat.com>
>
> Currently, in PS/2 we only have the PNPIds list to detect the property.
> Unfortunately, it looks like the information is not embeded in the RMI4
> protocol either, so allow the Top software buttons property to be set
> in the platform data.
>
> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
> Tested-by: Andrew Duggan <aduggan@synaptics.com>

Acked-by: Linus Walleij <linus.walleij@linaro.org>

Should be squashed into whatever patch is adding the F11 driver
I guess.

Yours,
Linus Walleij

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

end of thread, other threads:[~2015-11-09 13:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-05 23:39 [PATCH 10/26] Input: synaptics-rmi4 - f11: allow the top software button property to be set Andrew Duggan
2015-11-09 13:05 ` Linus Walleij

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).