lkml.org 
[lkml]   [2015]   [Nov]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 02/26] Input: synaptics-rmi4 - add a common input device in rmi_driver
From
Date
On 11/10/2015 01:23 AM, Benjamin Tissoires wrote:
> On Tue, Nov 10, 2015 at 12:13 AM, Dmitry Torokhov
> <dmitry.torokhov@gmail.com> wrote:
> diff --git a/drivers/input/rmi4/rmi_f01.c b/drivers/input/rmi4/rmi_f01.c
> index ee5f4a1..2d72dc8 100644
> --- a/drivers/input/rmi4/rmi_f01.c
> +++ b/drivers/input/rmi4/rmi_f01.c
> @@ -176,6 +176,13 @@ static int rmi_f01_read_properties(struct rmi_device *rmi_dev,
> return 0;
> }
>
> +char *rmi_f01_get_product_ID(struct rmi_function *fn)
> +{
> + struct f01_data *f01 = dev_get_drvdata(&fn->dev);
> +
> + return f01->properties.product_id;
> +}
>> Should we have something like rmi_to_input_id() that is similar to
>> usb_to_input_id()?
> Works for me.
>

In the patch set I just submitted I did not implement a
rmi_to_input_id() function mostly because the product id in RMI is a
string with a few possible formats. There isn't really a good way to
convert it into a u16 which is what struct input_id is expecting. We
would still need a function to return the string so I just left it the
way it is.

Andrew


\
 
 \ /
  Last update: 2015-11-26 01:41    [W:0.862 / U:1.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site