Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp1474749rwb; Fri, 13 Jan 2023 12:51:50 -0800 (PST) X-Google-Smtp-Source: AMrXdXvacUZLn2+czby+x5PlTt6UA4F+vDUsu75tweWX283zdqjoXqM15YEez5110T6VqW4IVssj X-Received: by 2002:a50:fe8f:0:b0:498:7102:f9c8 with SMTP id d15-20020a50fe8f000000b004987102f9c8mr19435320edt.10.1673643109937; Fri, 13 Jan 2023 12:51:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673643109; cv=none; d=google.com; s=arc-20160816; b=dfT42x8AB/nkaULFAD2PoTSc0RR0FrPJm4AP9KMjcS3otUoss8GAPg1pCGV8mMhujV Y0P7zjZiQ1vcA6XkZGuUxA71Q4mRkF4962ul557Tb3NOiOuX5FrVAEb76s057dzzSViO axECuYy6CeRY/C99ZXWq4q+xQlpmFknxiYLN8oma8YSX6h+yCLsgPDU0B4i4X2x0yClH YwA91yI3lmjwLU7CtMI2vR9Hesy+Aw6jo/BWfSvXhJPy02y+8I9qQmv8+qjCQFJhL6KL jMDGk5j+BdR4zGsjMO7Pt/XBG788Ip80av6eM3KRApGyqHwUuslp4OLn0jux6Fpq5CVi W+EQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=PobSF2/MDkJrX0shmq4Y9cOMyGXHMWsuX8BGemf4VBw=; b=v63JVVUJbl/EkAD/chTrVDxsmEpc1nb0RgjZWvAUzI4Ink2qyrJyQajyn0QsuSKzHw 69Ut8fHzvmEaGNnAkSAKZ7PCx5MKdPKMLn9vGftRWj01OuzTpyk+vMLrjywr4Cp7Z1i3 DY+8eeYF7nwQZZ9QTNSVoMatv9TiTiZYPcM/w4T0IAeoaBgF3tTDM/a+TxN6Nt+O/x2i nYVXRr0qM6vqxq+qUR8pvmiDcG90SIGlgYYbb2KdKcPFZIzC+H434Ecwo0XoPOtzAJ6U e27o86E5SB84VI9qen7DEV/cyzgLtN0GQX36FVTKvVBFaOL7KY5iR4YeawmD4Uffwk6R NfjA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Bk0IWpPe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ef8-20020a05640228c800b00486ac69b9f3si20687233edb.327.2023.01.13.12.51.36; Fri, 13 Jan 2023 12:51:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Bk0IWpPe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231261AbjAMUqA (ORCPT + 54 others); Fri, 13 Jan 2023 15:46:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59404 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230511AbjAMUpz (ORCPT ); Fri, 13 Jan 2023 15:45:55 -0500 Received: from mail-pl1-x62e.google.com (mail-pl1-x62e.google.com [IPv6:2607:f8b0:4864:20::62e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AFAE288A37 for ; Fri, 13 Jan 2023 12:45:53 -0800 (PST) Received: by mail-pl1-x62e.google.com with SMTP id c6so24619112pls.4 for ; Fri, 13 Jan 2023 12:45:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=PobSF2/MDkJrX0shmq4Y9cOMyGXHMWsuX8BGemf4VBw=; b=Bk0IWpPecl/O/TDwZ0QOdESqr6Zk5qYmXoE7OVj3ynKjewF1Rg1fDbPfzyFRa8K40U LJfzekoRATjBbgAaGvkiEYTL3P+XjjkE7mOLJvku9+zQHQugdRsZgyeYnGTohCTmT93o b4FfVO+qDuxe4DlkcKogEN727pajt14vxaH1I= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=PobSF2/MDkJrX0shmq4Y9cOMyGXHMWsuX8BGemf4VBw=; b=r8WPJY+xFwGlaTN0r7lUyTUjLR+00O9fMkpwLULyBGPiZn8XnkPWZ1VZNqYem572Ng vzxblkeKXIYRuyz95+JDnEuM5AKiFftCHOoGVyLO7TEKiLvTCEi88p0nN96hplETzK1x jQLkNec7fsGrrvSfAjFe0lIknWFNdimUUPxFZCeoZIq4jJp3NRIKJOE/iOz8+aaw1DIu F/9Sz08ZXmfQijh/KC8HFEpVEKd0N4t/0OYOVk6JJOiCbo0zCDPLur5AdpKpK2WYe8L1 wpcq8XmWMUVZEHxCxVbqq/eBn4e6boXZ7pniD3XRBk9hm9W8IBSqofZxpcGQ6oBHopVB d83w== X-Gm-Message-State: AFqh2koJapdTFrpQBvCQbfFT8HmYGDZjVgetvctX8m/jWo+Amdm0HgMp jbuDHnRyQUB8Ip0uWcuCtLHanw== X-Received: by 2002:a17:903:1355:b0:193:3a92:f4bd with SMTP id jl21-20020a170903135500b001933a92f4bdmr12657981plb.47.1673642753165; Fri, 13 Jan 2023 12:45:53 -0800 (PST) Received: from smtp.gmail.com ([2620:15c:11a:201:4652:3752:b9b7:29f9]) by smtp.gmail.com with ESMTPSA id f21-20020a170902e99500b001945b984341sm4010081plb.100.2023.01.13.12.45.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Jan 2023 12:45:52 -0800 (PST) From: Stephen Boyd To: stable@vger.kernel.org Cc: Johan Hovold , linux-kernel@vger.kernel.org, patches@lists.linux.dev, Dmitry Baryshkov , Vinod Koul Subject: [PATCH 5.15.y v2 1/5] phy: qcom-qmp-combo: disable runtime PM on unbind Date: Fri, 13 Jan 2023 12:45:44 -0800 Message-Id: <20230113204548.578798-2-swboyd@chromium.org> X-Mailer: git-send-email 2.39.0.314.g84b9a713c41-goog In-Reply-To: <20230113204548.578798-1-swboyd@chromium.org> References: <20230113204548.578798-1-swboyd@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Johan Hovold commit 4382d518d1887e62234560ea08a0203d11d28cc1 upstream. Make sure to disable runtime PM also on driver unbind. Fixes: ac0d239936bd ("phy: qcom-qmp: Add support for runtime PM"). Signed-off-by: Johan Hovold Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20220907110728.19092-2-johan+linaro@kernel.org Signed-off-by: Vinod Koul Signed-off-by: Stephen Boyd --- drivers/phy/qualcomm/phy-qcom-qmp.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/phy/qualcomm/phy-qcom-qmp.c b/drivers/phy/qualcomm/phy-qcom-qmp.c index a9687e040960..7b7557c35af6 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp.c @@ -5740,7 +5740,9 @@ static int qcom_qmp_phy_probe(struct platform_device *pdev) return -ENOMEM; pm_runtime_set_active(dev); - pm_runtime_enable(dev); + ret = devm_pm_runtime_enable(dev); + if (ret) + return ret; /* * Prevent runtime pm from being ON by default. Users can enable * it using power/control in sysfs. @@ -5790,13 +5792,10 @@ static int qcom_qmp_phy_probe(struct platform_device *pdev) phy_provider = devm_of_phy_provider_register(dev, of_phy_simple_xlate); if (!IS_ERR(phy_provider)) dev_info(dev, "Registered Qcom-QMP phy\n"); - else - pm_runtime_disable(dev); return PTR_ERR_OR_ZERO(phy_provider); err_node_put: - pm_runtime_disable(dev); of_node_put(child); return ret; } -- https://chromeos.dev