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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 9 Dec 2014 20:02:19 -0800
From:	Jeremiah Mahler <jmmahler@...il.com>
To:	Dudley Du <dudley.dulixin@...il.com>
Cc:	dmitry.torokhov@...il.com, rydberg@...omail.se, bleung@...gle.com,
	linux-input@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v13 10/12] input: cyapa: add gen5 trackpad device read
 baseline function support

Dudley,

On Tue, Dec 09, 2014 at 05:11:42PM +0800, Dudley Du wrote:
> Add read baseline function supported for gen5 trackpad device,
> it can be used through sysfs baseline interface.
> TEST=test on Chromebooks.
> 
> Signed-off-by: Dudley Du <dudley.dulixin@...il.com>
> ---
[...]
>  	return 0;
>  }
>  
> +static int cyapa_gen5_resume_scanning(struct cyapa *cyapa)
> +{
> +	u8 cmd[7] = { 0x04, 0x00, 0x05, 0x00, 0x2f, 0x00, 0x04 };
> +	u8 resp_data[6];
> +	int resp_len;
> +	int error;
> +
> +	/* Try to dump all bufferred data before doing command. */
                       ^^^^^^^^^
					   buffered

And there are three more below.

> +	cyapa_empty_pip_output_data(cyapa, NULL, NULL, NULL);
> +
> +	resp_len = 6;
> +	error = cyapa_i2c_pip_cmd_irq_sync(cyapa,
> +			cmd, 7,
> +			resp_data, &resp_len,
> +			500, cyapa_gen5_sort_tsg_pip_app_resp_data, true);
> +	if (error || !VALID_CMD_RESP_HEADER(resp_data, 0x04))
> +		return -EINVAL;
> +
> +	/* Try to dump all bufferred data when resuming scanning. */
> +	cyapa_empty_pip_output_data(cyapa, NULL, NULL, NULL);
> +
> +	return 0;
> +}
> +
> +static int cyapa_gen5_suspend_scanning(struct cyapa *cyapa)
> +{
> +	u8 cmd[7] = { 0x04, 0x00, 0x05, 0x00, 0x2f, 0x00, 0x03 };
> +	u8 resp_data[6];
> +	int resp_len;
> +	int error;
> +
> +	/* Try to dump all bufferred data before doing command. */
> +	cyapa_empty_pip_output_data(cyapa, NULL, NULL, NULL);
> +
> +	resp_len = 6;
> +	error = cyapa_i2c_pip_cmd_irq_sync(cyapa,
> +			cmd, 7,
> +			resp_data, &resp_len,
> +			500, cyapa_gen5_sort_tsg_pip_app_resp_data, true);
> +	if (error || !VALID_CMD_RESP_HEADER(resp_data, 0x03))
> +		return -EINVAL;
> +
> +	/* Try to dump all bufferred data when suspending scanning. */
> +	cyapa_empty_pip_output_data(cyapa, NULL, NULL, NULL);
> +
> +	return 0;
> +}
> +
[...]

-- 
- Jeremiah Mahler
--
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