From patchwork Tue Oct 18 01:56:25 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Boyd X-Patchwork-Id: 9381095 X-Patchwork-Delegate: agross@codeaurora.org Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 25D7C6086B for ; Tue, 18 Oct 2016 02:00:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0E86728CB7 for ; Tue, 18 Oct 2016 02:00:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 027FB28CD7; Tue, 18 Oct 2016 02:00:16 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9A21A28CB7 for ; Tue, 18 Oct 2016 02:00:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964913AbcJRCAO (ORCPT ); Mon, 17 Oct 2016 22:00:14 -0400 Received: from mail-pf0-f173.google.com ([209.85.192.173]:35821 "EHLO mail-pf0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S936313AbcJRB4y (ORCPT ); Mon, 17 Oct 2016 21:56:54 -0400 Received: by mail-pf0-f173.google.com with SMTP id s8so85941894pfj.2 for ; Mon, 17 Oct 2016 18:56:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=vUj5l5p8TH4hBlSsewEa3N/TCFaiOrmX9AUM13NDuRA=; b=LU4wNzxAXc9ZhAT9jFFo4X/gWj8u5dNYEql2T7VEZ6nS4B9OedvNwfvoSaC3ZWcVnJ G+AgayKHD0LrONwGFM2UJi2Xfg4NbB7/JCKvjjhSsDTom7NCcGeHXgOvebXB46WbCL7h keKqFtjYqPLsQ8xj5F/EWL1HqTXmMigVmE5H0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=vUj5l5p8TH4hBlSsewEa3N/TCFaiOrmX9AUM13NDuRA=; b=c1wtB9hLvMrxRbEqQT+VXXBmxnBAP2E4z5TdEP4GOUctSM40yDaTuErrrJyBwt9xs9 OGwFyKXyQ+3Hq9kFUgolOfduumo6xWDZk92SNBg7dHXXB9+rs1t2qL5QbuVrSOOj8bJu hvRnQlAFO2D4rmJysSRxButJbPDEalJRySbJ/4dSXk9rUp+dB5P5z64OL9tXUpYrsc/a bIUc8l7uPuHDqnJ22FKlEBqBMBvGGvBA8i7SNpTvts1gb4w0HTWJidtyKGkeD4SF52zq +U57SxGT5M7eoNstyhdC2Ot/KGFw41yZ1HqG4CDDLDTCrexCBp9vEYM9VfJm71k2b5nv 2JGg== X-Gm-Message-State: AA6/9RmcewuWSLupNeWZNRokJC8Jg7m4SS+F0AcVrowkEhMhoEVrRfJfFhiQcuZCdTWNaR4g X-Received: by 10.98.37.198 with SMTP id l189mr676088pfl.39.1476755812488; Mon, 17 Oct 2016 18:56:52 -0700 (PDT) Received: from localhost.localdomain (i-global254.qualcomm.com. [199.106.103.254]) by smtp.gmail.com with ESMTPSA id j6sm51020430paa.44.2016.10.17.18.56.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 17 Oct 2016 18:56:52 -0700 (PDT) From: Stephen Boyd To: linux-usb@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, Andy Gross , Bjorn Andersson , Neil Armstrong , Arnd Bergmann , Felipe Balbi , Peter Chen , Greg Kroah-Hartman Subject: [PATCH v5 12/23] usb: chipidea: msm: Mark device as runtime pm active Date: Mon, 17 Oct 2016 18:56:25 -0700 Message-Id: <20161018015636.11701-13-stephen.boyd@linaro.org> X-Mailer: git-send-email 2.10.0.297.gf6727b0 In-Reply-To: <20161018015636.11701-1-stephen.boyd@linaro.org> References: <20161018015636.11701-1-stephen.boyd@linaro.org> Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP We're not properly marking the glue layer/wrapper device as runtime active, so runtime PM believes that the hardware state is inactive when we call pm_runtime_enable() in this driver. This causes a problem when the glue layer has a power domain associated with it, because runtime PM will go and disable the power domain to match the 'inactive' state of the device. Let's mark the device as active so that runtime PM doesn't improperly power down this device when it's actually active. Acked-by: Peter Chen Cc: Greg Kroah-Hartman Signed-off-by: Stephen Boyd --- drivers/usb/chipidea/ci_hdrc_msm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/chipidea/ci_hdrc_msm.c b/drivers/usb/chipidea/ci_hdrc_msm.c index 3889809fd0c4..89c1a02d69b5 100644 --- a/drivers/usb/chipidea/ci_hdrc_msm.c +++ b/drivers/usb/chipidea/ci_hdrc_msm.c @@ -80,6 +80,7 @@ static int ci_hdrc_msm_probe(struct platform_device *pdev) platform_set_drvdata(pdev, plat_ci); + pm_runtime_set_active(&pdev->dev); pm_runtime_no_callbacks(&pdev->dev); pm_runtime_enable(&pdev->dev);