From patchwork Thu May 5 12:34:23 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 9024351 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 127A6BF29F for ; Thu, 5 May 2016 12:39:39 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 40077200E0 for ; Thu, 5 May 2016 12:39:38 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 02E0A203A4 for ; Thu, 5 May 2016 12:39:36 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ayIXf-0004hU-Ua; Thu, 05 May 2016 12:38:07 +0000 Received: from mailout4.w1.samsung.com ([210.118.77.14]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ayIV5-0000RQ-FQ for linux-arm-kernel@lists.infradead.org; Thu, 05 May 2016 12:35:28 +0000 Received: from eucpsbgm2.samsung.com (unknown [203.254.199.245]) by mailout4.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0O6P00MJEEYBU460@mailout4.w1.samsung.com> for linux-arm-kernel@lists.infradead.org; Thu, 05 May 2016 13:34:59 +0100 (BST) X-AuditID: cbfec7f5-f792a6d000001302-17-572b3df32f1c Received: from eusync4.samsung.com ( [203.254.199.214]) by eucpsbgm2.samsung.com (EUCPMTA) with SMTP id 59.41.04866.3FD3B275; Thu, 5 May 2016 13:34:59 +0100 (BST) Received: from AMDC2174.DIGITAL.local ([106.120.53.17]) by eusync4.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0O6P00KEEEXN8E00@eusync4.samsung.com>; Thu, 05 May 2016 13:34:58 +0100 (BST) From: Krzysztof Kozlowski To: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-mmc@vger.kernel.org, linux-pm@vger.kernel.org, linux-usb@vger.kernel.org, Ulf Hansson , Sebastian Reichel , Dmitry Eremin-Solenikov , David Woodhouse , Greg Kroah-Hartman , Mark Brown Subject: [RFC v2 10/13] usb: hub: Power sequence the ports on activation Date: Thu, 05 May 2016 14:34:23 +0200 Message-id: <1462451666-17945-11-git-send-email-k.kozlowski@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1462451666-17945-1-git-send-email-k.kozlowski@samsung.com> References: <1462451666-17945-1-git-send-email-k.kozlowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrPLMWRmVeSWpSXmKPExsVy+t/xa7qfbbXDDbYdZ7bYOGM9q8XUh0/Y LCY9ec9sMf/IOVaLiSsnM1s0L17PZnFq8jMmi9cvDC02Pb7GanF51xw2iyP/+xktPvceYbSY cX4fk8WiZa3MFmuP3GW3OL27xKJt9QdWi+Nrwx2EPHbOusvusXmFlsemVZ1sHneu7WHz2D93 DVBoSb3Hv2PsHn1bVjF6fN4k53Hq62f2AK4oLpuU1JzMstQifbsErow/i3vZC15yVJxZeIi9 gXERexcjB4eEgInErB+lXYycQKaYxIV769m6GLk4hASWMkq8WfKdFcJpZJJomn2bEaSKTcBY YvPyJWBVIgI3mCVe7ZzMDOIwC+xglPi77A4LSJWwgIfEs5nrwWwWAVWJVb+ngnXzAsXfrX3A ArFPTuLkscmsIDYnUPzsr/lgtpCAu8Sh39MZJzDyLmBkWMUomlqaXFCclJ5rpFecmFtcmpeu l5yfu4kREuxfdzAuPWZ1iFGAg1GJhzdjrla4EGtiWXFl7iFGCQ5mJRFeeWCsCPGmJFZWpRbl xxeV5qQWH2KU5mBREueduet9iJBAemJJanZqakFqEUyWiYNTqoHx+i3prfFHBFSttZUs5B0Y T11trlrrf4/NW23nv+VGrGU/Nr9dslrTak7BLOfQj8biRUU//Sq8DblvmCwxceiIuuseUyMa e/cKw/nYC7UnQ41rXl+vX3VrW2FOq0rFhi2tERN8t0dE7Dmw0OwldxXrJLHNny16rvcf5Kue 8eHR+iUbv4bvt7mlxFKckWioxVxUnAgAYD9M1HICAAA= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160505_053527_852194_5BFA434B X-CRM114-Status: GOOD ( 16.08 ) X-Spam-Score: -9.0 (---------) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: hverkuil@xs4all.nl, tjakobi@math.uni-bielefeld.de, Krzysztof Kozlowski , Bartlomiej Zolnierkiewicz , m.szyprowski@samsung.com MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-6.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The autodetection of attached USB device might not work on certain boards where the power is delivered externally. These devices also might require a hard reset. Use pwrseq for that in USB hub. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Javier Martinez Canillas --- drivers/usb/core/hub.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index 1c82fcc448f5..0fddaacc62bf 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include @@ -1661,7 +1662,17 @@ static int hub_configure(struct usb_hub *hub, usb_hub_adjust_deviceremovable(hdev, hub->descriptor); + /* FIXME: When do the pre-power-on? */ + /* + for (i = 0; i < maxchild; i++) + pwrseq_pre_power_on(hub->ports[i]->pwrseq); + */ + + for (i = 0; i < maxchild; i++) + pwrseq_post_power_on(hub->ports[i]->pwrseq); + hub_activate(hub, HUB_INIT); + return 0; fail: