Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp2826259pxb; Tue, 24 Aug 2021 08:28:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyl8fOHfX91+Wo0+h27XVQ/FBeEw3//DuBsenYH5otqgRjjRbquwqWr/tWg9AWRvdfdZEfh X-Received: by 2002:a17:906:eb53:: with SMTP id mc19mr41391031ejb.22.1629818900398; Tue, 24 Aug 2021 08:28:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629818900; cv=none; d=google.com; s=arc-20160816; b=mwtmbKhUNCqh3bOvZsw80/U2zNJLK+G42V+0QakfTbIO9N4RDSg7d92RfTew0Vl+k3 JIxzg3k1ToPwFsDnkThG9dg6FNnjzgZapgJ3Lpl4kosDOgO4XecGA9AVho3hivt7LZV0 ru9SvQ42tNOZjRg7Prl+26qKFxsAodiZvwKpD1XFLTy+ota0g6fOPObHNipJpohSsvFB WsqJp2pSTBO9nyKq+dXKlXhTbZsKRi/dowJAKWchH7ThiihZt6Xbkm2QJPHfIya5IISG XXn0SkpwvUPJxNO/vdr0PMwQhxmUW7ViF1h6Gpe3QSi36qrWi3FviTZgyocFJQjm0s1b 5cYA== 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 :message-id:date:subject:cc:to:from; bh=oj003OVWObAjqsDHzls6FGdvRpmmCr0WEos1FDhNodQ=; b=tnrIe4yJ+3YRDTtPo8ca7jwoUqjW3JWqcFdrjYcV81b42g3PmyzS0TuQ39D5/evFMJ fPt3QZcWo81ebeG07qwY89U4TlTC3fSZyB1r6B7VWvJIs+70dsvmdeedHFb0A3wqeCwe YJswO1uCJHawLn/KHMdorlvWqH5OqkDu6sk31vDywIHi7sbVW4XdIUi5UGmvdou/Px9f /UAfvJKHm/v4btQx+PXwu7+zRHd57dWhxSPc9HuZLeWN64mf4IZV9V8BpSZp0gSWbvLz T5v/9NZe6OcVXBdwpfcJSBmH75s52sDxkIm3UeYyTuvHLNS5PvzHV2BifUumbkLCzC4R sw0A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dp10si5699901ejc.562.2021.08.24.08.27.54; Tue, 24 Aug 2021 08:28:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238284AbhHXPYm (ORCPT + 99 others); Tue, 24 Aug 2021 11:24:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34186 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238299AbhHXPYi (ORCPT ); Tue, 24 Aug 2021 11:24:38 -0400 Received: from xavier.telenet-ops.be (xavier.telenet-ops.be [IPv6:2a02:1800:120:4::f00:14]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E8FE2C0617AD for ; Tue, 24 Aug 2021 08:23:52 -0700 (PDT) Received: from ramsan.of.borg ([IPv6:2a02:1810:ac12:ed20:fd1d:ce2:c16e:185a]) by xavier.telenet-ops.be with bizsmtp id lTPg2500C4wgRL101TPgjF; Tue, 24 Aug 2021 17:23:51 +0200 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1mIYH6-005TjI-5r; Tue, 24 Aug 2021 17:23:40 +0200 Received: from geert by rox.of.borg with local (Exim 4.93) (envelope-from ) id 1mIYH5-00D1YB-My; Tue, 24 Aug 2021 17:23:39 +0200 From: Geert Uytterhoeven To: Rajendra Nayak , "Rafael J . Wysocki" , Kevin Hilman , Ulf Hansson Cc: Len Brown , Pavel Machek , Greg Kroah-Hartman , linux-pm@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH] PM: domains: Fix domain attach for CONFIG_PM_OPP=n Date: Tue, 24 Aug 2021 17:23:38 +0200 Message-Id: <4fb42fa1b76b38c6628f056cfd804bb5b4e74d99.1629818532.git.geert+renesas@glider.be> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org If CONFIG_PM_OPP=n, of_get_required_opp_performance_state() always returns -EOPNOTSUPP, and all drivers for devices that are part of a PM Domain fail to probe with: failed to set required performance state for power-domain foo: -95 probe of bar failed with error -95 Fix this by treating -EOPNOTSUPP the same as -ENODEV. Fixes: c016baf7dc58e77a ("PM: domains: Add support for 'required-opps' to set default perf state") Signed-off-by: Geert Uytterhoeven --- drivers/base/power/domain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c index a10d740c4f2a1c28..7b197690e6442911 100644 --- a/drivers/base/power/domain.c +++ b/drivers/base/power/domain.c @@ -2760,7 +2760,7 @@ static int __genpd_dev_pm_attach(struct device *dev, struct device *base_dev, /* Set the default performance state */ pstate = of_get_required_opp_performance_state(dev->of_node, index); - if (pstate < 0 && pstate != -ENODEV) { + if (pstate < 0 && pstate != -ENODEV && pstate != -EOPNOTSUPP) { ret = pstate; goto err; } else if (pstate > 0) { -- 2.25.1