linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: "Michał Mirosław" <mirq-linux@rere.qmqm.pl>
Cc: David Heidelberg <david@ixit.cz>,
	Dmitry Osipenko <digetx@gmail.com>,
	Henrik Rydberg <rydberg@bitmath.org>,
	James Chen <james.chen@emc.com.tw>,
	Johnny Chuang <johnny.chuang@emc.com.tw>,
	Rob Herring <robh+dt@kernel.org>,
	Scott Liu <scott.liu@emc.com.tw>,
	linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v5 01/10] input: elants: document some registers and values
Date: Sun, 17 May 2020 21:07:10 -0700	[thread overview]
Message-ID: <20200518040710.GQ89269@dtor-ws> (raw)
In-Reply-To: <a8c17a4c804ad5c429269cc0468d8cb4c0783a47.1587923061.git.mirq-linux@rere.qmqm.pl>

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@rere.qmqm.pl>
> Reviewed-by: Dmitry Osipenko <digetx@gmail.com>
> Tested-by: Dmitry Osipenko <digetx@gmail.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

  reply	other threads:[~2020-05-18  4:07 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-26 17:47 [PATCH v5 00/10] input: elants: Support Asus TF300T touchscreen Michał Mirosław
2020-04-26 17:47 ` [PATCH v5 01/10] input: elants: document some registers and values Michał Mirosław
2020-05-18  4:07   ` Dmitry Torokhov [this message]
2020-05-18  9:18     ` Dmitry Osipenko
2020-04-26 17:47 ` [PATCH v5 02/10] input: elants: support old touch report format Michał Mirosław
2020-04-26 17:47 ` [PATCH v5 03/10] input: elants: remove unused axes Michał Mirosław
2020-04-26 18:34   ` Dmitry Osipenko
2020-05-18  3:39   ` Dmitry Torokhov
2020-04-26 17:47 ` [PATCH v5 04/10] input: elants: override touchscreen info with DT properties Michał Mirosław
2020-05-18  4:02   ` Dmitry Torokhov
2020-04-26 17:47 ` [PATCH v5 05/10] input: elants: refactor elants_i2c_execute_command() Michał Mirosław
2020-05-14 19:43   ` Dmitry Osipenko
2020-05-18  4:03   ` Dmitry Torokhov
2020-04-26 17:47 ` [PATCH v5 06/10] input: elants: read touchscreen size for EKTF3624 Michał Mirosław
2020-04-26 17:47 ` [PATCH v5 07/10] input: elants: support 0x66 reply opcode for reporting touches Michał Mirosław
2020-05-18  4:05   ` Dmitry Torokhov
2020-05-18  9:10     ` Dmitry Osipenko
2020-04-26 17:47 ` [PATCH v5 08/10] dt-bindings: input: elants-i2c: Document common touchscreen properties Michał Mirosław
2020-04-26 17:47 ` [PATCH v5 09/10] dt-bindings: input: elants-i2c: Document eKTF3624 Michał Mirosław
2020-04-26 17:47 ` [PATCH v5 10/10] dt-bindings: input: touchscreen: elants_i2c: convert to YAML Michał Mirosław
2020-05-14 19:45 ` [PATCH v5 00/10] input: elants: Support Asus TF300T touchscreen Dmitry Osipenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200518040710.GQ89269@dtor-ws \
    --to=dmitry.torokhov@gmail.com \
    --cc=david@ixit.cz \
    --cc=digetx@gmail.com \
    --cc=james.chen@emc.com.tw \
    --cc=johnny.chuang@emc.com.tw \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mirq-linux@rere.qmqm.pl \
    --cc=robh+dt@kernel.org \
    --cc=rydberg@bitmath.org \
    --cc=scott.liu@emc.com.tw \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).