Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753902AbbGBRvn (ORCPT ); Thu, 2 Jul 2015 13:51:43 -0400 Received: from [192.147.44.131] ([192.147.44.131]:51242 "EHLO us-mx1.synaptics.com" rhost-flags-FAIL-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1754034AbbGBRva (ORCPT ); Thu, 2 Jul 2015 13:51:30 -0400 X-PGP-Universal: processed; by securemail.synaptics.com on Thu, 02 Jul 2015 11:37:51 -0700 Message-ID: <55957A13.5010408@synaptics.com> Date: Thu, 2 Jul 2015 10:51:15 -0700 From: Andrew Duggan User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Benjamin Tissoires , Dmitry Torokhov , Christopher Heiny , Allie Xiong CC: Stephen Chandler Paul , , , , Vincent Huang Subject: Re: [PATCH 10/11] Input: synaptics-rmi4 - f11: allow the top software button property to be set References: <1435087050-11444-1-git-send-email-benjamin.tissoires@redhat.com> <1435087050-11444-11-git-send-email-benjamin.tissoires@redhat.com> In-Reply-To: <1435087050-11444-11-git-send-email-benjamin.tissoires@redhat.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.4.10.145] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2641 Lines: 72 On 06/23/2015 12:17 PM, Benjamin Tissoires wrote: > 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 > --- Reviewed-by: Andrew Duggan > 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 77a18aa..50df7a1 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; > }; > > /** -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/