Re: [PATCH 1/3] Input: hgpk - enable advanced mode through module parameter

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

 



On Mon, Oct 04, 2010 at 02:27:54PM -0400, Paul Fox wrote:
> dmitry wrote:
>  > Hi Daniel,
>  > 
>  > On Sat, Oct 02, 2010 at 09:42:34PM +0100, Daniel Drake wrote:
>  > > +
>  > > +	/*
>  > > +	 * The first packet after the finger goes down only establishes the
>  > > +	 * baseline for relative movement.
>  > > +	 * (ignore possibility of finger going down and button being pressed
>  > > +	 * simultaneously.)
>  > > +	 */
>  > > +	if (!priv->isdown) {
>  > > +		priv->abs_x = *x;
>  > > +		priv->abs_y = *y;
>  > > +		priv->isdown = true;
>  > > +		return false;
>  > > +	}
>  > > +
>  > > +	tmp = *x; *x -= priv->abs_x; priv->abs_x = tmp;
>  > > +	tmp = *y; *y -= priv->abs_y; priv->abs_y = tmp;
>  > 
>  > Why do you use abs->rel conversion in driver and not rely on the
>  > standard userspace component handling thouchpads in absolute mode?
> 
> the driver can (and does, on user request)) switch modes between
> "glidesensor" and "pen tablet" mode on the fly.  (userspace requests
> this with a write to the "ptmode" sysfs node).  changing the device
> from relative to absolute at that point would also require that
> userspace close/reopen, or use a separate device, wouldn't it?
> 

I'd allow selecting the mode only once, upon device initialization.
This can be done by setting module parameter and [re]loading the
module or setting the parameter and then instructing driver to
reconnect:

	echo -n "rescan" > /sys/bus/serio/devices/serioX/drvctl

or asking psmouse to select sepcific protocol for the device (I believe
absolute mode of HGPK warrants a separate protocol entry).

Thanks.

-- 
Dmitry
--
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