Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753009AbbKZANN (ORCPT ); Wed, 25 Nov 2015 19:13:13 -0500 Received: from us-mx2.synaptics.com ([192.147.44.131]:55738 "EHLO us-mx1.synaptics.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752204AbbKZANH (ORCPT ); Wed, 25 Nov 2015 19:13:07 -0500 Subject: Re: [PATCH 02/26] Input: synaptics-rmi4 - add a common input device in rmi_driver To: Benjamin Tissoires , Dmitry Torokhov References: <1446766616-30258-1-git-send-email-aduggan@synaptics.com> <20151109231351.GD9155@dtor-ws> CC: linux-input , "linux-kernel@vger.kernel.org" , Benjamin Tissoires , Linus Walleij , Christopher Heiny , Stephen Chandler Paul From: Andrew Duggan Message-ID: <56564E92.8040604@synaptics.com> Date: Wed, 25 Nov 2015 16:13:06 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8"; 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: 1319 Lines: 35 On 11/10/2015 01:23 AM, Benjamin Tissoires wrote: > On Tue, Nov 10, 2015 at 12:13 AM, Dmitry Torokhov > 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 -- 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/