From: Joonyoung Shim <jy0922.shim@samsung.com>
To: Henrik Rydberg <rydberg@euromail.se>
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 16:46:42 +0900 [thread overview]
Message-ID: <4FBDE762.8020602@samsung.com> (raw)
In-Reply-To: <20120524072108.GA3975@polaris.bitmath.org>
On 05/24/2012 04:21 PM, Henrik Rydberg wrote:
> 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.
OK.
>> +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?
No, it is working only from firmware version 0x59 and i am using
firmware version 0x66. I don't know Melfas's firmware policy. Melfas
releases sometimes inconsistent updated firmware internally, so driver
needs to check firmware version later but currently this driver can't
get the correct number of touches on lower firmware version than 0x59.
>> +
>> + 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
> --
> 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:[~2012-05-24 7:46 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
2012-05-24 7:46 ` Joonyoung Shim [this message]
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=4FBDE762.8020602@samsung.com \
--to=jy0922.shim@samsung.com \
--cc=dmitry.torokhov@gmail.com \
--cc=kyungmin.park@samsung.com \
--cc=linux-input@vger.kernel.org \
--cc=rydberg@euromail.se \
/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).