public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Javier Martinez Canillas <javier@osg.samsung.com>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>, linux-input@vger.kernel.org
Cc: Nick Dyer <nick.dyer@itdev.co.uk>,
	Yufeng Shen <miletus@chromium.org>,
	Benson Leung <bleung@chromium.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Input: atmel_mxt_ts - add generic platform data for Chromebooks
Date: Tue, 24 Nov 2015 16:18:05 -0300	[thread overview]
Message-ID: <5654B7ED.9080107@osg.samsung.com> (raw)
In-Reply-To: <20151124185810.GA18357@dtor-ws>

Hello Dmitry,

On 11/24/2015 03:58 PM, Dmitry Torokhov wrote:
> Apparently people are installing generic Linux distributions not only on
> Pixels but also on other Chromebooks. Unfortunately on all of them Atmel
> parts assigned names ATML0000 and ATML0001, and do not carry any other
> configuration data. So let's create generic instance of platform data that
> should cover most of them (we assume that they will not be using T100
> objects, since with those Google mapped BTN_LEFT onto a different GPIO, so
> slightly different keymap would be needed, but I think we used parts with
> T100 on ARM devices where we thankfully have DTS and can describe the
> devices better).
> 

That is correct, an example of an ARM based Chromebook that has an Atmel chip
with a T100 object is the Exynos5800 Peach Pi Chromebook and as you correctly
said, the buttons to GPIO mapping is described in the DTS, i.e:

	/* Atmel mXT540S */
	trackpad@4b {
		compatible = "atmel,maxtouch";
		reg = <0x4b>;
		interrupt-parent = <&gpx1>;
		interrupts = <1 IRQ_TYPE_EDGE_FALLING>;
		wakeup-source;
		pinctrl-names = "default";
		pinctrl-0 = <&trackpad_irq>;
		linux,gpio-keymap = <KEY_RESERVED
				     KEY_RESERVED
				     KEY_RESERVED	/* GPIO 0 */
				     KEY_RESERVED	/* GPIO 1 */
				     BTN_LEFT		/* GPIO 2 */
				     KEY_RESERVED>;	/* GPIO 3 */
	};

> Tested-by: Rich K <rgkirch@gmail.com>
> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> ---
>  drivers/input/touchscreen/atmel_mxt_ts.c | 33 ++++++++++++++++++++++++++++++++
>  1 file changed, 33 insertions(+)
> 
> diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c
> index c562205..159120b 100644
> --- a/drivers/input/touchscreen/atmel_mxt_ts.c
> +++ b/drivers/input/touchscreen/atmel_mxt_ts.c
> @@ -2487,6 +2487,31 @@ static struct mxt_acpi_platform_data samus_platform_data[] = {
>  	{ }
>  };
>  
> +static unsigned int chromebook_tp_buttons[] = {

Maybe naming it chromebook_t19_buttons instead to make it clear that the
mapping is specific to the T19 object or at least document that assumption?

Although is mentioned in the commit message so I don't have a strong
preference and the patch looks good to me:

Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com>

Best regards,
-- 
Javier Martinez Canillas
Open Source Group
Samsung Research America

  reply	other threads:[~2015-11-24 19:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-24 18:58 [PATCH] Input: atmel_mxt_ts - add generic platform data for Chromebooks Dmitry Torokhov
2015-11-24 19:18 ` Javier Martinez Canillas [this message]
2015-12-01 21:21   ` Dmitry Torokhov
2015-12-01 21:25     ` Javier Martinez Canillas

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=5654B7ED.9080107@osg.samsung.com \
    --to=javier@osg.samsung.com \
    --cc=bleung@chromium.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=miletus@chromium.org \
    --cc=nick.dyer@itdev.co.uk \
    /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