From: robert.jarzmik@free.fr (Robert Jarzmik)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: pxa: magician: Add support for ADS7846 touchscreen
Date: Sat, 11 Mar 2017 21:43:47 +0100 [thread overview]
Message-ID: <8760jfh7cs.fsf@belgarion.home> (raw)
In-Reply-To: <b2805fd9-f208-ab60-a58f-eccc15dceebd@tul.cz> (Petr Cvek's message of "Tue, 7 Mar 2017 02:17:55 +0100")
Petr Cvek <petr.cvek@tul.cz> writes:
> This patch adds support for ADS7846 touchscreen driver.
>
> The basic functionality was tested, x_plate_ohms and y_plate_ohms were
> physically measured. The value pressure_max was empirically set to match
> the measured range, which is affected by x_plate_ohms and ADS samples.
> +static struct platform_device vads7846_device = {
> + .name = "reg-fixed-voltage",
> + .id = 1,
Why "1" and not "-1" ?
> /*
> + * Touchscreen
> + */
> +
> +static struct ads7846_platform_data ads7846_pdata = {
> + .model = 7846,
> + .x_plate_ohms = 317,
> + .y_plate_ohms = 500,
> + .pressure_max = 1023, /* with x plate ohms it will overflow 255 */
> + .debounce_max = 3, /* first readout is always bad */
> + .debounce_tol = 30,
> + .debounce_rep = 0,
> + .gpio_pendown = GPIO115_MAGICIAN_nPEN_IRQ,
> + .keep_vref_on = 1, /* TODO can be off? */
Can you remove that TODO please ?
Either put it or not, and amend the commit message to explain the choice you
make and why you make it, either empirically or by measure.
> +struct pxa2xx_spi_chip tsc2046_chip_info = {
> + .tx_threshold = 1,
> + .rx_threshold = 2,
> + .timeout = 64,
> + /* NOTICE must be GPIO, incompatibility with hw PXA SPI framing */
> + .gpio_cs = 14,
Hard encoded value of 14, I don't like it, a GPIO14_xxx would suit me better.
Cheers.
--
Robert
prev parent reply other threads:[~2017-03-11 20:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-07 1:17 [PATCH] ARM: pxa: magician: Add support for ADS7846 touchscreen Petr Cvek
2017-03-11 20:43 ` Robert Jarzmik [this message]
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=8760jfh7cs.fsf@belgarion.home \
--to=robert.jarzmik@free.fr \
--cc=linux-arm-kernel@lists.infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox