Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1590654

Re: [PATCH v14 3/5] input: touchscreen: mxs-lradc: Add support for touchscreen

From Dmitry Torokhov <dmitry.torokhov@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH v14 3/5] input: touchscreen: mxs-lradc: Add support for touchscreen
Date 2017-03-01 23:10 +0100
Message-ID <tgkBA-12L-19@gated-at.bofh.it> (permalink)
References <tghkm-6Yi-29@gated-at.bofh.it> <tgjct-8je-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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 <dmitry.torokhov@gmail.com>


> +	__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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v14 0/5] mxs-lradc: Split driver into MFD Ksenija Stanojevic <ksenija.stanojevic@gmail.com> - 2017-03-01 20:50 +0100
  [PATCH v14 3/5] input: touchscreen: mxs-lradc: Add support for touchscreen Ksenija Stanojevic <ksenija.stanojevic@gmail.com> - 2017-03-01 21:40 +0100
    Re: [PATCH v14 3/5] input: touchscreen: mxs-lradc: Add support for  touchscreen Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2017-03-01 23:10 +0100
    Re: [PATCH v14 3/5] input: touchscreen: mxs-lradc: Add support for touchscreen Harald Geyer <harald@ccbib.org> - 2017-03-02 01:30 +0100
      Re: [PATCH v14 3/5] input: touchscreen: mxs-lradc: Add support for  touchscreen Jonathan Cameron <jic23@kernel.org> - 2017-03-02 21:30 +0100
  [PATCH v14 2/5] iio: adc: mxs-lradc: Add support for adc driver Ksenija Stanojevic <ksenija.stanojevic@gmail.com> - 2017-03-02 06:10 +0100

csiph-web