From: Pavel Machek <pavel@ucw.cz>
To: Arve Hj?nnev?g <arve@android.com>
Cc: Brian Swetland <swetland@google.com>,
kernel list <linux-kernel@vger.kernel.org>
Subject: Re: HTC: touchscreen driver
Date: Tue, 14 Jul 2009 11:46:30 +0200 [thread overview]
Message-ID: <20090714094629.GB2076@elf.ucw.cz> (raw)
In-Reply-To: <d6200be20907131829o77bce3d8w8f238bc079478368@mail.gmail.com>
> > if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) {
> > printk(KERN_ERR "synaptics_ts_probe: need I2C_FUNC_I2C\n");
> > @@ -269,6 +354,9 @@ static int synaptics_ts_probe(
> > pdata = client->dev.platform_data;
> > if (pdata)
> > ts->power = pdata->power;
> > + else
> > + pdata = kzalloc(sizeof(*pdata), GFP_KERNEL);
> > +
>
> Where do you free this?
Well, nowhere; but it should not actually matter. ... btw can this
path (!pdata) actually trigger? The driver will not be working,
anyway, in that case..
> > - if (ts->use_irq)
> > - enable_irq(client->irq);
> > -
> > - if (!ts->use_irq)
> > - hrtimer_start(&ts->timer, ktime_set(1, 0), HRTIMER_MODE_REL);
> > - else
> > - i2c_smbus_write_byte_data(ts->client, 0xf1, 0x01); /* enable abs int */
> > -
> > - return 0;
> > -}
>
> Why did you remove suspend and resume?
I thought it depended on earlysuspend.
> > static const struct i2c_device_id synaptics_ts_id[] = {
> > { SYNAPTICS_I2C_RMI_NAME, 0 },
> > @@ -600,10 +515,6 @@ static const struct i2c_device_id synaptics_ts_id[] = {
> > static struct i2c_driver synaptics_ts_driver = {
> > .probe = synaptics_ts_probe,
> > .remove = synaptics_ts_remove,
> > -#ifndef CONFIG_HAS_EARLYSUSPEND
> > - .suspend = synaptics_ts_suspend,
> > - .resume = synaptics_ts_resume,
> > -#endif
>
> Remove #ifndef only, not the content.
Aha, I see; yes, my fault.
> > + u32 flags;
> > + u32 inactive_left; /* 0x10000 = screen width */
> > + u32 inactive_right; /* 0x10000 = screen width */
> > + u32 inactive_top; /* 0x10000 = screen height */
> > + u32 inactive_bottom; /* 0x10000 = screen height */
> > + u32 snap_left_on; /* 0x10000 = screen width */
> > + u32 snap_left_off; /* 0x10000 = screen width */
> > + u32 snap_right_on; /* 0x10000 = screen width */
> > + u32 snap_right_off; /* 0x10000 = screen width */
> > + u32 snap_top_on; /* 0x10000 = screen height */
> > + u32 snap_top_off; /* 0x10000 = screen height */
> > + u32 snap_bottom_on; /* 0x10000 = screen height */
> > + u32 snap_bottom_off; /* 0x10000 = screen height */
> > + u32 fuzz_x; /* 0x10000 = screen width */
> > + u32 fuzz_y; /* 0x10000 = screen height */
>
> I prefer the existing C99 types.
Yes, well, the rest of kernel disagrees with you.
> This driver only supports a subset of Synaptics' devices so a more
> generic driver will eventually be needed. The patch below adds support
> for a more recent but similar panel.
Ok, that should be simple enough to apply, but lets do improvements
when we cleaned the code enough for the mainline...?
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
next prev parent reply other threads:[~2009-07-14 9:46 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20090710084323.GA6522@elf.ucw.cz>
[not found] ` <a55d774e0907100155m25366994pe9ec5d0f5f868818@mail.gmail.com>
[not found] ` <20090710103243.GB7789@elf.ucw.cz>
[not found] ` <a55d774e0907100431j3fdc4671i6b185019594367fa@mail.gmail.com>
[not found] ` <20090713202302.GC2569@elf.ucw.cz>
2009-07-13 20:57 ` Pavel Machek
2009-07-13 22:07 ` Pavel Machek
2009-07-14 1:29 ` Arve Hjønnevåg
2009-07-14 1:44 ` Joe Perches
2009-07-14 9:46 ` Pavel Machek
2009-07-15 19:05 ` Frank Rowand
2009-07-14 9:23 ` Pavel Machek
2009-07-14 9:46 ` Pavel Machek [this message]
2009-07-14 22:07 ` Arve Hjønnevåg
2009-07-14 22:16 ` Pavel Machek
2009-07-14 22:45 ` Arve Hjønnevåg
2009-07-15 6:21 ` Trilok Soni
2009-07-15 6:48 ` Arve Hjønnevåg
2009-07-19 21:23 ` Pavel Machek
2009-07-20 3:43 ` Arve Hjønnevåg
2009-07-20 10:47 ` Pavel Machek
2009-07-21 10:11 ` Pavel Machek
2009-07-22 1:12 ` Arve Hjønnevåg
2009-07-23 21:25 ` Pavel Machek
2009-07-24 0:11 ` Arve Hjønnevåg
2009-07-27 23:14 ` Pavel Machek
2009-07-27 23:38 ` Arve Hjønnevåg
2009-07-14 10:02 ` Pavel Machek
2009-07-14 1:48 ` Daniel Walker
2009-07-14 6:47 ` Trilok Soni
2009-07-14 0:17 ` Brian Swetland
2009-07-14 9:47 ` Pavel Machek
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=20090714094629.GB2076@elf.ucw.cz \
--to=pavel@ucw.cz \
--cc=arve@android.com \
--cc=linux-kernel@vger.kernel.org \
--cc=swetland@google.com \
/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
all inboxes | Powered by JetHome®