All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andi Shyti <andi.shyti@samsung.com>
To: Simon Shields <simon@lineageos.org>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	linux-input@vger.kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH] touchscreen: mms114: add support for mms152
Date: Tue, 19 Dec 2017 15:22:52 +0900	[thread overview]
Message-ID: <20171219062252.GC25647@gangnam.samsung> (raw)
In-Reply-To: <20171218124933.1803-1-simon@lineageos.org>

Hi Simon,

> +	if (data->pdata->type == TYPE_MMS152) {
> +		/* MMS152 has no configuration or power on registers */
> +		return 0;
> +	}
> +

Please drop the brackets here accorting to the
Documentation/process/coding-style.rst file.

> +	pdata->type = (enum mms_type)of_device_get_match_data(dev);
> +
>  	if (of_property_read_u32(np, "x-size", &pdata->x_size)) {
>  		dev_err(dev, "failed to get x-size property\n");
>  		return NULL;
> @@ -411,6 +437,7 @@ static struct mms114_platform_data *mms114_parse_dt(struct device *dev)
>  	if (of_find_property(np, "y-invert", NULL))
>  		pdata->y_invert = true;
>  
> +

Please do not add extra lines

>  	return pdata;
>  }
>  #else
> @@ -456,7 +483,15 @@ static int mms114_probe(struct i2c_client *client,
>  	data->input_dev = input_dev;
>  	data->pdata = pdata;
>  
> -	input_dev->name = "MELFAS MMS114 Touchscreen";
> +	switch (pdata->type) {
> +	case TYPE_MMS114:
> +		input_dev->name = "MELFAS MMS114 Touchscreen";
> +		break;
> +	case TYPE_MMS152:
> +		input_dev->name = "MELFAS MMS152 Touchscreen";
> +		break;
> +	}
> +
>  	input_dev->id.bustype = BUS_I2C;
>  	input_dev->dev.parent = &client->dev;
>  	input_dev->open = mms114_input_open;
> @@ -569,7 +604,13 @@ MODULE_DEVICE_TABLE(i2c, mms114_id);
>  
>  #ifdef CONFIG_OF
>  static const struct of_device_id mms114_dt_match[] = {
> -	{ .compatible = "melfas,mms114" },
> +	{
> +		.compatible = "melfas,mms114",
> +		.data = (void *)TYPE_MMS114,
> +	}, {
> +		.compatible = "melfas,mms152",
> +		.data = (void *)TYPE_MMS152,

You are not documenting the new "melfas,mms152" compatible in
Documentation/devicetree/bindings/input/touchscreen/mms114.txt

Andi

  reply	other threads:[~2017-12-19  6:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20171218124955epcas3p3d776375b0dadbc3e0291da6ffb0eb6b6@epcas3p3.samsung.com>
2017-12-18 12:49 ` [PATCH] touchscreen: mms114: add support for mms152 Simon Shields
2017-12-19  6:22   ` Andi Shyti [this message]
     [not found]     ` <20171219062252.GC25647-8vUhnHFVuGn35fTxX1Dczw@public.gmane.org>
2017-12-19  8:04       ` Simon Shields
     [not found]         ` <20171219080409.GA27703-WP75azK+jQYgsBAKwltoeQ@public.gmane.org>
2017-12-19  9:10           ` Andi Shyti
2017-12-20 15:38   ` [PATCH v2] Input: mms114 - " Simon Shields
2017-12-20 18:34     ` Dmitry Torokhov
     [not found]   ` <20171218124933.1803-1-simon-WP75azK+jQYgsBAKwltoeQ@public.gmane.org>
2017-12-20 18:21     ` [PATCH] touchscreen: mms114: " Rob Herring

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=20171219062252.GC25647@gangnam.samsung \
    --to=andi.shyti@samsung.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=simon@lineageos.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.