From: "Henrik Rydberg" <rydberg@euromail.se>
To: Joonyoung Shim <jy0922.shim@samsung.com>
Cc: linux-input@vger.kernel.org, dmitry.torokhov@gmail.com,
kyungmin.park@samsung.com
Subject: Re: [PATCH v5] input: Add MELFAS mms114 touchscreen driver
Date: Thu, 24 May 2012 09:21:08 +0200 [thread overview]
Message-ID: <20120524072108.GA3975@polaris.bitmath.org> (raw)
In-Reply-To: <1337841467-20717-1-git-send-email-jy0922.shim@samsung.com>
Hi Joonyoung,
> This is a initial driver for new touchscreen chip mms114 of MELFAS.
> It uses I2C interface and supports 10 multi touch.
>
> Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
> ---
> This v5 patch was updated from Henrik review mainly.
Looking neat now, thanks for making the changes. One comment and one question:
> +#define MMS114_PACKET_NUM 8
I would have dropped this in favor of sizeof(touch[0]) instead.
> +static irqreturn_t mms114_interrupt(int irq, void *dev_id)
> +{
> + struct mms114_data *data = dev_id;
> + struct mms114_touch touch[MMS114_MAX_TOUCH];
> + int packet_size;
> + int touch_size;
> + int index;
> + int error;
> +
> + if (!data->enabled)
> + goto out;
> +
> + packet_size = mms114_read_reg(data, MMS114_PACKET_SIZE);
> + if (packet_size <= 0)
> + goto out;
> +
> + touch_size = packet_size / MMS114_PACKET_NUM;
Since MMS114_PACKET_NUM changed, this calculation is no longer the
same. Will you still get the correct number of touches for all
firmware versions?
> +
> + error = __mms114_read_reg(data, MMS114_INFOMATION, packet_size,
> + (u8 *)touch);
> + if (error < 0)
> + goto out;
> +
> + for (index = 0; index < touch_size; index++)
> + mms114_proc_mt(data, touch + index);
> +
> + input_mt_report_pointer_emulation(data->input_dev, true);
> + input_sync(data->input_dev);
> +
> +out:
> + return IRQ_HANDLED;
> +}
Thanks,
Henrik
next prev parent reply other threads:[~2012-05-24 7:14 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-24 6:37 [PATCH v5] input: Add MELFAS mms114 touchscreen driver Joonyoung Shim
2012-05-24 7:21 ` Henrik Rydberg [this message]
2012-05-24 7:46 ` Joonyoung Shim
2012-05-24 7:53 ` 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=20120524072108.GA3975@polaris.bitmath.org \
--to=rydberg@euromail.se \
--cc=dmitry.torokhov@gmail.com \
--cc=jy0922.shim@samsung.com \
--cc=kyungmin.park@samsung.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 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).