lkml.org 
[lkml]   [2009]   [Jul]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: HTC: touchscreen driver

    > >        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
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2009-07-14 11:49    [W:2.540 / U:0.764 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site