From: Alan Cox <alan@linux.intel.com>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: linux-input@vger.kernel.org
Subject: Re: [PATCH] cy8ctmg110: capacitive touchscreen support
Date: Fri, 9 Jul 2010 15:13:10 +0100 [thread overview]
Message-ID: <20100709151310.54ed8a2f@linux.intel.com> (raw)
In-Reply-To: <20100708172616.GB6966@core.coreip.homeip.net>
> > +/*
> > + * The touch position structure.
> > + */
> > +struct ts_event {
> > + int x1;
> > + int y1;
> > + int x2;
> > + int y2;
> > +};
>
> Are there more changes to the driver? Currently I do not see the
> reason for having this structure.
With the other clean ups agreed.
> > +/*
> > + * cy8ctmg110_power is the routine that is called when touch
> > hardware
> > + * will powered off or on.
> > + */
> > +static void cy8ctmg110_power(int poweron)
>
> bool poweron?
If you prefer - changed
> > + input_report_key(input, BTN_TOUCH, 1);
> > + x2 = (u16) (y * X_SCALE_FACTOR);
> > + y2 = (u16) (x * Y_SCALE_FACTOR);
>
> Why do we scale in kernel? We should be reportig raw coordinates and
> let userspace to scale if needed.
Ok
> > + } else if (tsc->tc.x1 != x || tsc->tc.y1 != y) {
> > + tsc->tc.y1 = y;
> > + tsc->tc.x1 = x;
> > + cy8ctmg110_send_event(tsc);
>
> Send always, input core will filter out duplicates, if needed.
Done and cleaned up the surrounding bits
> > + client->irq = CY8CTMG110_TOUCH_IRQ;
>
> Eww...
Real hardware/firmware isn't always pretty - its a mix of GPIO and I²C
interfaces.
> Set up input_dev->dev.parent = client->...
Done
> Frankly, anything that polls with high frequency in a mobile device is
> plainly not useful. I'd just kill these polling bits altogether.
For production hardware yes. I'll split polling out as we can keep that
internally and then burn it when its not needed.
> > + err = gpio_request(CY8CTMG110_IRQ_PIN_GPIO,
> > "touch_irq_key");
>
> Always the same GPIO number?
Yes.
> Please idnt properly, I do not care about 80 lines limit if the result
> causes bad identation. We can also drop "cy8ctmg110_ts: " prefixes -
> dev_xxx() shousl give enogh context.
Ok
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2010-07-09 14:42 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-08 16:11 [PATCH] cy8ctmg110: capacitive touchscreen support Alan Cox
2010-07-08 17:26 ` Dmitry Torokhov
2010-07-09 14:13 ` Alan Cox [this message]
2010-07-08 17:44 ` Ville Syrjälä
2010-07-09 13:51 ` Alan Cox
-- strict thread matches above, loose matches on Subject: below --
2010-07-09 15:36 [PATCH] " Alan Cox
2010-07-09 16:27 ` Dmitry Torokhov
2010-07-09 16:28 ` Dmitry Torokhov
2010-07-09 15:53 Alan Cox
2010-07-09 16:59 ` Dmitry Torokhov
2010-07-09 16:48 ` Alan Cox
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=20100709151310.54ed8a2f@linux.intel.com \
--to=alan@linux.intel.com \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-input@vger.kernel.org \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.