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: 9381189 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 1649860487 for ; Tue, 18 Oct 2016 02:19:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0591028DC0 for ; Tue, 18 Oct 2016 02:19:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EE16F28E34; Tue, 18 Oct 2016 02:19:40 +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=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 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.wl.linuxfoundation.org (Postfix) with ESMTPS id 843D628DC0 for ; Tue, 18 Oct 2016 02:19:40 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bwJyz-0006xh-9u; Tue, 18 Oct 2016 02:18:25 +0000 Received: from casper.infradead.org ([2001:770:15f::2]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bwJxU-0006At-7s for linux-arm-kernel@bombadil.infradead.org; Tue, 18 Oct 2016 02:16:52 +0000 Received: from mail-pf0-x230.google.com ([2607:f8b0:400e:c00::230]) by casper.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bwJeW-0003xR-2F for linux-arm-kernel@lists.infradead.org; Tue, 18 Oct 2016 01:57:17 +0000 Received: by mail-pf0-x230.google.com with SMTP id s8so85941893pfj.2 for ; Mon, 17 Oct 2016 18:56:54 -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=dY0/WCGUMSAa8MlKf9oZ5DgEhljDAGeiU9kL7GURSAG11BIqHVpzixGJaxuD5hrnZf c1sbtapA27J5t5Mt5cvTQ2SuMPr6R2avFVusM1x4utIP4sZ0w9QJUsCHfJRWkj0U/qUy JXoxxJCQhQkg8VaI46fUbQeSu9K2VzFS7RkdtGeuftHXjc3aQ9msqPpKVF9zNS+JzxY7 7blNI8Dk8nFG+ywOn007nLyN2qQsxrucc/e2tqIOa/c+kIgGejT5DERlSlL84cZ+N6wA E0bsQ2dn1oWBRyb5OAP9UT2/D6WYGKBJiIkbCaMesXjNWtJZ0u6xYa/c16Zgp5eGtb1L rjeA== X-Gm-Message-State: AA6/9RkFBIRJ6ts0BjkOPDmzsuv1RPkH/MdK5bW3jXaPrmzEjsnEMnXVspRbZOUp/HjTmn8n 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 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161018_025716_282190_A6D11F54 X-CRM114-Status: GOOD ( 13.41 ) 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: Felipe Balbi , Arnd Bergmann , Neil Armstrong , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Bjorn Andersson , Peter Chen , Greg Kroah-Hartman , Andy Gross , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.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);