Re: [PATCH 1/4] Input: synaptics - add multitouch packet support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> > @@ -279,6 +279,24 @@ static void synaptics_set_rate(struct psmouse *psmouse, unsigned int rate)
> >  	synaptics_mode_cmd(psmouse, priv->mode);
> >  }
> >  
> > +static int synaptics_set_multitouch_mode(struct psmouse *psmouse)
> > +{
> > +	static unsigned char param = 0xc8;
> > +	struct synaptics_data *priv = psmouse->private;
> > +
> > +	if (!SYN_CAP_MULTITOUCH(priv->ext_cap_0c))
> > +		return 0;
> > +
> > +	if (psmouse_sliced_command(psmouse, SYN_QUE_MODEL))
> > +		return -1;
> > +	if (ps2_command(&psmouse->ps2dev, &param, PSMOUSE_CMD_SETRATE))
> > +		return -1;
> > +
> > +	priv->multitouch = 1;
> 
> That should be bool/true. Also, do we need to have this variable at all
> since we seem to abort initialization if multitouch mode fails?

The logic of the all-patches-applied version does depend on the
advanced gesture flag, but sure, instead of this variable, one could
set the SYN_CAP_MULTIFINGER bit, and use SYN_CAP_MULTITOUCH explicitly
in remaining places. And, of course, another round of testing.

> 
> > +	printk(KERN_INFO "Synaptics: Multitouch mode enabled\n");
> 
> I'd rather only reported if we failed to activate multitouch mode on
> devices that ought support it.

Ok.

> > @@ -53,6 +53,7 @@
> >  #define SYN_CAP_PRODUCT_ID(ec)		(((ec) & 0xff0000) >> 16)
> >  #define SYN_CAP_CLICKPAD(ex0c)		((ex0c) & 0x100100)
> >  #define SYN_CAP_MAX_DIMENSIONS(ex0c)	((ex0c) & 0x020000)
> > +#define SYN_CAP_MULTITOUCH(ex0c)	((ex0c) & 0x080000)
> 
> Synaptics calls this bit "Advanced Gesture", I think we should do the
> same as they might produce full-MT devices in the future.
> 
> Also, how useful is this patch without the 4th one? Why aren't they
> folded together?

This first patch implements multi-finger support in the same fashion
as older hardware, thus enabling for instance hw-finger scroll in
synaptics.

Thanks,
Henrik
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux