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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8B2CFC433EF for ; Mon, 25 Apr 2022 10:54:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To: Subject:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=WCo42S7Nhi4rnV4P/XMdM8hjIBBI+PtOyOLGItQ0Mgo=; b=s0qHcdVyaQ/EZo zLQgBzLiZRYVBeW8ZK6eJEZyPjFm8V3nxyuaRHN4SpiV3hDGxJBElqbxzokYUbYRDv1yPcHFz/B8B ovuuHgKSgp60y8vXfYWj247uHhtgRkIQmAj/HRPl2ZDzuZdcRDGI87pNrRBdxAzVNi8kC3Tf/rWI4 xXFU5VWbnTx/wnTKgPT/l3k48iJZ9qoijujH9we/dVpqfVYppnz58VBBCoXFqOOhZ06pI1+f5lqZ4 iSlcD03J5lDF5oTQoVObt1CpKixTS87rKDRhRFBbvpyTaUKhzOwQiIUsBXM2C2xaQmIz1DvBCufoI 39k7O2ELJ+BrXp1UUQRA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1niwL5-009Bvh-8O; Mon, 25 Apr 2022 10:53:07 +0000 Received: from mail-ed1-x535.google.com ([2a00:1450:4864:20::535]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1niwL0-009Btt-N5 for linux-arm-kernel@lists.infradead.org; Mon, 25 Apr 2022 10:53:04 +0000 Received: by mail-ed1-x535.google.com with SMTP id z19so4622589edx.9 for ; Mon, 25 Apr 2022 03:52:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=c0GtfBkRSHeFZTruOwJRlqy+Sejoq8V+8yuUoZ3jFBc=; b=CbbAqeWONmzWIiGLRvqkhXo3NhecQVj6nlqqLU92Lqr1pACc3YhhvLGZg1SouvWfQ+ 8sH0Gko7TaEwFe7nRdN6dyYPtVZCcL0ae9htgY8wdfKxMPswxpxdM9dhNNCzQGqzw3Z7 0k5CRiWMlYKJiH03+Nx/K4ew/zYPywhIPfaJcrmgMkryaUAF6ksXyn4Jc+7VGXBm+3+X jy2XsSb0qgG8wK+a7mEBgCBxyLrQSltcTgWZIlR8+9gqM6OCZuDjnB5RlYn476VRadCE YwKnLkl31yV+HJI8g4PJM4SC+3OFnZngS2XtfFEO88N0Va6VH3OS/As8cr0nY00axZ9z q5ZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=c0GtfBkRSHeFZTruOwJRlqy+Sejoq8V+8yuUoZ3jFBc=; b=KKY1qeZ+/l3YlZh+FInD3+EqoFKS+qaZ/Z6qBKgU2myi93oIwYEvfRHUHImQHwu/1V x9tCkYOWQllk6gbUsdSMFAFz3VyhPxuyu77shhBbP/RDnScu5ops7Cc6wBrbB/TX88dx Vv53zrrpTOfEHCuzKE2VlQgRza2/zPvDbdyr6juLySR1sfPAPN1EKQN77Go1awHpLe9+ wbjl5UYcsZOft9lpplF9Dy52dflG1sVZveUSDReX+luvouXKWFRtJSefelcocAJHKb1l zPj9sv9jykSVDcOUO+ANzGlo7lNqDzpjqrrJx9GpmXHAcgB1p04to1sU/WKWr8IaJjvd ba7A== X-Gm-Message-State: AOAM530Wk9uz7o1RsE2dLFvr34DNDykcPdLb8V1T75sZHlkA2UN5LCe4 XTD9r/8M7gMKCeQNe4nUWtU52w== X-Google-Smtp-Source: ABdhPJy0dgkTb52njNWz9LvzMjEGTgEAOOjcVV8QzWTIaTLpb3m5wGPLOarhcpcQDrQ3D+MMkn43tw== X-Received: by 2002:a05:6402:27d0:b0:41a:68bf:ff26 with SMTP id c16-20020a05640227d000b0041a68bfff26mr18293476ede.102.1650883976805; Mon, 25 Apr 2022 03:52:56 -0700 (PDT) Received: from [192.168.0.241] (xdsl-188-155-176-92.adslplus.ch. [188.155.176.92]) by smtp.gmail.com with ESMTPSA id w24-20020a50d798000000b00425eb9d893asm1016799edi.79.2022.04.25.03.52.55 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 25 Apr 2022 03:52:56 -0700 (PDT) Message-ID: <9ff80bc2-d63b-14aa-5769-20bff6e3a21e@linaro.org> Date: Mon, 25 Apr 2022 12:52:55 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: Re: [PATCH V4 01/14] dt-bindings: cpufreq: mediatek: Add MediaTek CCI property Content-Language: en-US To: Rex-BC Chen , rafael@kernel.org, viresh.kumar@linaro.org, robh+dt@kernel.org, krzk+dt@kernel.org, matthias.bgg@gmail.com Cc: jia-wei.chang@mediatek.com, roger.lu@mediatek.com, hsinyi@google.com, khilman@baylibre.com, angelogioacchino.delregno@collabora.com, linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, Project_Global_Chrome_Upstream_Group@mediatek.com References: <20220422075239.16437-1-rex-bc.chen@mediatek.com> <20220422075239.16437-2-rex-bc.chen@mediatek.com> <811bf944-a230-ab9b-583a-840e57af8a1e@linaro.org> <28f75ac2995b116af9b2accf760786d1d1798c93.camel@mediatek.com> <7873f0fa-25c3-191f-5096-3ceb9afd50cc@linaro.org> From: Krzysztof Kozlowski In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220425_035302_786952_11643FF7 X-CRM114-Status: GOOD ( 14.93 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 25/04/2022 12:20, Rex-BC Chen wrote: >> However I am not sure if you solved your problem... see below: >> >>> For example: >>> mediatek cci set 1.2V originally. When cpufreq want to adjust lower >>> frequency adn set voltage to 1.0V. >>> The framework will remain using 1.2V to prevent crash of mediatek >>> cci. >> >> No, regulator_set_voltage() for proc_reg says: >> "NOTE: If the regulator is shared between several devices then the >> lowest >> request voltage that meets the system constraints will be used." >> >> Not the highest. So when your devfreq and cpufreq boots, calling >> regulator_set_voltage will still cause high frequency and low >> voltage. >> > > From the driver comment, I think it still needs to match "meets the > system constraints". > > From drivers, we can trace the driver and it finally to > regulator_get_optimal_voltage(). > In [1], the framework will get max voltage while finding each device's > voltage. > > [1]: > https://elixir.bootlin.com/linux/latest/source/drivers/regulator/core.c#L3815 Right, actually in your case it's the regulator_check_consumers() above that line, because you I think it's quite generic problem, so would be worth solving for more regulator consumers, but your approach is fine. At least I do not have anything smarter, at the moment. Best regards, Krzysztof _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel