From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DB2B5C352BE for ; Fri, 17 Apr 2020 11:10:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C26C021D95 for ; Fri, 17 Apr 2020 11:10:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729962AbgDQLKW (ORCPT ); Fri, 17 Apr 2020 07:10:22 -0400 Received: from foss.arm.com ([217.140.110.172]:49968 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729468AbgDQLKW (ORCPT ); Fri, 17 Apr 2020 07:10:22 -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 8616DC14; Fri, 17 Apr 2020 04:10:21 -0700 (PDT) Received: from [10.57.59.184] (unknown [10.57.59.184]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id CB3DC3F6C4; Fri, 17 Apr 2020 04:10:19 -0700 (PDT) Subject: Re: Multiple regulators for one device [was drm/panfrost: add devfreq regulator support] To: Steven Price , =?UTF-8?B?Q2zDqW1lbnQgUMOpcm9u?= , Mark Brown Cc: Nishanth Menon , Tomeu Vizoso , Stephen Boyd , Viresh Kumar , Liam Girdwood , dri-devel , linux-kernel , Alyssa Rosenzweig References: <20200411200632.4045-1-peron.clem@gmail.com> <20200411200632.4045-2-peron.clem@gmail.com> <000f26f4-3640-797f-c7f6-4b31a5e2669e@arm.com> <20200414185523.GO5412@sirena.org.uk> <5e15e7ac-1d9c-d614-8fd9-27525c88cafb@arm.com> From: Robin Murphy Message-ID: <5290a7a8-2a0a-cb89-9d62-270393123054@arm.com> Date: Fri, 17 Apr 2020 12:10:18 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <5e15e7ac-1d9c-d614-8fd9-27525c88cafb@arm.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020-04-16 2:42 pm, Steven Price wrote: [...] > Perhaps a better approach would be for Panfrost to hand over the struct > regulator objects it has already got to the OPP framework. I.e. open > code dev_pm_opp_set_regulators(), but instead of calling > regulator_get_optional() simply populate the regulators we already have? > > The other benefit of that is it would provide a clear hand-over of > responsibility between Panfrost handling it's own regulators and the OPP > framework picking up the work. The disadvantage is that Panfrost would > have to track whether the regulators have been handed over or not. Sounds like the most logical thing to do is to shuffle things around so we start by trying to set up an OPP table, then fall back to explicitly claiming clocks and regulators if necessary. Then we can easily make the devfreq decision later in probe based on how that turned out. Robin.