lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5d5443650907151033w36008b71pe4b32bcea9489b75@mail.gmail.com>
Date:	Wed, 15 Jul 2009 23:03:02 +0530
From:	Trilok Soni <soni.trilok@...il.com>
To:	Pavel Machek <pavel@....cz>
Cc:	"Arve Hj?nnev?g" <arve@...roid.com>,
	kernel list <linux-kernel@...r.kernel.org>,
	Brian Swetland <swetland@...gle.com>,
	dmitry.torokhov@...il.com, dtor@...l.ru,
	linux-input@...r.kernel.org, Andrew Morton <akpm@...l.org>,
	linux-i2c@...r.kernel.org
Subject: Re: Support for synaptic touchscreen in HTC dream

Hi Pavel,

On Wed, Jul 15, 2009 at 7:06 PM, Pavel Machek<pavel@....cz> wrote:
> Hi!
>
>> > +static void decode_report(struct synaptics_ts_data *ts, u8 *buf)
>> > +{
>>
>> some documentation about this logic would be great.
>
> Arve, can you help here?
>
>
>> > +       int pos[2][2];
>> > +       int f, a;
>> > +       int base = 2;
>> > +       int z = buf[1];
>> > +       int w = buf[0] >> 4;
>> > +       int finger = buf[0] & 7;
>> > +       int finger2_pressed;
>> > +
>> > +       for (f = 0; f < 2; f++) {
>> > +               u32 flip_flag = SYNAPTICS_FLIP_X;
>> > +               for (a = 0; a < 2; a++) {
>> > +                       int p = buf[base + 1];
>> > +                       p |= (u16)(buf[base] & 0x1f) << 8;
>> > +                       if (ts->flags & flip_flag)
>> > +                               p = ts->max[a] - p;
>> > +                       if (ts->flags & SYNAPTICS_SNAP_TO_INACTIVE_EDGE) {
>
>
>> > +static irqreturn_t synaptics_ts_irq_handler(int irq, void *dev_id)
>> > +{
>> > +       struct synaptics_ts_data *ts = dev_id;
>> > +
>> > +       disable_irq(ts->client->irq);
>>
>> disable_irq_nosync or convert this to request_threaded_irq(...).
>> Please see recent discussion on linux-input for MAX key switch
>> controller.
>
> Do you have a link? (I replaced it with disable_irq_nosync, if that is
> enough...)
>

link: http://patchwork.kernel.org/patch/35515/

>> > +static int synaptics_ts_probe(
>> > +       struct i2c_client *client, const struct i2c_device_id *id)
>> > +{
>>
>> __devinit ?
>
> Ok.
>
>> > +       if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) {
>>
>> check for SMBUS? I have added linux-i2c as this driver has i2c bits,
>> so not removing any code.
>
> I guess this driver is only probed on mach-pxa... on machines that
> have the neccessary hardware.

Because this driver is using smbus i2c apis, it will be good to add
that check too.

>
>> > +               printk(KERN_ERR "synaptics_ts_probe: need I2C_FUNC_I2C\n");
>>
>> dev_xxx/pr_xxx friends?
>
> Fixed all occurences.
>
>
>> > +       ts->input_dev = input_allocate_device();
>> > +       if (ts->input_dev == NULL) {
>> > +               ret = -ENOMEM;
>> > +               pr_err("synaptics: Failed to allocate input device\n");
>> > +               goto err_input_dev_alloc_failed;
>> > +       }
>> > +       ts->input_dev->name = "synaptics-rmi-touchscreen";
>>
>> other parameters of input_dev, like vendor, bus etc.,
>
> Ok, what are those for? I can probably invent some dummy values, but...

May be vendor, product, version would be good to add.

-- 
---Trilok Soni
http://triloksoni.wordpress.com
http://www.linkedin.com/in/triloksoni
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ