Received: by 10.192.165.156 with SMTP id m28csp908814imm; Wed, 11 Apr 2018 09:06:21 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/ddRucOWLDurI8yLciOgeJvTyHX6gTI9FRH2rUVtvJY0yGwo5Nmr6MwnuTl/OlV6f/sIUc X-Received: by 10.99.100.6 with SMTP id y6mr3892175pgb.254.1523462781192; Wed, 11 Apr 2018 09:06:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523462781; cv=none; d=google.com; s=arc-20160816; b=wHx/0klGSfaJlTZCwUCLqgmlj8OSFNGEfDeqro70Dnk/Tnhb1ioF+uJK2mGUz1NA7g HSvNsaHjSbZSmc4CvRBN1MYAUPMl35sQupc1IrL1zju5hqD0H3AQ98WVNiPQl2d5BaHA /2XmYOALoqJrroDh4zgguVBL40zc6nfHnRUnm11+APpw992pTo4RxyQBsWN6CYIkwLD0 4GCVGX2shLqZ9mVteojG6hg9L/fjMqFs2LPc5tRL/2lVNqJ0GxKONukY3fZIxOB3y28u VdYsFX2veDdJKIuAx56fmHSBqSDDa1yM5kVL1DP06opt0u0vttx8r3dqRNxmPT6qPWqm hLWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id :arc-authentication-results; bh=p1G4EbFwQct50PhEi4exD+EM3PW4ZAU6PB6b8IVwzpg=; b=K0VP6ip0onxYDQUReKWq282nrg6zvqaRIHL5jgK9nevf7biPVW55OPbApiSgEZ2x2T lkjegOdEKKZCn7Ul8c9nmnLABVEhdK/W6t8kEXi3qJvdnoweSBhqGCatrSpcgs6RSUlR 6izazgvDy9qeEGLWMKTbeQwOcJAoBchmOKJIG7B5cnVbIlWrLUL2KyQS8sM4mFxJpNWy Capu6bxB1jDgtoZeAlq6SfneHdmuUhQ0QZlr9BZrZW4N9zWZmwWIcU0bJjoLLSEnKWk8 ArgDrgLCnbtAtLcYrhAXRjQcKxWIGL+pnUQJWFcb7ZLApovq5A3Ve7FDOwFWhB1Y2C2q /nLA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c12-v6si1220430plo.216.2018.04.11.09.05.43; Wed, 11 Apr 2018 09:06:21 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753681AbeDKQBG (ORCPT + 99 others); Wed, 11 Apr 2018 12:01:06 -0400 Received: from smtprelay0042.hostedemail.com ([216.40.44.42]:49889 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752335AbeDKQBF (ORCPT ); Wed, 11 Apr 2018 12:01:05 -0400 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay07.hostedemail.com (Postfix) with ESMTP id A6B31181D3419; Wed, 11 Apr 2018 16:01:04 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::,RULES_HIT:41:355:379:541:599:800:960:988:989:1260:1277:1311:1313:1314:1345:1359:1437:1515:1516:1518:1534:1540:1593:1594:1711:1730:1747:1777:1792:2393:2559:2562:2828:3138:3139:3140:3141:3142:3352:3622:3865:3866:3867:3868:4321:5007:7576:10004:10400:10848:11026:11232:11473:11658:11914:12043:12438:12555:12740:12760:12895:13069:13311:13357:13439:14181:14659:14721:21080:21451:21627:30054:30091,0,RBL:47.151.150.235:@perches.com:.lbl8.mailshell.net-62.8.0.100 64.201.201.201,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:19,LUA_SUMMARY:none X-HE-Tag: goose81_436c11ed8d313 X-Filterd-Recvd-Size: 1773 Received: from XPS-9350.home (unknown [47.151.150.235]) (Authenticated sender: joe@perches.com) by omf07.hostedemail.com (Postfix) with ESMTPA; Wed, 11 Apr 2018 16:01:03 +0000 (UTC) Message-ID: <4690e30b3c4b97847123295f1994c6eafe4e0cbb.camel@perches.com> Subject: Re: [PATCH 2/2] input: touchscreen mc13xxx: Add mc34708 support From: Joe Perches To: Lukasz Majewski , Dmitry Torokhov Cc: linux-kernel@vger.kernel.org, linux-input@vger.kernel.org, Sascha Hauer Date: Wed, 11 Apr 2018 09:01:01 -0700 In-Reply-To: <20180411141340.30939-2-lukma@denx.de> References: <20180411141340.30939-1-lukma@denx.de> <20180411141340.30939-2-lukma@denx.de> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.28.0-4 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2018-04-11 at 16:13 +0200, Lukasz Majewski wrote: > From: Sascha Hauer > > The mc34708 has a different bit to enable pen detection. This > adds the driver data and devtype necessary to probe the device > and to distinguish between the mc13783 and the mc34708. style trivia: > diff --git a/drivers/input/touchscreen/mc13783_ts.c b/drivers/input/touchscreen/mc13783_ts.c [] > @@ -96,6 +135,10 @@ static void mc13783_ts_report_sample(struct mc13783_ts_priv *priv) > > cr0 = (cr0 + cr1) / 2; > > + if (priv->drvdata->type == MC13XXX_TYPE_MC34708) > + if (cr0 > 4080) > + cr0 = 0; For easy of reading, this multiple if block should either use braces around the first if like: if (foo) { if (bar) single_statement; } or be written if (foo && bar) single_statement; I generally prefer the latter style.