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: <4E134F87.6080504@canonical.com>
Date:	Tue, 05 Jul 2011 10:53:11 -0700
From:	Chase Douglas <chase.douglas@...onical.com>
To:	djkurtz@...omium.org
CC:	dmitry.torokhov@...il.com, rydberg@...omail.se,
	rubini@...l.unipv.it, linux-input@...r.kernel.org,
	linux-kernel@...r.kernel.org, derek.foreman@...labora.co.uk,
	daniel.stone@...labora.co.uk, olofj@...omium.org
Subject: Re: [PATCH 07/12] Input: synaptics - rename synaptics_data.mt to
 agm

On 06/28/2011 10:07 PM, djkurtz@...omium.org wrote:
> From: Daniel Kurtz <djkurtz@...omium.org>
> 
> Rename the synaptics_data.mt field to priv->agm to indicate it is the
> hardware state reported in a synaptics AGM packet.
> 
> When a Synaptics touchpad is in "AGM" mode, and multiple fingers are
> detected, the touchpad sends alternating "Advanced Gesture Mode" (AGM) and
> "Simple Gesture Mode" (SGM) packets.
>   The AGM packets have w=2, and contain reduced resolution finger data.
>   The SGM packets have w={0,1} and contain full resolution finger data.
> 
> Signed-off-by: Daniel Kurtz <djkurtz@...omium.org>
> ---
>  drivers/input/mouse/synaptics.c |    9 +++++----
>  drivers/input/mouse/synaptics.h |    2 +-
>  2 files changed, 6 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c
> index dc54675..4e5e454 100644
> --- a/drivers/input/mouse/synaptics.c
> +++ b/drivers/input/mouse/synaptics.c
> @@ -436,10 +436,10 @@ static int synaptics_parse_hw_state(const unsigned char buf[],
>  
>  		if (SYN_CAP_ADV_GESTURE(priv->ext_cap_0c) && hw->w == 2) {
>  			/* Gesture packet: (x, y, z) at half resolution */
> -			priv->mt.x = (((buf[4] & 0x0f) << 8) | buf[1]) << 1;
> -			priv->mt.y = INVERT_Y((((buf[4] & 0xf0) << 4)
> +			priv->agm.x = (((buf[4] & 0x0f) << 8) | buf[1]) << 1;
> +			priv->agm.y = INVERT_Y((((buf[4] & 0xf0) << 4)
>  					      | buf[2]) << 1);
> -			priv->mt.z = ((buf[3] & 0x30) | (buf[5] & 0x0f)) << 1;
> +			priv->agm.z = ((buf[3] & 0x30) | (buf[5] & 0x0f)) << 1;
>  			return 1;
>  		} else {
>  			hw->x = (((buf[3] & 0x10) << 8) |
> @@ -576,7 +576,8 @@ static void synaptics_process_packet(struct psmouse *psmouse)
>  	}
>  
>  	if (SYN_CAP_ADV_GESTURE(priv->ext_cap_0c))
> -		synaptics_report_semi_mt_data(dev, &hw, &priv->mt, num_fingers);
> +		synaptics_report_semi_mt_data(dev, &hw, &priv->agm,
> +					      num_fingers);
>  
>  	/* Post events
>  	 * BTN_TOUCH has to be first as mousedev relies on it when doing
> diff --git a/drivers/input/mouse/synaptics.h b/drivers/input/mouse/synaptics.h
> index 8a68e66..e367239 100644
> --- a/drivers/input/mouse/synaptics.h
> +++ b/drivers/input/mouse/synaptics.h
> @@ -147,7 +147,7 @@ struct synaptics_data {
>  
>  	struct serio *pt_port;			/* Pass-through serio port */
>  
> -	struct synaptics_hw_state mt;		/* current gesture packet */
> +	struct synaptics_hw_state agm;		/* last AGM packet */
>  };
>  
>  void synaptics_module_init(void);

I'm fine with changing the name of the element, especially if it
conforms to some protocol documentation. I'd like to ask that AGM be
spelled out in the comment, with a note that it contains half-resolution
second-touch data.

Otherwise:

Acked-by: Chase Douglas <chase.douglas@...onical.com>
--
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