Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp3091774pxu; Mon, 19 Oct 2020 03:51:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy/pelRlgcVr2ZjYbD+nxn9SqvfqmLQ3JJBmRe8yj7eBl5LWDVD3dV9HOCMEmotTg5EqUaQ X-Received: by 2002:a05:6402:1615:: with SMTP id f21mr18188919edv.257.1603104709806; Mon, 19 Oct 2020 03:51:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603104709; cv=none; d=google.com; s=arc-20160816; b=Xhqf15RBm8BUfWLO8zMwZzSBDYoDsM+I7ykzSF+3irDuZ6pa2CmREnsNXDrFB8SJcj X5BnjpkNHFFt4YmFE6JpW3PD8QcwordeTJaJH1Aauz5E6OVhTupYMFaMcYu9O3rGPhNX WOWl08D7cyk7SFRsxHand8bYjTYzVle9/854rl5aNbCtqeYIuTEQ9Au6V3SpehyoVr69 i7codWcBMrDRW/MYGjKivJLix7GnVAJ5ZMQlmt8MAZ98yvYZeQaxglecdiLBN/gGEiiK 7BRh32XIM6aXtTQY8xTIVc/sEEar5SZPKCLTLiGCONfEKegkeJ4URm6LkKzrYxZUKS1b e3LA== 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; bh=1hpHaTDDkZC3M/2HO3Ztfjg3M6wS6cDmpCepA8ouZU0=; b=XHCqLFYwtgN669ON0pbsF1taBiACqXmLimOR8G8mnS3pUwNDpFrAPuk5cp5g1R4knr Qjv/joLkvP6oWXwuagxPm3obC10fNI+lq3moGGEFNHVlLyghBSzhZkDkwQZee1IBQhUZ TtKe7+ClTD3zLKlgZFb9sOn0ALaMTOnFCC4NOlm7ibyRjT7kCnyHngjGE5EeE0rqByGQ D6wyBN+gd+NkOO846/LF1gJHqUJ4kHD+yIY88VI/tr1HzXUNC0AhSuNv1RN1srXE21aP 9F5P88rkdQspWUXeBmSLF1H6zF1CcOtNEgZjPWy+jE9cRedzLNnp6P/RjdNd+1yi7dDR vDzA== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a24si7480446edt.297.2020.10.19.03.51.27; Mon, 19 Oct 2020 03:51:49 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730143AbgJSJRy (ORCPT + 99 others); Mon, 19 Oct 2020 05:17:54 -0400 Received: from foss.arm.com ([217.140.110.172]:53092 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729941AbgJSJRy (ORCPT ); Mon, 19 Oct 2020 05:17:54 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 6174A30E; Mon, 19 Oct 2020 02:17:53 -0700 (PDT) Received: from bogus (unknown [10.57.13.246]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 7EA003F66E; Mon, 19 Oct 2020 02:17:50 -0700 (PDT) Date: Mon, 19 Oct 2020 10:17:48 +0100 From: Sudeep Holla To: Viresh Kumar Cc: ulf.hansson@linaro.org, "Rafael J. Wysocki" , Kevin Hilman , Pavel Machek , Len Brown , Sudeep Holla , 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: <20201019091723.GA12087@bogus> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201019045827.kl6qnx6gidhzjkrs@vireshk-i7> User-Agent: Mutt/1.9.4 (2018-02-28) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. -- Regards, Sudeep