LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: "Dmitry Torokhov" <dmitry.torokhov@gmail.com>
To: "David Brownell" <david-b@pacbell.net>
Cc: nicolas.ferre@rfo.atmel.com, linux-kernel@vger.kernel.org
Subject: Re: [patch 2.6.20-rc1 6/6] input: ads7846 directly senses PENUP state
Date: Fri, 22 Dec 2006 15:35:23 -0500	[thread overview]
Message-ID: <d120d5000612221235g3df0167bx9b1e6664dadf138d@mail.gmail.com> (raw)
In-Reply-To: <20061222192536.A206A1F0CDB@adsl-69-226-248-13.dsl.pltn13.pacbell.net>

On 12/22/06, David Brownell <david-b@pacbell.net> wrote:
>
> +static void ads7846_report_pen_state(struct ads7846 *ts, int down)
> +{
> +       struct input_dev        *input_dev = ts->input;
> +
> +       input_report_key(input_dev, BTN_TOUCH, down);
> +       if (!down)
> +               input_report_abs(input_dev, ABS_PRESSURE, 0);
> +#ifdef VERBOSE
> +       pr_debug("%s: %s\n", ts->spi->dev.bus_id, down ? "DOWN" : "UP");
> +#endif
> +}
> +
> +static void ads7846_report_pen_position(struct ads7846 *ts, int x, int y,
> +                                       int pressure)
> +{
> +       struct input_dev        *input_dev = ts->input;
> +
> +       input_report_abs(input_dev, ABS_X, x);
> +       input_report_abs(input_dev, ABS_Y, y);
> +       input_report_abs(input_dev, ABS_PRESSURE, pressure);
> +
> +#ifdef VERBOSE
> +       pr_debug("%s: %d/%d/%d\n", ts->spi->dev.bus_id, x, y, pressure);
> +#endif
> +}
> +
> +static void ads7846_sync_events(struct ads7846 *ts)
> +{
> +       struct input_dev        *input_dev = ts->input;
> +
> +       input_sync(input_dev);
> +}

I think these helpers just obfuscate the code, just call
input_report_*() and input_sync() drectly like you used to do.

-- 
Dmitry

  reply	other threads:[~2006-12-22 20:35 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-22 19:25 David Brownell
2006-12-22 20:35 ` Dmitry Torokhov [this message]
2006-12-22 20:40   ` David Brownell
2006-12-27 14:14     ` Imre Deak
2006-12-28 22:37       ` David Brownell
2006-12-29  6:22         ` Dmitry Torokhov
2006-12-29 20:26           ` David Brownell
2007-01-04 13:49             ` Nicolas Ferre
2007-01-10 20:04               ` David Brownell
2007-02-16 17:37             ` [PATCH] input/spi: add ads7843 support to ads7846 touchscreen driver Nicolas Ferre
2007-02-16 19:08               ` David Brownell
2007-02-19 12:48                 ` Nicolas Ferre
2007-02-19 18:46                   ` David Brownell
2007-02-20  9:19                     ` Nicolas Ferre
2007-03-01  4:49                       ` Dmitry Torokhov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d120d5000612221235g3df0167bx9b1e6664dadf138d@mail.gmail.com \
    --to=dmitry.torokhov@gmail.com \
    --cc=david-b@pacbell.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nicolas.ferre@rfo.atmel.com \
    --subject='Re: [patch 2.6.20-rc1 6/6] input: ads7846 directly senses PENUP state' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).