Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751495AbdCAV7x (ORCPT ); Wed, 1 Mar 2017 16:59:53 -0500 Received: from mail-pf0-f194.google.com ([209.85.192.194]:33205 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753110AbdCAV7u (ORCPT ); Wed, 1 Mar 2017 16:59:50 -0500 Date: Wed, 1 Mar 2017 12:52:38 -0800 From: Dmitry Torokhov To: Ksenija Stanojevic Cc: linux-kernel@vger.kernel.org, lee.jones@linaro.org, linux-input@vger.kernel.org, jic23@kernel.org, knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net, marex@denx.de, linux-iio@vger.kernel.org, harald@ccbib.org, stefan.wahren@i2se.com, fabio.estevam@freescale.com Subject: Re: [PATCH v14 3/5] input: touchscreen: mxs-lradc: Add support for touchscreen Message-ID: <20170301205238.GH30349@dtor-ws> References: <80f16ceab50848e0fbdafda4057186c561bf519b.1488380468.git.ksenija.stanojevic@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <80f16ceab50848e0fbdafda4057186c561bf519b.1488380468.git.ksenija.stanojevic@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1324 Lines: 51 Hi Ksenija, On Wed, Mar 01, 2017 at 07:02:11PM +0100, Ksenija Stanojevic wrote: > +static int mxs_lradc_ts_register(struct mxs_lradc_ts *ts) > +{ > + struct input_dev *input = ts->ts_input; > + struct device *dev = ts->dev; > + > + input = devm_input_allocate_device(dev); > + if (!input) > + return -ENOMEM; > + > + input->name = "mxs-lradc-ts"; > + input->id.bustype = BUS_HOST; > + input->open = mxs_lradc_ts_open; > + input->close = mxs_lradc_ts_close; > + > + __set_bit(EV_ABS, input->evbit); > + __set_bit(EV_KEY, input->evbit); > + __set_bit(BTN_TOUCH, input->keybit); If you end up re-spinnig the series, please drop __set_bit()s above and replace with input_set_capability(input, EV_KEY, BTN_TOUCH); because input_set_abs_params() already sets EV_ABS for you. If you will not re-spin, you can leave it as is. In any case: Acked-by: Dmitry Torokhov > + __set_bit(INPUT_PROP_DIRECT, input->propbit); > + input_set_abs_params(input, ABS_X, 0, LRADC_SINGLE_SAMPLE_MASK, 0, 0); > + input_set_abs_params(input, ABS_Y, 0, LRADC_SINGLE_SAMPLE_MASK, 0, 0); > + input_set_abs_params(input, ABS_PRESSURE, 0, LRADC_SINGLE_SAMPLE_MASK, > + 0, 0); > + > + ts->ts_input = input; > + input_set_drvdata(input, ts); > + > + return input_register_device(input); > +} Thanks. -- Dmitry