LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: David Brownell <david-b@pacbell.net>
To: "Dmitry Torokhov" <dmitry.torokhov@gmail.com>
Cc: nicolas.ferre@rfo.atmel.com, linux-kernel@vger.kernel.org,
	imre.deak@solidboot.com
Subject: Re: [patch 2.6.20-rc1 6/6] input: ads7846 directly senses PENUP state
Date: Fri, 22 Dec 2006 12:40:20 -0800	[thread overview]
Message-ID: <200612221240.20768.david-b@pacbell.net> (raw)
In-Reply-To: <d120d5000612221235g3df0167bx9b1e6664dadf138d@mail.gmail.com>

On Friday 22 December 2006 12:35 pm, Dmitry Torokhov wrote:
> 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.

Fair enough, I had a similar thought.  Imre, could you do that update?


> 
> -- 
> Dmitry
> 

  reply	other threads:[~2006-12-22 20:40 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
2006-12-22 20:40   ` David Brownell [this message]
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=200612221240.20768.david-b@pacbell.net \
    --to=david-b@pacbell.net \
    --cc=dmitry.torokhov@gmail.com \
    --cc=imre.deak@solidboot.com \
    --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).