Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp707678imm; Wed, 22 Aug 2018 11:09:44 -0700 (PDT) X-Google-Smtp-Source: AA+uWPzrFZuvMu3eef5dC1e8PzSFKxHa7YAvW0vne1BjqCqM5RXGmdVcY4O+cSO1NuGU7hwuIj37 X-Received: by 2002:a63:fe02:: with SMTP id p2-v6mr23188794pgh.148.1534961384415; Wed, 22 Aug 2018 11:09:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534961384; cv=none; d=google.com; s=arc-20160816; b=g7WiGx/gWiC6PwjRRw/1wzc6xNkLHJ+gL5WxD55tGBKOBdljx5STCAJbgzv7KQKIvs em/Yj8jEBmEef3mCgupjB7R4xx51J22iTLOpUtzwXxHL5MSKP9va+5pJmTidhN6aBDtG g3aJantaTPYAdb8ZfW1u487n31/pBrpusKbp7VYuQh56w/psbioduO/sD+PvDSDaR9jE lC84NrsRgOVdtJJEKbDfdfRZWQfoQ1t9K33FWvGk07HHUJZc58vK3VCt/mU08YUnpZiW GJ5bwMvR/39ZQj6ofMKLuQox5UcwfScuK4y8qhCOpVKFlQBGzcrgCyLNwhvxXW8s4Z72 0WTw== 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-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:date:from:dkim-signature :arc-authentication-results; bh=pHy+g1NFNSKciLi7LPwZcuLIkW0bx8y/4Sruevpf9Mg=; b=PHT57h6AQly7an9pkbIOsRrnKRJ842+WFH6ryoQF+0A4nbwMePhma/7LEILPH9i5CW jdyYJoUVlF0PCvTTWjXE1bsokizmNSlR/dqXMb7S87VxUwPwLinx+6riDXNgj/+tzOzp GK81qwpwYC4AepDZQhh/uPXrVdgaETMiJmTqDcDqLQRauFzgJl7iuiLjv9nbhgWhz2R5 GmUJI1tmyeA0tDDr4z0851Wz4r4ajlnqyeGTr6Yu9lgmUOSdHd6R+7teMZX8qdvObw5q UyA/veQ7OXhilmJ41TncbWQ4fxd8YZAKPsAnQMLougtgHtkeaaMhMNbBnwigL9aMJWIU bv6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=GtGlK1aG; 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 s3-v6si2233432plb.270.2018.08.22.11.09.28; Wed, 22 Aug 2018 11:09:44 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=GtGlK1aG; 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 S1727756AbeHVVeS (ORCPT + 99 others); Wed, 22 Aug 2018 17:34:18 -0400 Received: from mail-qt0-f195.google.com ([209.85.216.195]:34942 "EHLO mail-qt0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727466AbeHVVeS (ORCPT ); Wed, 22 Aug 2018 17:34:18 -0400 Received: by mail-qt0-f195.google.com with SMTP id f19-v6so1746197qtf.2; Wed, 22 Aug 2018 11:08:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:date:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=pHy+g1NFNSKciLi7LPwZcuLIkW0bx8y/4Sruevpf9Mg=; b=GtGlK1aGVoacdj2ORMfbG/fYlB9xc5eLXvjmXSt339lPoAHcyI1B/Q4H0g6eTmysEV I/Wo3J/gm2ST4NjIb0a9ctHZkcbUYueu5DJcDerLbCLg7s6wcEVCDJes0x9NDyeBB+4L ZrThf2uYUQaH8Gna2dzHLifTzGfFc29VpTHj9M30ATFDjwrcYRNrSuO8KOcveVjodjAi Hy3lmonGSmkO2pPkbjql26lHATYnweesLjggZU8RId4mZuzFZVuR5GGSlW5/WSJjzYhX MTWLhBEjmFk1waRQxLqLR4nCvm7FNdN4Xy+h6VVrz/2PoU95/FyB0EKOht/cY+4pYAjq RTEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=pHy+g1NFNSKciLi7LPwZcuLIkW0bx8y/4Sruevpf9Mg=; b=W0t1qWTYHZ650iaPknwn0xbcqLsDo4dfJl/mEpYa3HjVAp+fCii9RJmuSE2x/cXrSX 7Qyy8H8CJvsYeVWelHjCxlVjF0vqDmw4pQxcOzQPrJ2gFEwLxZ6Qb26Qv9LwXj4anOzo GjQg5B1BVl3T1seVqkTFTEq1FafzHJK0hwutGEtgICfqFsJ3unXuU7Vrde0q+rK7RmVD RlLLUZYyuXwgtmCVjd1OS9O4jNbijXHF7ThXwplfp3KQqjSlHB2RjAfuW06lEnuVPpE1 LSmwema7zk049R9ws/EAzVSWM53Z59DZGqGrmV88cHJ54Tpt83fozBffqJZYTzM4gZTs CwfQ== X-Gm-Message-State: AOUpUlHOoKe6dqCyNUWfcdjc/u7+/i6zrI2FcShIZGDlcj5uiygneHPh nE8kbVgual9hERVXJSzeEcg= X-Received: by 2002:a0c:f883:: with SMTP id u3-v6mr52167886qvn.28.1534961302880; Wed, 22 Aug 2018 11:08:22 -0700 (PDT) Received: from gandalf.middle.earth.net (pool-173-48-42-19.bstnma.fios.verizon.net. [173.48.42.19]) by smtp.gmail.com with ESMTPSA id r1-v6sm1438944qkl.85.2018.08.22.11.08.21 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 22 Aug 2018 11:08:22 -0700 (PDT) From: "George G. Davis" X-Google-Original-From: "George G. Davis" Date: Wed, 22 Aug 2018 14:08:20 -0400 To: =?utf-8?B?UGF3ZcWC?= Chmiel Cc: nick@shmanahar.org, mark.rutland@arm.com, devicetree@vger.kernel.org, alexandre.belloni@bootlin.com, dmitry.torokhov@gmail.com, linux-kernel@vger.kernel.org, robh+dt@kernel.org, linux-input@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v3 2/3] Input: atmel_mxt_ts: Wait for device be ready for communication Message-ID: <20180822180820.GB4102@gandalf.middle.earth.net> References: <1533050291-11502-1-git-send-email-pawel.mikolaj.chmiel@gmail.com> <1533050291-11502-3-git-send-email-pawel.mikolaj.chmiel@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1533050291-11502-3-git-send-email-pawel.mikolaj.chmiel@gmail.com> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Paweł, On Tue, Jul 31, 2018 at 05:18:10PM +0200, Paweł Chmiel wrote: > According to documentation, device isn't ready for communication, > until firmware asserts the CHG line. Add missing wait for this. > > Signed-off-by: Paweł Chmiel > --- > drivers/input/touchscreen/atmel_mxt_ts.c | 11 +++++++++++ > 1 file changed, 11 insertions(+) > > diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c > index 2cd7f6db6ba9..79e08916359f 100644 > --- a/drivers/input/touchscreen/atmel_mxt_ts.c > +++ b/drivers/input/touchscreen/atmel_mxt_ts.c > @@ -202,6 +202,7 @@ enum t100_type { > #define MXT_CRC_TIMEOUT 1000 /* msec */ > #define MXT_FW_RESET_TIME 3000 /* msec */ > #define MXT_FW_CHG_TIMEOUT 300 /* msec */ > +#define MXT_POWERON_DELAY 150 /* msec */ > > /* Command to unlock bootloader */ > #define MXT_UNLOCK_CMD_MSB 0xaa > @@ -3046,6 +3047,16 @@ static int mxt_regulator_enable(struct mxt_data *data) > msleep(MXT_REGULATOR_DELAY); > gpiod_set_value(data->reset_gpio, 1); > msleep(MXT_RESET_INVALID_CHG); > + > +retry_wait: > + reinit_completion(&data->bl_completion); > + data->in_bootloader = true; > + error = mxt_wait_for_completion(data, &data->bl_completion, > + MXT_POWERON_DELAY); Please fix the following checkpatch issues: drivers/input/touchscreen/atmel_mxt_ts.c:3078: WARNING:LONG_LINE: line over 80 characters drivers/input/touchscreen/atmel_mxt_ts.c:3078: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis Thanks! -- Regards, George > + if (error == -EINTR) > + goto retry_wait; > + > + data->in_bootloader = false; > } > > return 0; > -- > 2.7.4 > > > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel