Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp980407pxb; Fri, 15 Apr 2022 17:17:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzebmnxkgvUSaAuCT+qF3WipuVPz1MtVRHfuxYOgqwYXYPFb8TwzOm+iqD9MAgCem/rPo5F X-Received: by 2002:a17:90b:3149:b0:1c7:5aea:c800 with SMTP id ip9-20020a17090b314900b001c75aeac800mr1375613pjb.237.1650068238476; Fri, 15 Apr 2022 17:17:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650068238; cv=none; d=google.com; s=arc-20160816; b=KVvBPlO6RoyxGtgvDtD3vvN4y4lTsEgvDXqW/4fzFxDSi+w/7sU29mno1hNfC4ISwL VYdK4hfazI313ICoqUeFjjQd3pHaY4JAbUKwqvtIxTbQpuPQtq2RF4njBS1WqIha+C9y YzvC9j5u88nAO2UpJ5sjGas/hlNnImyVjuH3zenCNQZdx2C4gRWzDUNpAkHEPvdjUZ4L erwyaxmoqRUSZS3k4/uKTYqF5TnOOTwC/w/SDV+Fu3SGo/n5+VTqWS1vxZlLqKMoOJsO mayVvsCvoBmd2rY2cjy6R7xcwOBhTAG3GQVzBSTF2LounMQDxtph7Hg/4gv8PiORTiTC EWTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:dkim-signature; bh=FfSoG7Td6Wp+hFUw88AieR0tVnt6wZxfF+2zMZy9eaA=; b=FXv7ALnTc3i92FlreHl9VBG9LWJVjrQBlOYMYrK1Z6Po5x7FMeFIGevpf042vF6R12 yg94vLqXDa3GpgHxR5xn/ctHCHabc8qgGZAY/Thj+PTyWzKJ/Zxl1d/cSNAf+J9VN0Gr 93xW1ZcPE/0rOhNFRjznz7zypSlweTSs66zTK54hLvOAUX9TYakVfNJc9LLLb6uWZxgY n7R5juTf6nVNyksliwJxIYS274KKUOsZRR15U7/kL6KrfZSkYB1zy25LITer/6JocwVg 4C+ig4/VDJWsPfhPntaGCrkE/H37EumpgQ98zNSO2lEK06C0JA9QNlaS01+Zgx2rR4w9 Mcgg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20210112.gappssmtp.com header.s=20210112 header.b=u1dsiSU8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id g8-20020a636b08000000b00398d40dfc06si2735783pgc.482.2022.04.15.17.17.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Apr 2022 17:17:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20210112.gappssmtp.com header.s=20210112 header.b=u1dsiSU8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 08977CB004; Fri, 15 Apr 2022 17:17:00 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238425AbiDNRXF (ORCPT + 99 others); Thu, 14 Apr 2022 13:23:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50796 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238700AbiDNRW3 (ORCPT ); Thu, 14 Apr 2022 13:22:29 -0400 Received: from mail-pf1-x42e.google.com (mail-pf1-x42e.google.com [IPv6:2607:f8b0:4864:20::42e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 54BB93DA5E for ; Thu, 14 Apr 2022 10:20:03 -0700 (PDT) Received: by mail-pf1-x42e.google.com with SMTP id bo5so5444911pfb.4 for ; Thu, 14 Apr 2022 10:20:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=FfSoG7Td6Wp+hFUw88AieR0tVnt6wZxfF+2zMZy9eaA=; b=u1dsiSU8Oc8b8MGmKSXynmmw14Fwb78ccQEfVYdGz2ligTny5q/N6pnA6Ebe28h6Qg 9rGnEHQNiSaC61xxeIRqzttu6T5MKhxMX6EGXNDv0bHalHqIas60PEfUt06tX9DHEfOH V0wRk2ynFkERT2/lHsbehTn5wPHw1thtrieHyN90V8JxpzH5OVYM+zdlH3OWT9Wt27nt ptAEJxf0UJYKz8qackmb4vXAapzFRg+BMddZw6pyUOxEtELf4A72XfikvVE1zRTnlRkr LfIPUAVJId1kbo7Nrwzic79JTC5bcC8GIxFkxARqw/kkK3YY7mPDEw5RhVBo5f0LH3IC zGyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=FfSoG7Td6Wp+hFUw88AieR0tVnt6wZxfF+2zMZy9eaA=; b=0eLtX9QOajcZygL4PqLHw83zepDqnJxGIUPX0598n/jC2+A82M19xN6IVXjHtD3Wq8 gGY+2nTieZ4FJ013wNey2hg+sYEXvKqzJpQqhNxxy+GcOAd16s4pUs9l+JKmTgCpYFV6 ONe54hjqUcoq8fCnse6kTjNWLUPFsAvkUIVyA1Lk5R85P0WmWZZRc7hXzY8pMxb81Jfu aVPzqHpblCD8PDdpKN/PcF/vBOYVbi/nJ5+WDXmY86h4sjocYwNUDP5iBSDE7LdE/Wng +xmJvNkoVSJOoxT68ZiZvBYd4g5MD1SS0M26MD7w48Uv1SugH/ZaQkCYrKDBnvTED22y MTYg== X-Gm-Message-State: AOAM5331M61SZ4CA2XoNE4Wp/5MZewB/KoyCICs5wBZzOInm1Nrs4bR/ IAojduhwwJ7sU5HSLqMt2wx4Wg== X-Received: by 2002:a65:5ac2:0:b0:399:dea:cd1f with SMTP id d2-20020a655ac2000000b003990deacd1fmr3117689pgt.80.1649956802674; Thu, 14 Apr 2022 10:20:02 -0700 (PDT) Received: from localhost (c-71-197-186-152.hsd1.wa.comcast.net. [71.197.186.152]) by smtp.gmail.com with ESMTPSA id p8-20020aa78608000000b005082c3cbfd2sm421053pfn.218.2022.04.14.10.20.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Apr 2022 10:20:02 -0700 (PDT) From: Kevin Hilman To: Rex-BC Chen , rafael@kernel.org, viresh.kumar@linaro.org, robh+dt@kernel.org, krzk+dt@kernel.org Cc: matthias.bgg@gmail.com, jia-wei.chang@mediatek.com, roger.lu@mediatek.com, hsinyi@google.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 Subject: Re: [PATCH V2 10/15] cpufreq: mediatek: Make sram regulator optional In-Reply-To: References: <20220408045908.21671-1-rex-bc.chen@mediatek.com> <20220408045908.21671-11-rex-bc.chen@mediatek.com> <7ho81b5n9v.fsf@baylibre.com> Date: Thu, 14 Apr 2022 10:20:01 -0700 Message-ID: <7hfsmf37lq.fsf@baylibre.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Rex-BC Chen writes: > On Fri, 2022-04-08 at 13:32 -0700, Kevin Hilman wrote: >> Rex-BC Chen writes: >> >> > From: Jia-Wei Chang >> > >> > For some MediaTek SoCs, like MT8186, it's possible that the sram >> > regulator >> > is shared between CPU and CCI. >> > >> > Signed-off-by: Jia-Wei Chang >> >> nit: missing your sign-off. >> >> > --- >> > drivers/cpufreq/mediatek-cpufreq.c | 2 +- >> > 1 file changed, 1 insertion(+), 1 deletion(-) >> > >> > diff --git a/drivers/cpufreq/mediatek-cpufreq.c >> > b/drivers/cpufreq/mediatek-cpufreq.c >> > index 9e9bce0ff235..8f688d47e64b 100644 >> > --- a/drivers/cpufreq/mediatek-cpufreq.c >> > +++ b/drivers/cpufreq/mediatek-cpufreq.c >> > @@ -435,7 +435,7 @@ static int mtk_cpu_dvfs_info_init(struct >> > mtk_cpu_dvfs_info *info, int cpu) >> > } >> > >> > /* Both presence and absence of sram regulator are valid cases. >> > */ >> > - info->sram_reg = regulator_get_exclusive(cpu_dev, "sram"); >> > + info->sram_reg = regulator_get_optional(cpu_dev, "sram"); >> >> The changelog says that this regulator may be shared with CCI, so I >> understand it's no longer exclusive. But here you make it optional, >> which should be explained in the changelog. If it's not actually >> optional, then it should just be normal "get". >> >> Kevin > > Hello Kevin, > > Since cpufreq and cci devfreq might share the same sram regulator in > MediaTek SoC, it is no longer exclusive as you mentioned. > > The reason to use regulator_get_optional is we hope regulator framework > can return error for error handling rather than a dummy handler from > regulator_get api. > > I will add this to commit message in next version. OK, sounds good. Thanks, Kevin