Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp1322784pxb; Fri, 27 Aug 2021 06:28:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwSPXiAi3AMxmnnGiL+c3R+SNqvVgmrB0kdznXtw83UpkI1JyZgr3F5KfacXNJECWcrKOfM X-Received: by 2002:a05:6402:35d2:: with SMTP id z18mr9727081edc.92.1630070899981; Fri, 27 Aug 2021 06:28:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630070899; cv=none; d=google.com; s=arc-20160816; b=dcCa2y+AbpLN9s37Pv7PDmjr2ODJJRoF+EN+r6ZS0LI9AIbFpmH3GJiwRr6JIjj9dG yx3kPvG35YJjU8aNW3MiiX8427I9l/BfEOiqlm4QYdsnAe+LV5u8y760pgnLri1V2Lwd 3hinbsWu4Yqu9/Nm9Y35r5ujXQbQZvtmb7Ywsypo5LH58yn/7Cw5Ya6mZ+c7ARpX9VTP zfavekSMesKmCpeppYoLXB9sH8L9R4Fo1yxlkSLEmXQXQyWgQLQ4hW4/Dfbz2qgM7UWJ PTGPMDMVQNaqaWNQe5PPnS/srszER+e+zF5Nup28McLrHnSjTPyomSEnfVn0GLQhL9UI lMhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=vVEdAtwasWkrT0f0vOq5zJOkTWOPwPdpExa1I7BhZtc=; b=rr24JhIzdBC/npiEbaDVsTjbNLOvAoDBuoiGQGBb4RmPgrayA6qmpbeY2GHBb+Mx/4 W7s4ORssN5STMS0yUzIKrNpzxZFE3s4oYqv/8AT8OefXiq5Y5OJmvRYlZMyORk6Y2WbR T7ETiQhcALvvgko8kFWMMNpLFWBsWolX55PMAIMU+O4ySzhy+oWwiI6FO1FB5T1+WiUc lmHVMxQ5nZkhf+XC/JzEC3/vESV33/k8+9wsUVXUa71m84GVf1IPUcCEpE7HcnPqs4aM 5Z8mxzzkBBlZIoBhRLimJUmgKjsjMOyYcnTmNtleApekqQ6+3MRgHhpEc85sAlsUq34a Gt7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=lFI32R63; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w2si6929598edi.202.2021.08.27.06.27.56; Fri, 27 Aug 2021 06:28:19 -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; dkim=pass header.i=@linaro.org header.s=google header.b=lFI32R63; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245172AbhH0NYi (ORCPT + 99 others); Fri, 27 Aug 2021 09:24:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33816 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245129AbhH0NYh (ORCPT ); Fri, 27 Aug 2021 09:24:37 -0400 Received: from mail-lf1-x12e.google.com (mail-lf1-x12e.google.com [IPv6:2a00:1450:4864:20::12e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 77C9EC0613CF for ; Fri, 27 Aug 2021 06:23:48 -0700 (PDT) Received: by mail-lf1-x12e.google.com with SMTP id k5so14390574lfu.4 for ; Fri, 27 Aug 2021 06:23:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=vVEdAtwasWkrT0f0vOq5zJOkTWOPwPdpExa1I7BhZtc=; b=lFI32R63zrucrYnkIqq6iE3qq5EeU910b9somn/1eHEmLa7lyPBVXEXSvUVfHZXljx TN6C7dFaRvGcV7OMzmM2Z702UqA21+p6LGiil3JBftn6N+xI5cU3ZZKXnuDMakUW+3aS 2JJPsdBHzh/GUX+dBrwrAKurlt2KMRM3E29qSJusmZRW6Gkawk70f92avYnixl5DMoY0 iRfhpFxvyjlDDWVaZC/SZpaBr+oTpnlorA3vhS0oFOUOseXOqeLPa/ulN1BaOmExMsz4 lKUa8NlGjOIXU4SMK755TODSTf/PrplBh65Z7qev6Iz8YtvnlSlcHUfQ1X8DX7x1gssR KGTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=vVEdAtwasWkrT0f0vOq5zJOkTWOPwPdpExa1I7BhZtc=; b=oGPMHK0Y/d12tMNzRSOt7QLeNxr/7mRint/XRQijg3ry6Gexz+NdVzAF39rB9S7zQ5 sze0Vgq49784ASoZjDBj78VDMg8/vkTvRWX/XVkbBS7P0pPcLAU6UuLCZAISfJ7vbgsF 4lePOoyMLtYbkP9rsJMX2gNkjNAQ84CJijrhSJsuzztle9Yxsq9rD8AaA5b2HW2TJr4H ULeZfIZK1O4h2LHSZLbNTZDA7zKrJXvh2hONVvlmOXY9kLlDJ5lONju1JrmMVZiWQ3Zv LhjDsYlLK/6U3mBC3ipDwRkVopwH5TNQ3PgwyhL9sWGKJg1C6OSvjQuqjE7jeEdsSdQO ymow== X-Gm-Message-State: AOAM530G9f9eOmICNXd5SOwzKNvTOMBDvtVS6G8PBtQgj0zr9L6kWIyf 8GUtl11RafjM04wNW76VWLPsH+wN4s/CKN7Zb3xeqQ== X-Received: by 2002:a19:655e:: with SMTP id c30mr6648013lfj.142.1630070626804; Fri, 27 Aug 2021 06:23:46 -0700 (PDT) MIME-Version: 1.0 References: <4fb42fa1b76b38c6628f056cfd804bb5b4e74d99.1629818532.git.geert+renesas@glider.be> In-Reply-To: <4fb42fa1b76b38c6628f056cfd804bb5b4e74d99.1629818532.git.geert+renesas@glider.be> From: Ulf Hansson Date: Fri, 27 Aug 2021 15:23:10 +0200 Message-ID: Subject: Re: [PATCH] PM: domains: Fix domain attach for CONFIG_PM_OPP=n To: Geert Uytterhoeven Cc: Rajendra Nayak , "Rafael J . Wysocki" , Kevin Hilman , Len Brown , Pavel Machek , Greg Kroah-Hartman , Linux PM , Linux-Renesas , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 24 Aug 2021 at 17:23, Geert Uytterhoeven wrote: > > 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 Reviewed-by: Ulf Hansson Kind regards Uffe > --- > 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 >