Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4059493imu; Mon, 28 Jan 2019 16:27:38 -0800 (PST) X-Google-Smtp-Source: ALg8bN6Wz6P71UtIHi5pY0DFf5qe3PQseuHZYmwTLS/N7clYEIdFdpv+sjnn0UDuWOYzF4miD0mp X-Received: by 2002:a17:902:6b49:: with SMTP id g9mr23456177plt.98.1548721658681; Mon, 28 Jan 2019 16:27:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548721658; cv=none; d=google.com; s=arc-20160816; b=xGFzy+DQIc6BQK6ZIW9pPn2/G+kBVi7Rl/AOe0l01OZQuPUAb2FVS9T9M43p3yO5yw LBQMwCdy1OG4J5hkNCvbyvxs+3KtD90KeLSfgFvs9hkjegyQ1VkgAA1ZQChHQOZvBqKs FJeJGTrP+HNBlpfdtFqFmtGjLqDHGZ8569GPXBy1Gfy0HAKoGrxIY9zeP9WXwEKlbgdG WVlq6oawzwlrd0mQpr85Ni2PCpyeJD3V63YGziz7NmrMkpS+PQERy8/f/bhDS7mZnNM7 ClTeCM28qSHbR3znM4i+qzEhCIF4bmLjozfnBhgi3zDN1rA4VdhbLJX0IeVKbG3TifqT vXLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=uKESH3dP8KlH2H1aC9ySmBdA/fbboEB/JQypTItUj7I=; b=ep4gjk+06S8yj6S531ca40d6Mm7Xmt+0lUt/iFZGCNhQiILC2tbm4rMCovMwFEV/e/ IhFJz4ZLRCTY0JhDb9ARsScCzEKmxY9Sv1FwSwQNJcQfnqhAuBog2IyW08NsZF1VcYHW a0Jnoa5T0nXLUmk271Rue/ngWVr+RoR+OdKO2yTCMtc0uKjo7lgYmm0G7VobnJf+xg/r x5UAW0e48DjA3bKI9lOYMp060sgGrw7WxBwLfqQfVdhWLTPBKi60yc1zeM8WVI7wQJ6g BF8aua1P/0XHpgI9vrsQIYGBCu20Lamsv06CDDzi24swDQ/OmIB8d+UvIYAz2KcYyyJt 02Zw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=gpQq0SwP; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h9si35603604pli.418.2019.01.28.16.27.23; Mon, 28 Jan 2019 16:27:38 -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=@gmail.com header.s=20161025 header.b=gpQq0SwP; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727212AbfA2AZa (ORCPT + 99 others); Mon, 28 Jan 2019 19:25:30 -0500 Received: from mail-pg1-f193.google.com ([209.85.215.193]:40256 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726713AbfA2AZa (ORCPT ); Mon, 28 Jan 2019 19:25:30 -0500 Received: by mail-pg1-f193.google.com with SMTP id z10so7951412pgp.7; Mon, 28 Jan 2019 16:25:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=uKESH3dP8KlH2H1aC9ySmBdA/fbboEB/JQypTItUj7I=; b=gpQq0SwPdDkNS9ZYm6KJF0bJ55NyrCChKzrCu46vKxqh0tIeyvh1unq0/4JCI+o1x3 1hrLVRRSqhUi1OmCgRWfsNAjr48UvmNB1JwinR1RiVZfeSFAE3YvtWRaG+zTuV1lE3U6 wrfNszfiWmQG1r1GCdHAwNrbs/TOla4gmbNRV5Ihgunj7cxKm+ZVmBw3Y8vtm/WwXGCL Cqr2LB6mIq005qo1RE4qm2KGOfA3kkX0OcaQNGljwDGMkUD7QBBjBkpU4Kkyyr966tX1 gTPbE6lsc1KTP1oHHNzNOOP3p/kAlbrsPUpav/9XByNj9+pZx+IjddCbdlb85PoSoo3n XmcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=uKESH3dP8KlH2H1aC9ySmBdA/fbboEB/JQypTItUj7I=; b=W822ADF5n29Hc5/yo6GUrtLiu+sv0/WPvrBLXBCUTiuhkmK5WcuRD9sZERon85lCa+ XaxribBVYA86n7C4EFxwnjDpI1oU5BgVmR4ZX87VXH/9SdWnN2ijrvzqcWxjakLGJnVx suC/2G8ITSWnM6/eM62hCzRvm6Lom+YZlg5f7OHBz74vUEVsPylwKJ39EFCUPX76KfA/ reGgyTHXqdO38HtZE4lyYfIvBkl0vxuNInlwoEEX1sDrfs30SZf6bPjN69SHJfmgcjPl UZUHuFuyAqOYjrmW8kNblaDxEtppFBuzb9IC6Y/XuggtXk7CF2R4NH30m4lV7OOWgX7n DZFA== X-Gm-Message-State: AJcUukclMfchK/u9E+sa72RLd840zX/TWZzKQ3tHs39TKzY1w1XBFYfG PjFCUq86d20yGBXIrOx74jo= X-Received: by 2002:a62:1484:: with SMTP id 126mr23660899pfu.257.1548721528966; Mon, 28 Jan 2019 16:25:28 -0800 (PST) Received: from dtor-ws ([2620:15c:202:201:3adc:b08c:7acc:b325]) by smtp.gmail.com with ESMTPSA id m9sm75473244pgd.32.2019.01.28.16.25.27 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 28 Jan 2019 16:25:28 -0800 (PST) Date: Mon, 28 Jan 2019 16:25:26 -0800 From: Dmitry Torokhov To: Richard Leitner Cc: mark.rutland@arm.com, robh+dt@kernel.org, linux-input@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [RESEND PATCH v2 7/8] Input: sx8654 - use common of_touchscreen functions Message-ID: <20190129002526.GI34692@dtor-ws> References: <20181218083606.25795-1-richard.leitner@skidata.com> <20181218083946.13823-1-richard.leitner@skidata.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181218083946.13823-1-richard.leitner@skidata.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Dec 18, 2018 at 09:39:46AM +0100, Richard Leitner wrote: > of_touchscreen.c provides a common interface for a axis invertion and > swapping of touchscreens. Therefore use it in the sx8654 driver. > > Signed-off-by: Richard Leitner Applied, thank you. > --- > drivers/input/touchscreen/sx8654.c | 11 +++++++---- > 1 file changed, 7 insertions(+), 4 deletions(-) > > diff --git a/drivers/input/touchscreen/sx8654.c b/drivers/input/touchscreen/sx8654.c > index 4939863efbef..b7b263ed52af 100644 > --- a/drivers/input/touchscreen/sx8654.c > +++ b/drivers/input/touchscreen/sx8654.c > @@ -35,6 +35,7 @@ > #include > #include > #include > +#include > > /* register addresses */ > #define I2C_REG_TOUCH0 0x00 > @@ -101,6 +102,7 @@ struct sx8654 { > > spinlock_t lock; /* for input reporting from irq/timer */ > struct timer_list timer; > + struct touchscreen_properties props; > > const struct sx865x_data *data; > }; > @@ -178,8 +180,7 @@ static irqreturn_t sx8650_irq(int irq, void *handle) > chdata); > } > > - input_report_abs(ts->input, ABS_X, x); > - input_report_abs(ts->input, ABS_Y, y); > + touchscreen_report_pos(ts->input, &ts->props, x, y, false); > input_report_key(ts->input, BTN_TOUCH, 1); > input_sync(ts->input); > dev_dbg(dev, "point(%4d,%4d)\n", x, y); > @@ -226,8 +227,8 @@ static irqreturn_t sx8654_irq(int irq, void *handle) > x = ((data[0] & 0xf) << 8) | (data[1]); > y = ((data[2] & 0xf) << 8) | (data[3]); > > - input_report_abs(sx8654->input, ABS_X, x); > - input_report_abs(sx8654->input, ABS_Y, y); > + touchscreen_report_pos(sx8654->input, &sx8654->props, x, y, > + false); > input_report_key(sx8654->input, BTN_TOUCH, 1); > input_sync(sx8654->input); > > @@ -377,6 +378,8 @@ static int sx8654_probe(struct i2c_client *client, > input_set_abs_params(input, ABS_X, 0, MAX_12BIT, 0, 0); > input_set_abs_params(input, ABS_Y, 0, MAX_12BIT, 0, 0); > > + touchscreen_parse_properties(input, false, &sx8654->props); > + > sx8654->client = client; > sx8654->input = input; > > -- > 2.11.0 > -- Dmitry