Received: by 10.223.176.46 with SMTP id f43csp238745wra; Thu, 25 Jan 2018 21:06:50 -0800 (PST) X-Google-Smtp-Source: AH8x2265ucicAAhzBBatdirqff3aht0azbvzWww/7ZPF4qe2RSPLgvntZe8ugzKbPfrB80chAQgr X-Received: by 10.98.200.78 with SMTP id z75mr18081455pff.114.1516943210216; Thu, 25 Jan 2018 21:06:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516943210; cv=none; d=google.com; s=arc-20160816; b=0m5FwgjfGkkAvSl1IQLbVa8qzj0OWPZ3y98oiuz/p2RaSd7Ax9fMOmDHWfVZVjgPxw 1h16M8q7LWnsBSRTLwEkLSoWmiMKl8Ty7Hh+geydyMMZE5QncD8uS9gw7FtBUmuVpmC4 k+4aDFr4R/PonauGfdUAnGPrv0m7IvmY9FJy1p8mWyCN9BJdgl9WAhkfaEvbMxzYKSlk BU1Xr7JFYEV6+wbqaBwA3hFE/pgFD+sulRNz8SCQttuRjPm5xq82Cw3jPPRcIyPKEd+8 m+xBseoCB51hrh2ABP64y7Ax5keA4PLWK7+hbwfZO5XKLiimz44bOyh38Lb7gOLlve2y TzxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:dlp-filter:cms-type:user-agent :in-reply-to:content-disposition:mime-version:message-id:subject:cc :to:from:date:dkim-signature:dkim-filter:arc-authentication-results; bh=kDj32C/R1+8dWSIkjdtMxpsQpsZBFQlBjXZ8NEt0h90=; b=v5yP1mGrIxwdrZreh+bz6sM5CKgLN1Ox9a1NFAGS52NGTz0Qvk6T0RHoO1vPjTejk6 KopGB1oUmm/9Pk+RrfKkfaKXWyVA14pZshxmj0Fi8/SrXtdKW4pYJtaIEANnXrzhknwY yO8eQ22K9Up87o7mDOZgNrePj8FI6Qoga4PjGrjZ2YO/fba/phi/ZFPEx5FGyL7Bx2sS 462iWBykc4OoKxCyVElk7W0U6C6hrKrBP9n7WoFDyjZJu0nkU/Na+7Zfwe29FuP9uZTU kIj8QzMEi0r/yObcPu6FXJ/E+V1cfKrx0mY5kJLvoEWlxj2VQFyvdzodMxcnXHrKUTul SOVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=oGt9hzmK; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 7-v6si3193574pll.775.2018.01.25.21.06.34; Thu, 25 Jan 2018 21:06:50 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=oGt9hzmK; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751429AbeAZFGI (ORCPT + 99 others); Fri, 26 Jan 2018 00:06:08 -0500 Received: from mailout2.samsung.com ([203.254.224.25]:27791 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750730AbeAZFGG (ORCPT ); Fri, 26 Jan 2018 00:06:06 -0500 Received: from epcas1p2.samsung.com (unknown [182.195.41.46]) by mailout2.samsung.com (KnoxPortal) with ESMTP id 20180126050603epoutp024770926d578cb394727b38dd8480e64d~NQ8U114zg0350503505epoutp02U; Fri, 26 Jan 2018 05:06:03 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.samsung.com 20180126050603epoutp024770926d578cb394727b38dd8480e64d~NQ8U114zg0350503505epoutp02U DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1516943163; bh=kDj32C/R1+8dWSIkjdtMxpsQpsZBFQlBjXZ8NEt0h90=; h=Date:From:To:Cc:Subject:In-reply-to:References:From; b=oGt9hzmKH1iPInQ8PzPhvghTBIZEiYHKCk976Gy36k2FsAzE2ergS6e0849d6kffG FvXySmC+csmSk1Ifi+12fKUs0pyeTrNgA6HIMLfoHCCk7aJbm3rbf6jhiVHlwCg6s8 8GB1cKz6m/pMJwWGAa6tNt/4Qx71zcczxZlFy8Ng= Received: from epsmges2p4.samsung.com (unknown [182.195.40.65]) by epcas1p2.samsung.com (KnoxPortal) with ESMTP id 20180126050603epcas1p2f2640882a09e154865c5c69d1a63f47e~NQ8UqYBti1906219062epcas1p2r; Fri, 26 Jan 2018 05:06:03 +0000 (GMT) Received: from epcas2p1.samsung.com ( [182.195.41.53]) by epsmges2p4.samsung.com (Symantec Messaging Gateway) with SMTP id 4B.1D.04080.B37BA6A5; Fri, 26 Jan 2018 14:06:03 +0900 (KST) Received: from epsmgms2p2new.samsung.com (unknown [182.195.42.143]) by epcas2p3.samsung.com (KnoxPortal) with ESMTP id 20180126050603epcas2p32c5ec5989cedf0d32ff0b61e8625b1ad~NQ8UexbTz2974729747epcas2p3W; Fri, 26 Jan 2018 05:06:03 +0000 (GMT) X-AuditID: b6c32a48-9adff70000000ff0-91-5a6ab73b5a5a Received: from epmmp2 ( [203.254.227.17]) by epsmgms2p2new.samsung.com (Symantec Messaging Gateway) with SMTP id 92.FE.03890.B37BA6A5; Fri, 26 Jan 2018 14:06:03 +0900 (KST) Received: from gangnam.samsung ([10.113.77.200]) by mmp2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0P35007YXCU21940@mmp2.samsung.com>; Fri, 26 Jan 2018 14:06:03 +0900 (KST) Date: Fri, 26 Jan 2018 14:06:02 +0900 From: Andi Shyti To: Dmitry Torokhov Cc: Simon Shields , Rob Herring , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 3/4] Input: mms114 - drop platform data and use generic APIs Message-id: <20180126050602.GR7575@gangnam.samsung> MIME-version: 1.0 Content-type: text/plain; charset="us-ascii" Content-disposition: inline In-reply-to: <20180124193804.155654-4-dmitry.torokhov@gmail.com> User-Agent: Mutt/1.9.2 (2017-12-15) X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrMKsWRmVeSWpSXmKPExsWy7bCmqa719qwog/5rShaHF71gtLj56Rur xeVdc9gs/u/ZwW6x5cxtNgdWj52z7rJ7bFrVyebRsn4Tm8fnTXIBLFGpNhmpiSmpRQqpecn5 KZl56bZK3sHxzvGmZgaGuoaWFuZKCnmJuam2Si4+AbpumTlAe5UUyhJzSoFCAYnFxUr6djZF +aUlqQoZ+cUltkrRhoZGeoYG5npGRkZ6JsaxVkamQCUJqRnH185mLtiUUTFl5W32BsbvwV2M nBwSAiYSU1Y/Y+xi5OIQEtjBKLFh/SE2kISQwHdGic6dQTBFE+ZMhSrawCixbPY5KOcTo8Tu SZdZQapYBFQldh7cywJiswloSjTd/gE2SURAX2L77F9gDcwCzYwSGy8fYgdJCAsESXw4tAms gVfAWOLPzUZWCFtQ4sfke2BxZgEdibPH1jFC2NISj/7OAOvlFHCQeDH/J5gtKqAsseDVFHaQ BRICS9gkrv9+xghxt4vE2j2fWSFsYYlXx7ewQ9jSEs9WbYSqAbpo2+1kiOYJjBKf9n5lgkgY Szxb2MUEsZlPouPwX6BmDqA4r0RHmxBEiYdE+/0lUPMdJRpa/0GD5SSjxL1755gnMMrOQvLQ LCQPzULy0AJG5lWMYqkFxbnpqcVGBSZ6xYm5xaV56XrJ+bmbGMEJTMtjB+OBcz6HGAU4GJV4 eG/czowSYk0sK67MPcQowcGsJMIrqJsVJcSbklhZlVqUH19UmpNafIjRFBgrE5mlRJPzgck1 ryTe0MTSwMTMzMjczAKYrsR52wJcooQE0hNLUrNTUwtSi2D6mDg4pRoYRSLLkjob/ddsOPal OOe5rturtz8fNwtkpzd1bb5zxKDeXIFv1ZR7/ZF2j7vn6f6/FL7A/reyT/LecFPGD7cXSsq2 nrbOm3jUOXiz2dzwsKl/Jbb9yN+to7qMbxNj0asU/hXGe5r+sy4TEv7Ix7hZcdl/s3Dx87+a PY1Dl6YpqqzcPPnBGdUqJZbijERDLeai4kQAoReZRnYDAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrGLMWRmVeSWpSXmKPExsVy+t9jQV3r7VlRBg19ghaHF71gtLj56Rur xeVdc9gs/u/ZwW6x5cxtNgdWj52z7rJ7bFrVyebRsn4Tm8fnTXIBLFFcNimpOZllqUX6dglc GcfXzmYu2JRRMWXlbfYGxu/BXYycHBICJhIT5kxl7GLk4hASWMco0Tb3JSuE84lRYu6bTlaQ KhYBVYmdB/eygNhsApoSTbd/sIHYIgL6Ettn/2IEsZkFmhklfpxUB7GFBQIkFtx/yQ5i8woY S/y52Qg19CSjxPSTf6ASghI/Jt9jgWjWkli/8zgThC0t8ejvDLAaTgEHiRfzf4LZogLKEgte TWGfwMg/C0n7LCTts5C0L2BkXsUomVpQnJueW2xUYJSXWq5XnJhbXJqXrpecn7uJERi62w5r 9e9gfLwk/hCjAAejEg/vjduZUUKsiWXFlbmHGCU4mJVEeAV1s6KEeFMSK6tSi/Lji0pzUosP MUpzsCiJ8/LnH4sUEkhPLEnNTk0tSC2CyTJxcEo1MO4LecGe91Cl4f/KQD0ZSaFovVixIzN5 /ijNKYlcsnWv12Etu7uS2ceP23td2hJxW7ZqxmXm4kLzRRWJHoFWIrM//jbKud7L+0J47kaz iffDOr58NMu3uBdeL8FqIj/l17ajZcdn1Lw3rZRiCYlmemhT4/P4/r+YsglTlPqW1FmWPWNj +WRRocRSnJFoqMVcVJwIAH1uHHBZAgAA X-CMS-MailID: 20180126050603epcas2p32c5ec5989cedf0d32ff0b61e8625b1ad X-Msg-Generator: CA CMS-TYPE: 102P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20180124193816epcas4p2cd803139ab7eed2e65294e3a84e25f4a X-RootMTR: 20180124193816epcas4p2cd803139ab7eed2e65294e3a84e25f4a References: <20180124193804.155654-1-dmitry.torokhov@gmail.com> <20180124193804.155654-4-dmitry.torokhov@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Simon and Dmitry, On Wed, Jan 24, 2018 at 11:38:03AM -0800, Dmitry Torokhov wrote: > From: Simon Shields > > The MMS114 platform data has no in-tree users, so drop it. > > Switch to using the standard touchscreen properties via > touchscreen_parse_properties(), and move the old DT parsing code > to use device_property_*() APIs. > > Finally, use touchscreen_report_pos to report x/y coordinates > and drop the custom x/y inversion code. > > Signed-off-by: Simon Shields > Reviewed-by: Rob Herring > Patchwork-Id: 10162101 > Signed-off-by: Dmitry Torokhov yes, looks better. I'm happy you dropped the (mms114_parse_dt(data) < 0). Reviewed-by: Andi Shyti Tested-by: Andi Shyti Thanks, Andi > --- > .../bindings/input/touchscreen/mms114.txt | 29 ++-- > drivers/input/touchscreen/mms114.c | 147 +++++++++------------ > include/linux/platform_data/mms114.h | 24 ---- > 3 files changed, 82 insertions(+), 118 deletions(-) > delete mode 100644 include/linux/platform_data/mms114.h > > diff --git a/Documentation/devicetree/bindings/input/touchscreen/mms114.txt b/Documentation/devicetree/bindings/input/touchscreen/mms114.txt > index 89d4c56c56711..8f9f9f38eff4a 100644 > --- a/Documentation/devicetree/bindings/input/touchscreen/mms114.txt > +++ b/Documentation/devicetree/bindings/input/touchscreen/mms114.txt > @@ -4,14 +4,18 @@ Required properties: > - compatible: must be "melfas,mms114" > - reg: I2C address of the chip > - interrupts: interrupt to which the chip is connected > -- x-size: horizontal resolution of touchscreen > -- y-size: vertical resolution of touchscreen > +- touchscreen-size-x: See [1] > +- touchscreen-size-y: See [1] > > Optional properties: > -- contact-threshold: > -- moving-threshold: > -- x-invert: invert X axis > -- y-invert: invert Y axis > +- touchscreen-fuzz-x: See [1] > +- touchscreen-fuzz-y: See [1] > +- touchscreen-fuzz-pressure: See [1] > +- touchscreen-inverted-x: See [1] > +- touchscreen-inverted-y: See [1] > +- touchscreen-swapped-x-y: See [1] > + > +[1]: Documentation/devicetree/bindings/input/touchscreen/touchscreen.txt > > Example: > > @@ -22,12 +26,13 @@ Example: > compatible = "melfas,mms114"; > reg = <0x48>; > interrupts = <39 0>; > - x-size = <720>; > - y-size = <1280>; > - contact-threshold = <10>; > - moving-threshold = <10>; > - x-invert; > - y-invert; > + touchscreen-size-x = <720>; > + touchscreen-size-y = <1280>; > + touchscreen-fuzz-x = <10>; > + touchscreen-fuzz-y = <10>; > + touchscreen-fuzz-pressure = <10>; > + touchscreen-inverted-x; > + touchscreen-inverted-y; > }; > > /* ... */ > diff --git a/drivers/input/touchscreen/mms114.c b/drivers/input/touchscreen/mms114.c > index c3480db5d21ed..69e4288bf8aa3 100644 > --- a/drivers/input/touchscreen/mms114.c > +++ b/drivers/input/touchscreen/mms114.c > @@ -12,8 +12,8 @@ > #include > #include > #include > +#include > #include > -#include > #include > #include > > @@ -55,7 +55,9 @@ struct mms114_data { > struct input_dev *input_dev; > struct regulator *core_reg; > struct regulator *io_reg; > - const struct mms114_platform_data *pdata; > + struct touchscreen_properties props; > + unsigned int contact_threshold; > + unsigned int moving_threshold; > > /* Use cache data for mode control register(write only) */ > u8 cache_mode_control; > @@ -143,7 +145,6 @@ static int mms114_write_reg(struct mms114_data *data, unsigned int reg, > > static void mms114_process_mt(struct mms114_data *data, struct mms114_touch *touch) > { > - const struct mms114_platform_data *pdata = data->pdata; > struct i2c_client *client = data->client; > struct input_dev *input_dev = data->input_dev; > unsigned int id; > @@ -163,16 +164,6 @@ static void mms114_process_mt(struct mms114_data *data, struct mms114_touch *tou > id = touch->id - 1; > x = touch->x_lo | touch->x_hi << 8; > y = touch->y_lo | touch->y_hi << 8; > - if (x > pdata->x_size || y > pdata->y_size) { > - dev_dbg(&client->dev, > - "Wrong touch coordinates (%d, %d)\n", x, y); > - return; > - } > - > - if (pdata->x_invert) > - x = pdata->x_size - x; > - if (pdata->y_invert) > - y = pdata->y_size - y; > > dev_dbg(&client->dev, > "id: %d, type: %d, pressed: %d, x: %d, y: %d, width: %d, strength: %d\n", > @@ -183,9 +174,8 @@ static void mms114_process_mt(struct mms114_data *data, struct mms114_touch *tou > input_mt_report_slot_state(input_dev, MT_TOOL_FINGER, touch->pressed); > > if (touch->pressed) { > + touchscreen_report_pos(input_dev, &data->props, x, y, true); > input_report_abs(input_dev, ABS_MT_TOUCH_MAJOR, touch->width); > - input_report_abs(input_dev, ABS_MT_POSITION_X, x); > - input_report_abs(input_dev, ABS_MT_POSITION_Y, y); > input_report_abs(input_dev, ABS_MT_PRESSURE, touch->strength); > } > } > @@ -263,7 +253,7 @@ static int mms114_get_version(struct mms114_data *data) > > static int mms114_setup_regs(struct mms114_data *data) > { > - const struct mms114_platform_data *pdata = data->pdata; > + const struct touchscreen_properties *props = &data->props; > int val; > int error; > > @@ -275,32 +265,32 @@ static int mms114_setup_regs(struct mms114_data *data) > if (error < 0) > return error; > > - val = (pdata->x_size >> 8) & 0xf; > - val |= ((pdata->y_size >> 8) & 0xf) << 4; > + val = (props->max_x >> 8) & 0xf; > + val |= ((props->max_y >> 8) & 0xf) << 4; > error = mms114_write_reg(data, MMS114_XY_RESOLUTION_H, val); > if (error < 0) > return error; > > - val = pdata->x_size & 0xff; > + val = props->max_x & 0xff; > error = mms114_write_reg(data, MMS114_X_RESOLUTION, val); > if (error < 0) > return error; > > - val = pdata->y_size & 0xff; > + val = props->max_x & 0xff; > error = mms114_write_reg(data, MMS114_Y_RESOLUTION, val); > if (error < 0) > return error; > > - if (pdata->contact_threshold) { > + if (data->contact_threshold) { > error = mms114_write_reg(data, MMS114_CONTACT_THRESHOLD, > - pdata->contact_threshold); > + data->contact_threshold); > if (error < 0) > return error; > } > > - if (pdata->moving_threshold) { > + if (data->moving_threshold) { > error = mms114_write_reg(data, MMS114_MOVING_THRESHOLD, > - pdata->moving_threshold); > + data->moving_threshold); > if (error < 0) > return error; > } > @@ -335,9 +325,6 @@ static int mms114_start(struct mms114_data *data) > return error; > } > > - if (data->pdata->cfg_pin) > - data->pdata->cfg_pin(true); > - > enable_irq(client->irq); > > return 0; > @@ -350,9 +337,6 @@ static void mms114_stop(struct mms114_data *data) > > disable_irq(client->irq); > > - if (data->pdata->cfg_pin) > - data->pdata->cfg_pin(false); > - > error = regulator_disable(data->io_reg); > if (error) > dev_warn(&client->dev, "Failed to disable vdd: %d\n", error); > @@ -376,67 +360,43 @@ static void mms114_input_close(struct input_dev *dev) > mms114_stop(data); > } > > -#ifdef CONFIG_OF > -static struct mms114_platform_data *mms114_parse_dt(struct device *dev) > +static int mms114_parse_legacy_bindings(struct mms114_data *data) > { > - struct mms114_platform_data *pdata; > - struct device_node *np = dev->of_node; > - > - if (!np) > - return NULL; > + struct device *dev = &data->client->dev; > + struct touchscreen_properties *props = &data->props; > > - pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL); > - if (!pdata) { > - dev_err(dev, "failed to allocate platform data\n"); > - return NULL; > + if (device_property_read_u32(dev, "x-size", &props->max_x)) { > + dev_dbg(dev, "failed to get legacy x-size property\n"); > + return -EINVAL; > } > > - if (of_property_read_u32(np, "x-size", &pdata->x_size)) { > - dev_err(dev, "failed to get x-size property\n"); > - return NULL; > + if (device_property_read_u32(dev, "y-size", &props->max_y)) { > + dev_dbg(dev, "failed to get legacy y-size property\n"); > + return -EINVAL; > } > > - if (of_property_read_u32(np, "y-size", &pdata->y_size)) { > - dev_err(dev, "failed to get y-size property\n"); > - return NULL; > - } > + device_property_read_u32(dev, "contact-threshold", > + &data->contact_threshold); > + device_property_read_u32(dev, "moving-threshold", > + &data->moving_threshold); > > - of_property_read_u32(np, "contact-threshold", > - &pdata->contact_threshold); > - of_property_read_u32(np, "moving-threshold", > - &pdata->moving_threshold); > + if (device_property_read_bool(dev, "x-invert")) > + props->invert_x = true; > + if (device_property_read_bool(dev, "y-invert")) > + props->invert_y = true; > > - if (of_find_property(np, "x-invert", NULL)) > - pdata->x_invert = true; > - if (of_find_property(np, "y-invert", NULL)) > - pdata->y_invert = true; > + props->swap_x_y = false; > > - return pdata; > -} > -#else > -static inline struct mms114_platform_data *mms114_parse_dt(struct device *dev) > -{ > - return NULL; > + return 0; > } > -#endif > > static int mms114_probe(struct i2c_client *client, > const struct i2c_device_id *id) > { > - const struct mms114_platform_data *pdata; > struct mms114_data *data; > struct input_dev *input_dev; > int error; > > - pdata = dev_get_platdata(&client->dev); > - if (!pdata) > - pdata = mms114_parse_dt(&client->dev); > - > - if (!pdata) { > - dev_err(&client->dev, "Need platform data\n"); > - return -EINVAL; > - } > - > if (!i2c_check_functionality(client->adapter, > I2C_FUNC_PROTOCOL_MANGLING)) { > dev_err(&client->dev, > @@ -454,7 +414,38 @@ static int mms114_probe(struct i2c_client *client, > > data->client = client; > data->input_dev = input_dev; > - data->pdata = pdata; > + > + input_set_capability(input_dev, EV_ABS, ABS_MT_POSITION_X); > + input_set_capability(input_dev, EV_ABS, ABS_MT_POSITION_Y); > + input_set_abs_params(input_dev, ABS_MT_PRESSURE, 0, 255, 0, 0); > + input_set_abs_params(input_dev, ABS_MT_TOUCH_MAJOR, > + 0, MMS114_MAX_AREA, 0, 0); > + > + touchscreen_parse_properties(input_dev, true, &data->props); > + if (!data->props.max_x || !data->props.max_y) { > + dev_dbg(&client->dev, > + "missing X/Y size properties, trying legacy bindings\n"); > + error = mms114_parse_legacy_bindings(data); > + if (error) > + return error; > + > + input_set_abs_params(input_dev, ABS_MT_POSITION_X, > + 0, data->props.max_x, 0, 0); > + input_set_abs_params(input_dev, ABS_MT_POSITION_Y, > + 0, data->props.max_y, 0, 0); > + } > + > + /* > + * The firmware handles movement and pressure fuzz, so > + * don't duplicate that in software. > + */ > + data->moving_threshold = input_abs_get_fuzz(input_dev, > + ABS_MT_POSITION_X); > + data->contact_threshold = input_abs_get_fuzz(input_dev, > + ABS_MT_PRESSURE); > + input_abs_set_fuzz(input_dev, ABS_MT_POSITION_X, 0); > + input_abs_set_fuzz(input_dev, ABS_MT_POSITION_Y, 0); > + input_abs_set_fuzz(input_dev, ABS_MT_PRESSURE, 0); > > input_dev->name = "MELFAS MMS114 Touchscreen"; > input_dev->id.bustype = BUS_I2C; > @@ -462,14 +453,6 @@ static int mms114_probe(struct i2c_client *client, > input_dev->open = mms114_input_open; > input_dev->close = mms114_input_close; > > - input_set_abs_params(input_dev, ABS_MT_TOUCH_MAJOR, > - 0, MMS114_MAX_AREA, 0, 0); > - input_set_abs_params(input_dev, ABS_MT_POSITION_X, > - 0, data->pdata->x_size, 0, 0); > - input_set_abs_params(input_dev, ABS_MT_POSITION_Y, > - 0, data->pdata->y_size, 0, 0); > - input_set_abs_params(input_dev, ABS_MT_PRESSURE, 0, 255, 0, 0); > - > error = input_mt_init_slots(input_dev, MMS114_MAX_TOUCH, > INPUT_MT_DIRECT); > if (error) > diff --git a/include/linux/platform_data/mms114.h b/include/linux/platform_data/mms114.h > deleted file mode 100644 > index 5722ebfb27382..0000000000000 > --- a/include/linux/platform_data/mms114.h > +++ /dev/null > @@ -1,24 +0,0 @@ > -/* > - * Copyright (C) 2012 Samsung Electronics Co.Ltd > - * Author: Joonyoung Shim > - * > - * This program is free software; you can redistribute it and/or modify > - * it under the terms of the GNU General Public License version 2 as > - * published by the Free Software Foundationr > - */ > - > -#ifndef __LINUX_MMS114_H > -#define __LINUX_MMS114_H > - > -struct mms114_platform_data { > - unsigned int x_size; > - unsigned int y_size; > - unsigned int contact_threshold; > - unsigned int moving_threshold; > - bool x_invert; > - bool y_invert; > - > - void (*cfg_pin)(bool); > -}; > - > -#endif /* __LINUX_MMS114_H */ > -- > 2.16.0.rc1.238.g530d649a79-goog > >