Received: by 10.223.185.116 with SMTP id b49csp6348961wrg; Wed, 28 Feb 2018 08:00:35 -0800 (PST) X-Google-Smtp-Source: AH8x2258v6ocyaECOyJRv6sDWfdSZ63EOJA9C9mZjjXJqk2hbBwW+HU23BtJylnn0lvd4Zq/5gzX X-Received: by 10.101.99.133 with SMTP id h5mr14191045pgv.381.1519833635374; Wed, 28 Feb 2018 08:00:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519833635; cv=none; d=google.com; s=arc-20160816; b=PK0P1uuWXdygIAqbZw6a83Lo64iNqTN/sQeADoxTI0ZIVaxfZB0ebYcDcZsXLi1yi5 seblGCwnfMRLJ65kL5x9ThSxDwVdc3cmia/2todwUVXZVNJY3N0imkjfTsRq45cyJ2Vm E0lZ8xHzWCB/0yGpHptKIBjKIgVbI7a1FzZggAlEguK3gTGFoRe+9G5ZB42SbYuLF+ep PzzpSr2rz3NVNXN/+svefRFLjlG+Kw2V1SAabTs8lhHy+uigVldL7Vfi/y6ADzSysGnM 3ddgLZmqFa7r4d8+ff/NdgtxIb9c0LZ+vwizU9qBLQyUhldzj0Ym6WOt7YawMLB7dmvm 0V5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:subject:message-id:date:cc:to :from:mime-version:content-transfer-encoding:content-disposition :arc-authentication-results; bh=rBrFZakFNaXQjFwRbN+sdDr8i9DUBVafgTjsmU6yd7o=; b=Fj2chgtSpoxl5VcMFMou4be0LnHVQiS1bhU7bw3QZ9pwANDpAiHNl77WutBnSkegVi 969TmQCSv2Zq3u824et929Qzxzf6IwbVBOgy3Yi056TRt+vzRSANZH68KYft1RowJHDX pogbXHo5/iYo53nx25uN+OcqEl9qdOS6YM0IGWQTWjVzeIeyd68jgu5JuYmLli5jUokA 9UlHQcTt+vdv375iaab4mrnuawv4zM4rESTnK8+MIDycPVzeN+4Od/vtRjeveep2ihpO yVn/Armb64zWyd2p10sE8S3nKxuvQSpMSwuauNFe5rWa91Ty6ei4amf2U93bM4ZlFOjr SEcQ== 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 68si1370271pff.141.2018.02.28.08.00.11; Wed, 28 Feb 2018 08:00:35 -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; 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 S934355AbeB1P7C (ORCPT + 99 others); Wed, 28 Feb 2018 10:59:02 -0500 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:34597 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934321AbeB1P67 (ORCPT ); Wed, 28 Feb 2018 10:58:59 -0500 Received: from [2a02:8011:400e:2:6f00:88c8:c921:d332] (helo=deadeye) by shadbolt.decadent.org.uk with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1er3Yq-0006Xc-2E; Wed, 28 Feb 2018 15:22:28 +0000 Received: from ben by deadeye with local (Exim 4.90_1) (envelope-from ) id 1er3Yj-0000G6-Qi; Wed, 28 Feb 2018 15:22:21 +0000 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 From: Ben Hutchings To: linux-kernel@vger.kernel.org, stable@vger.kernel.org CC: akpm@linux-foundation.org, "Stefan Agner" , "Greg Kroah-Hartman" Date: Wed, 28 Feb 2018 15:20:18 +0000 Message-ID: X-Mailer: LinuxStableQueue (scripts by bwh) Subject: [PATCH 3.16 203/254] usb: misc: usb3503: make sure reset is low for at least 100us In-Reply-To: X-SA-Exim-Connect-IP: 2a02:8011:400e:2:6f00:88c8:c921:d332 X-SA-Exim-Mail-From: ben@decadent.org.uk X-SA-Exim-Scanned: No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.16.55-rc1 review patch. If anyone has any objections, please let me know. ------------------ From: Stefan Agner commit b8626f1dc29d3eee444bfaa92146ec7b291ef41c upstream. When using a GPIO which is high by default, and initialize the driver in USB Hub mode, initialization fails with: [ 111.757794] usb3503 0-0008: SP_ILOCK failed (-5) The reason seems to be that the chip is not properly reset. Probe does initialize reset low, however some lines later the code already set it back high, which is not long enouth. Make sure reset is asserted for at least 100us by inserting a delay after initializing the reset pin during probe. Signed-off-by: Stefan Agner Signed-off-by: Greg Kroah-Hartman Signed-off-by: Ben Hutchings --- drivers/usb/misc/usb3503.c | 2 ++ 1 file changed, 2 insertions(+) --- a/drivers/usb/misc/usb3503.c +++ b/drivers/usb/misc/usb3503.c @@ -292,6 +292,8 @@ static int usb3503_probe(struct usb3503 if (gpio_is_valid(hub->gpio_reset)) { err = devm_gpio_request_one(dev, hub->gpio_reset, GPIOF_OUT_INIT_LOW, "usb3503 reset"); + /* Datasheet defines a hardware reset to be at least 100us */ + usleep_range(100, 10000); if (err) { dev_err(dev, "unable to request GPIO %d as reset pin (%d)\n",