Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp6503710pxu; Thu, 24 Dec 2020 04:16:41 -0800 (PST) X-Google-Smtp-Source: ABdhPJyQqYycIaAjpCjqVr6cZ/317TYdR3zlJYYoACzdB2eGO0Rru/dj7i7+mlQOp3MGfeNRwA9q X-Received: by 2002:aa7:c698:: with SMTP id n24mr28363558edq.277.1608812201574; Thu, 24 Dec 2020 04:16:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608812201; cv=none; d=google.com; s=arc-20160816; b=p5CfCnJyL7uZOYUHiDkNZmJpALOMF3J/ZhMnq7iFF/Bo5sb+W5RqjKQL0GJXFhKNBu YES6b0Ux7FtLIL+MCgTJW8NbNdURP5g+XSziqbbD9s9nilZGGMYeF/HDfj+5lUrS9dSR 7mswr5jynN0GJRkmIvcbkPF1SJSiaNtGASxoPqccLNz8m5GaVibyL5S6syfTmVGOFK1I bpUbuzENL4huWmok9+kLmGTs30jG2sWcixvCvUhkppC/eJ1Bu7GttwNKdHfM4OWGQyJG VNWMXBY2OzvBuBC4uA3A1Rb9nuwY7YXeuHwad1Mo7V4ZEUysQtiIzlfXkpfaItbwvT5a sh6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=8PDZgsN8e1S8iAJgIQWFmcr5fqcA+olCtue62G+IMw8=; b=kIvQblQKz1JL1Wn2DNbGOtWBttXthgOF8GtyogEKTqmanC5eoA+dlAbggTdVqlDQQp KagGyIjWkBA6Ib1R14Rsdj69AiWebu3BydVsD5RwTzwjInjNldA3NEgsC1DEVs+1ZDSj Sm8/dwgZeDtEMs4/8PzbKdtGdAq4Z+8jqyzWbUfU/6CAbhrTqBM0tJSSSXxbF52pAU9h n1k0OkIKGfhEQmB+BRH0Fupirhkg6jM/JWbEGg55t3G7udKJATcC/wbauiuWC1kLQpn6 eeIiMZReECH2MjdRFzDM6N2hxgpia1ZmFdXAw2SH+U4h3ogfqP1Tc1P2Z8nNitG1TrA/ LZ6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=TzwQmYoG; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ov28si12075313ejb.512.2020.12.24.04.16.19; Thu, 24 Dec 2020 04:16:41 -0800 (PST) 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=@gmail.com header.s=20161025 header.b=TzwQmYoG; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728607AbgLXMO4 (ORCPT + 99 others); Thu, 24 Dec 2020 07:14:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36790 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727114AbgLXMOz (ORCPT ); Thu, 24 Dec 2020 07:14:55 -0500 Received: from mail-lf1-x133.google.com (mail-lf1-x133.google.com [IPv6:2a00:1450:4864:20::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B0124C061794; Thu, 24 Dec 2020 04:14:14 -0800 (PST) Received: by mail-lf1-x133.google.com with SMTP id o19so4418233lfo.1; Thu, 24 Dec 2020 04:14:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=8PDZgsN8e1S8iAJgIQWFmcr5fqcA+olCtue62G+IMw8=; b=TzwQmYoGBJneEduxVkHeih8tyjwayvE8Paw1EAbvJPYfRWwf5wl7gJpHoffaWPAqzA gkxltgA/7vOHWv9svpEcEc3IG2HxGpkghaYBf2XIMzsinMqbBtujP+Jw2pjyCRGMKs06 ZiLF3z/136SRi41HS5B8JsCPEaANBUpc/yqLFNv+8dNU7lSqEnUdID+8+NdFN1+Au+iQ ZPbnoxblSmR/SdnhZOU7IzD7+ZrjASKOXESjqeA+j6UYLymmX8rArmcX3yOGAJeNGJT9 Fp0+pe5erEjpIwmBUZmB2TzoQw+geHtOf8EFHq7qDATHcIOYEmmHR/WG0FDtfzNC1TqU 27lQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=8PDZgsN8e1S8iAJgIQWFmcr5fqcA+olCtue62G+IMw8=; b=TvHDzHumZOCIQup7ZrkqoOlJruW0tvq60Jhp0AOfoSF/2f4wpqZil87A1dmsFd8O/l G2TqxiAWUDEcGyk3Mo1RfWNearQyKstkAM4KToUzoXZmMJRfh1EOhFUFUy608ND/BSo8 j+BSmXZWZ9Bj2Ioa5vCjjEEWif4Y5Hh+OIboJuqrihja7HLzmqSaWptZclk4b9p1RM/R nPMSnZB9nN9u6Ux8L5DTEX5TrWJU55gAGPfUt41xZPefCHW7b+FKpv2RBuK5HXa3DAjV lQn1BFhzLEmvvBa2bW7ROPq7keCOYmwZEyzfhDzcP0s29BLv3a6wBDYh7bEOgUg1Rv23 ihmA== X-Gm-Message-State: AOAM5337s15etv//bR3k6atcOvfzfaWDc8m9PMZCUpVclwSzyJVxZH70 1yUPZw/82NWvbMWUyvxrzfjaDCvI8Xw= X-Received: by 2002:a19:4c06:: with SMTP id z6mr13550389lfa.284.1608812053002; Thu, 24 Dec 2020 04:14:13 -0800 (PST) Received: from [192.168.2.145] (109-252-192-57.dynamic.spd-mgts.ru. [109.252.192.57]) by smtp.googlemail.com with ESMTPSA id k20sm3898808ljc.61.2020.12.24.04.14.11 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 24 Dec 2020 04:14:12 -0800 (PST) Subject: Re: [PATCH v2 28/48] soc/tegra: Introduce core power domain driver To: Viresh Kumar Cc: Thierry Reding , Jonathan Hunter , Mark Brown , Liam Girdwood , Ulf Hansson , Mauro Carvalho Chehab , Rob Herring , Peter Geis , Nicolas Chauvet , Krzysztof Kozlowski , "Rafael J. Wysocki" , Kevin Hilman , Peter De Schrijver , Viresh Kumar , Stephen Boyd , Michael Turquette , devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-media@vger.kernel.org, linux-tegra@vger.kernel.org, linux-clk@vger.kernel.org References: <20201217180638.22748-1-digetx@gmail.com> <20201217180638.22748-29-digetx@gmail.com> <20201222064029.duuzcsj53rt7xzvt@vireshk-i7> <3a5c00e5-2cdd-35ce-2714-d4ffbf9d516a@gmail.com> <20201223055715.2n5eba7fohrwpgr5@vireshk-i7> <239642ad-d7e9-364e-80d3-1da67625e247@gmail.com> <20201224065142.7rhfx37wgg3ejjqm@vireshk-i7> From: Dmitry Osipenko Message-ID: Date: Thu, 24 Dec 2020 15:14:11 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.4.2 MIME-Version: 1.0 In-Reply-To: <20201224065142.7rhfx37wgg3ejjqm@vireshk-i7> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 24.12.2020 09:51, Viresh Kumar пишет: > On 23-12-20, 23:37, Dmitry Osipenko wrote: >> 23.12.2020 08:57, Viresh Kumar пишет: >>> What's wrong with getting the regulator in the driver as well ? Apart from the >>> OPP core ? >> >> The voltage syncing should be done for each consumer regulator >> individually [1]. >> >> Secondly, regulator core doesn't work well today if the same regulator >> is requested more than one time for the same device. > > Hmm... > >>>> will return the OPP table regulator in order to allow driver to use the >>>> regulator directly. But I'm not sure whether this is a much better >>>> option than the opp_sync_regulators() and opp_set_voltage() APIs. >>> >>> set_voltage() is still fine as there is some data that the OPP core has, but >>> sync_regulator() has nothing to do with OPP core. >>> >>> And this may lead to more wrapper helpers in the OPP core, which I am afraid of. >>> And so even if it is not the best, I would like the OPP core to provide the data >>> and not get into this. Ofcourse there is an exception to this, opp_set_rate. >>> >> >> The regulator_sync_voltage() should be invoked only if voltage was >> changed previously [1]. >> >> The OPP core already has the info about whether voltage was changed and >> it provides the necessary locking for both set_voltage() and >> sync_regulator(). Perhaps I'll need to duplicate that functionality in >> the PD driver, instead of making it all generic and re-usable by other >> drivers. >> >> [1] >> https://elixir.bootlin.com/linux/v5.10.2/source/drivers/regulator/core.c#L4107 > > Lets do it in the OPP core and see where we go. > Alright, thank you.