Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3856147pxk; Tue, 8 Sep 2020 04:34:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy2p06b2JwnLdgxc8sXebkbpnRNtinSSdfuLo/5OTNtoLpQsf3CW9qhWtgAEhxdGqndhAmg X-Received: by 2002:a05:6402:6d6:: with SMTP id n22mr26104659edy.79.1599564865262; Tue, 08 Sep 2020 04:34:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599564865; cv=none; d=google.com; s=arc-20160816; b=Dcvt7fORF0A6hrQCAWUl95FpF1UK09eR0f9baBA4kRJkDuxixjydn8zRuv0a7nb838 AG6HBnLBEJh2Ogbh7TaXHRoLl/Xh67mE6USeiwPjCgUHvGUUCrVx7KUX6yIcefJeD2qZ tfrEB04RUN00ejB47/LwTuZAjdNYn18HtkMZSHlNy2//cZHX0o486DC8gnsouw9TGELO WbaEgPw9YiEn8ReCtaPnUVTbEliJcZkL2hdxfwgCIqPU2vlNl9oq2XJePPk4ckjyv2sb uLPDyZ6FpRanAfjbeLUoQNLmV0ZmWdfhkJz3P84mNW02knQm/+IYtlioqS9As9hoEoq9 sIaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=1ePZz+j1mC26EcXRnLkpEleJBzy12DWxPVVwiIwKyc0=; b=g6wrjFVqWQbfpcunmKGUDtNyPhKfL3xiFcFLak10yX6I9GPMS5fCqKV6j2t3sMKjPT qCo7t7iiN/H4dsJA+2ZNCX09N7Cxra8KCFR310jpuBWGFN2MpCydVmX/atqtO2fMK5qv WUOC870UXu1jXnr8/hnQi8nqz59yl3RTHzGHcfI0DNnvLvyV45WN59NCHq631z8ryYxh VGZAcp9Ovf+qfmzyqolIfk4M5wseY+FE8iYtwFe4pLQLhoGG9NOKURQjvYHS6GuUaVsS EY/PjNuomQCp3+uVPrfayLnZdyNLEoidql5QMLYlI7l1/GBCozzTtYacLuZFT5X19iR6 adGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="XDg4/Uku"; 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 c5si10386702edv.513.2020.09.08.04.34.01; Tue, 08 Sep 2020 04:34:25 -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="XDg4/Uku"; 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 S1729789AbgIHLcD (ORCPT + 99 others); Tue, 8 Sep 2020 07:32:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40594 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730054AbgIHL2i (ORCPT ); Tue, 8 Sep 2020 07:28:38 -0400 Received: from mail-pj1-x1041.google.com (mail-pj1-x1041.google.com [IPv6:2607:f8b0:4864:20::1041]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5B04BC061756 for ; Tue, 8 Sep 2020 04:28:38 -0700 (PDT) Received: by mail-pj1-x1041.google.com with SMTP id gf14so7874738pjb.5 for ; Tue, 08 Sep 2020 04:28:38 -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=1ePZz+j1mC26EcXRnLkpEleJBzy12DWxPVVwiIwKyc0=; b=XDg4/Uku5/VpdAi0ks3tspgOErVskD47V+JCTvPLbAaCnNjXbzfw0TTt400bpp1D+8 y21jfjFYMVXGxhgd7TBioi175NEgOo7AJ6a69HpCzcu76LJIlc1Vsr5hxOSLzn+xy60H iln98V6VsxN2apajg1j4pMGQ/UX2fbhvF4P6L52Ep4ngu5m791p+QVz8EvZJn8W6OoMA DE5FQMkIL/x8oo4+FHaOLz4iBTiyfFBZdXR5lIixDOoWhj6FpDmOsjGmSTL4dmn/2c8d fbrvXY6MH3aljUf/3nVdIYo4q7mRfdoPMEMhVrvAccPp6eNOHBUlPAbwSVK5u3yvjQsN iEFg== 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=1ePZz+j1mC26EcXRnLkpEleJBzy12DWxPVVwiIwKyc0=; b=tOlcQWRnLUZlqlzNxgbbKL2BOhEoy3gg2u+QNLTi8ymW93oJeKeAE58MfUVt4mXSZx vCarC/ZXFU95tUHrgiIzYLjS1b7wb5SDJOiZOiXOIByx+krysyfqkb+M6TAO2e/k1YHP h3GHke/PqFJmL9/qZ1AYKMps7A08W+zsmlIYCnuaP8qfH94741U5rXIJzs7KxONE/h15 ak//1QeT1IUOSh82kq/89nB/4JvxOzygzM/PygFx+gXCIUIlQBU+i0iswRNEMH9zwyLn 7aa9rSE/IVrmcYJWgXNBWK3V/jdoYdFLREQZin4qDiVXw20mBB2zRhzOefVe0WFDi+2A tTCg== X-Gm-Message-State: AOAM53037+M1jLNskkKxLY1eLVNzQCn/bzl0kFai/VoPvKpRvCJq7DWp lgs0YberVTQROPziMBv6io5D X-Received: by 2002:a17:90a:1fcc:: with SMTP id z12mr3490650pjz.106.1599564517585; Tue, 08 Sep 2020 04:28:37 -0700 (PDT) Received: from mani ([103.59.133.81]) by smtp.gmail.com with ESMTPSA id i8sm10685684pjv.43.2020.09.08.04.28.33 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 08 Sep 2020 04:28:36 -0700 (PDT) Date: Tue, 8 Sep 2020 16:58:28 +0530 From: Manivannan Sadhasivam To: Viresh Kumar Cc: rjw@rjwysocki.net, robh+dt@kernel.org, agross@kernel.org, bjorn.andersson@linaro.org, amitk@kernel.org, linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, dmitry.baryshkov@linaro.org, tdas@codeaurora.org Subject: Re: [PATCH 5/7] cpufreq: qcom-hw: Use regmap for accessing hardware registers Message-ID: <20200908112828.GA23812@mani> References: <20200908075716.30357-1-manivannan.sadhasivam@linaro.org> <20200908075716.30357-6-manivannan.sadhasivam@linaro.org> <20200908103444.5e526uawa45om6lt@vireshk-i7> <20200908111141.GB23095@mani> <20200908111813.bbgfxo5v7qt6ujpc@vireshk-i7> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200908111813.bbgfxo5v7qt6ujpc@vireshk-i7> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 0908, Viresh Kumar wrote: > On 08-09-20, 16:41, Manivannan Sadhasivam wrote: > > On 0908, Viresh Kumar wrote: > > > On 08-09-20, 13:27, Manivannan Sadhasivam wrote: > > > > Use regmap for accessing cpufreq registers in hardware. > > > > > > Why ? Please mention why a change is required in the log. > > > > > > > Only because it is recommended to use regmap for abstracting the hw access. > > Yes it can be very useful in abstracting the hw access in case of > busses like SPI/I2C, others, but in this case there is only one way of > doing it with the exact same registers. I am not sure it is worth it > here. FWIW, I have never played with regmaps personally, and so every > chance I can be wrong here. > > > Moreover it handles the proper locking for us in the core (spinlock vs mutex). > > What locking do you need here ? > I was just referring the case where if we need the locking in future, regmap handles it nicely in the core. > > I've seen many subsystem maintainers prefer regmap over plain readl/writel > > calls. I'll add the reason in commit log. > > I am not sure if it is worth it here. > Hmm, I thought it is recommended to use regmap for MMIO access as well. I can drop the patch if you want but let's wait for Bjorn/Amit to get their views. Thanks, Mani > -- > viresh