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: <20200518040710.GQ89269@dtor-ws>
Date:   Sun, 17 May 2020 21:07:10 -0700
From:   Dmitry Torokhov <dmitry.torokhov@...il.com>
To:     Michał Mirosław <mirq-linux@...e.qmqm.pl>
Cc:     David Heidelberg <david@...t.cz>,
        Dmitry Osipenko <digetx@...il.com>,
        Henrik Rydberg <rydberg@...math.org>,
        James Chen <james.chen@....com.tw>,
        Johnny Chuang <johnny.chuang@....com.tw>,
        Rob Herring <robh+dt@...nel.org>,
        Scott Liu <scott.liu@....com.tw>, linux-input@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v5 01/10] input: elants: document some registers and
 values

On Sun, Apr 26, 2020 at 07:47:49PM +0200, Michał Mirosław wrote:
> Add information found in downstream kernels, to make the code less
> magic.
> 
> Signed-off-by: Michał Mirosław <mirq-linux@...e.qmqm.pl>
> Reviewed-by: Dmitry Osipenko <digetx@...il.com>
> Tested-by: Dmitry Osipenko <digetx@...il.com>
> ---
>  drivers/input/touchscreen/elants_i2c.c | 29 +++++++++++++++++++++-----
>  1 file changed, 24 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/input/touchscreen/elants_i2c.c b/drivers/input/touchscreen/elants_i2c.c
> index 2289f9638116..d2175fb6209a 100644
> --- a/drivers/input/touchscreen/elants_i2c.c
> +++ b/drivers/input/touchscreen/elants_i2c.c
> @@ -81,7 +81,11 @@
>  
>  #define HEADER_REPORT_10_FINGER	0x62
>  
> -/* Header (4 bytes) plus 3 fill 10-finger packets */
> +/* Power state */
> +#define PWR_STATE_DEEP_SLEEP	0
> +#define PWR_STATE_NORMAL	1
> +
> +/* Header (4 bytes) plus 3 full 10-finger packets */
>  #define MAX_PACKET_SIZE		169
>  
>  #define BOOT_TIME_DELAY_MS	50
> @@ -91,10 +95,21 @@
>  #define E_ELAN_INFO_BC_VER	0x10
>  #define E_ELAN_INFO_TEST_VER	0xE0
>  #define E_ELAN_INFO_FW_ID	0xF0
> +#define E_POWER_MODE		0x40
> +#define E_POWER_STATE		0x50
> +#define E_INFO_X_RES		0x60
> +#define E_INFO_Y_RES		0x63

I would prefer if we introduced these in the patches that use them.

>  #define E_INFO_OSR		0xD6
>  #define E_INFO_PHY_SCAN		0xD7
>  #define E_INFO_PHY_DRIVER	0xD8
>  
> +/* FW write command, 0x54 0x?? 0x0, 0x01 */
> +#define E_POWER_MODE_BATTERY	0x40
> +#define E_POWER_MODE_AC		0x41
> +#define E_POWER_MODE_USB	0x42

What is this for?

> +#define E_POWER_STATE_SLEEP	0x50
> +#define E_POWER_STATE_RESUME	0x58

Thanks.

-- 
Dmitry

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ