Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp3536946pxu; Mon, 19 Oct 2020 14:49:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzOgVA73JoVYEvfgJd9kenxNHfq+JMquaSSXap39fVwMaJm2qAXhba5a+zchaEpHfOff4qH X-Received: by 2002:aa7:d690:: with SMTP id d16mr1911649edr.301.1603144196094; Mon, 19 Oct 2020 14:49:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603144196; cv=none; d=google.com; s=arc-20160816; b=w41Na/WCcyN96ofHkS9gg6jeeRfo8ORzFB9gsVP6qPcd/mTrtC5VopQbs8l0aQePVP PBI4BPuDhofpAni/M/U8sipfOHi5mCjHBe7pNnGIyMnVYoZa8tWlh+f+Bd6sIcGnAcam SdXzjK7gcilQIgiyMjqf5MT5eJ8iiVW9Jup+1M7jqcov3CojgCIciZ2FtYOj5p4NROHN Dp1GonH1waxBs6A64ywwNYNqZRQV7ZyeHObUTEFtCKhNZu3WuYxzKY2vH9APVtiFw7MM AH1euXA5K17rjPQcw6hDkoHY3iPVtV/OO8oURDPc5kBIjbrXKLe3qW7Tti08VIBEx803 4KoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=zDPrPOvZEKInNhwxCz6Kajh6JAVRQjyNuOBoRhsFWd0=; b=hGIApgEe68fzAEv8tBTUNrExd5QSzH6JrSFSpd0m93LX5AUxaUV0wLMqAWyaYMMlwg txFdnqW2t5BlBVOeHTkY6KsMnJWrvvcDu0ln8X+7uB9Q/jUI8A1qFOc8Kuh/3FmHUNeO EFUpqaurUDcRjOXQlQX0OUNzvAZhw8otAFpJfrKcctYlxIcSZAzENLR+6RmDS5q1re2V dU1hkXygZ0PU9jlUpRLs9AOHT+/H7QZJYN0uibh7GW8DAcgY4QZmCnUhQjUcukZJFWry di/xwRi1VAMcfsruBWY3z4/mPhnZNnhcuX7TA0dJqbdTykwJ3dmiodVT6qFIEK4LyXjF yCWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=y9O9ia6I; 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 h27si870764ejd.478.2020.10.19.14.49.34; Mon, 19 Oct 2020 14:49:56 -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=y9O9ia6I; 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 S1729935AbgJSJYR (ORCPT + 99 others); Mon, 19 Oct 2020 05:24:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50404 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726593AbgJSJYQ (ORCPT ); Mon, 19 Oct 2020 05:24:16 -0400 Received: from mail-pl1-x642.google.com (mail-pl1-x642.google.com [IPv6:2607:f8b0:4864:20::642]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 39358C0613CE for ; Mon, 19 Oct 2020 02:24:15 -0700 (PDT) Received: by mail-pl1-x642.google.com with SMTP id t4so2056989plq.13 for ; Mon, 19 Oct 2020 02:24:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=zDPrPOvZEKInNhwxCz6Kajh6JAVRQjyNuOBoRhsFWd0=; b=y9O9ia6I2iPQ99hdVJUQ2A0pW9t0LpBkLFxvcu/z5pJYAUGkH5R5sfnYmsE67S7e6l Dx8BUA8fqM/CLgvKo86Rx1heiv+QywLmP27iyfcPNSH4QHOL9U364HxyqdjqFDC67SJ1 0tfuMNuc/EbuKFlMacDoUfenokJ3tR8WOfcxgRZuAQmFbsjGIdFDY8UttIN5Ybsd7lBO 2PetuDNeDcKtsnifWV96diusXYxtEa77rcsQAwm8VquzsXbIwlQLUIGS+CNudVLF6cKi AHYaBG5TiuWJWNysketU4d+gYR2iQl1ebEtipdB5bfAMl+ChRTfuY5KcxhGdaEwnruPp +xxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=zDPrPOvZEKInNhwxCz6Kajh6JAVRQjyNuOBoRhsFWd0=; b=FChtPf4+SEx05YwfEkBCAjuV69u4OJxXnRyooABrX76W9cBKJAiNUl3qb49B8l0Kel alJjzX6EnhLz+rXDAy6QAi8CcEIn1Y0pFceHYmuCxGnEZT17ZkQf5vBgQ0vSMegAA/xS IYmmYYeswKdFWZf2Vyp0KgAFLQA6EEHiThW6qDE4T1Xxc1hzN/kruiR7bIz3lFlISfPr QoQiYrL1urab4P4hS4IKwUBKwAyRb2K/Bar54Hgi8rmUcQhXdMD3QGH/SuaFFKv/C2og LJ7LStWiAzduqFIIWDqOu6SIhIn87w6GcWhLqHHhPPMEn6w7wtg+UiIHRxQ2uMPaAvuz UiJw== X-Gm-Message-State: AOAM530RksVZzPMViBRRDqAQas4dHv8KRPCgyiKbPWHyhSMWMaRPOXHO MfLi5pPmeozoyYquqM/b/EiJBg== X-Received: by 2002:a17:90b:1541:: with SMTP id ig1mr17153160pjb.125.1603099454559; Mon, 19 Oct 2020 02:24:14 -0700 (PDT) Received: from localhost ([122.181.54.133]) by smtp.gmail.com with ESMTPSA id r19sm11087364pjo.23.2020.10.19.02.24.13 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 19 Oct 2020 02:24:13 -0700 (PDT) Date: Mon, 19 Oct 2020 14:54:11 +0530 From: Viresh Kumar To: Sudeep Holla Cc: ulf.hansson@linaro.org, "Rafael J. Wysocki" , Kevin Hilman , Pavel Machek , Len Brown , Greg Kroah-Hartman , Viresh Kumar , Nishanth Menon , Stephen Boyd , Kukjin Kim , Krzysztof Kozlowski , linux-pm@vger.kernel.org, Vincent Guittot , nks@flawful.org, georgi.djakov@linaro.org, Stephan Gerhold , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org Subject: Re: [PATCH V2 1/2] opp: Allow dev_pm_opp_get_opp_table() to return -EPROBE_DEFER Message-ID: <20201019092411.b3znjxebay3puq2j@vireshk-i7> References: <24ff92dd1b0ee1b802b45698520f2937418f8094.1598260050.git.viresh.kumar@linaro.org> <20201015180555.gacdzkofpibkdn2e@bogus> <20201016042434.org6ibdqsqbzcdww@vireshk-i7> <20201016060021.sotk72u4hioctg7o@bogus> <20201016111222.lvakbmjhlrocpogt@bogus> <20201019045827.kl6qnx6gidhzjkrs@vireshk-i7> <20201019091723.GA12087@bogus> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201019091723.GA12087@bogus> User-Agent: NeoMutt/20180716-391-311a52 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 19-10-20, 10:17, Sudeep Holla wrote: > On Mon, Oct 19, 2020 at 10:28:27AM +0530, Viresh Kumar wrote: > > On 16-10-20, 12:12, Sudeep Holla wrote: > > > On Fri, Oct 16, 2020 at 07:00:21AM +0100, Sudeep Holla wrote: > > > > On Fri, Oct 16, 2020 at 09:54:34AM +0530, Viresh Kumar wrote: > > > > > On 15-10-20, 19:05, Sudeep Holla wrote: > > > > > > OK, this breaks with SCMI which doesn't provide clocks but manage OPPs > > > > > > directly. Before this change clk_get(dev..) was allowed to fail and > > > > > > --EPROBE_DEFER was not an error. > > > > > > > > > > I think the change in itself is fine. We should be returning from > > > > > there if we get EPROBE_DEFER. The question is rather why are you > > > > > getting EPROBE_DEFER here ? > > > > > > > > > > > > > Ah OK, I didn't spend too much time, saw -EPROBE_DEFER, just reverted > > > > this patch and it worked. I need to check it in detail yet. > > > > > > > > > > You confused me earlier. As I said there will be no clock provider > > > registered for SCMI CPU/Dev DVFS. > > > opp_table->clk = clk_get(dev, NULL); > > > will always return -EPROBE_DEFER as there is no clock provider for dev. > > > But this change now propagates that error to caller of dev_pm_opp_add > > > which means we can't add opp to a device if there are no clock providers. > > > This breaks for DVFS which don't operate separately with clocks and > > > regulators. > > > > The CPUs DT node shouldn't have a clock property in such a case and I > > would expect an error instead of EPROBE_DEFER then. Isn't it ? > > Ideally yes, but for legacy reasons clocks property has been used for > providing OPP/DVFS handle too. While we can change and add new property > for that, it will still break old bindings. I am not sure I understood it all. So does your platform have the clock-names property or not for the CPUs ? And how will something break here ? -- viresh