Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp2965339pxb; Sun, 8 Nov 2020 21:12:07 -0800 (PST) X-Google-Smtp-Source: ABdhPJwBYl5JwvCQXx7MY1XYFFbcMwSJgM7c8iVVB/LA6yvLUoUHH4AbNeQYDGvFP07dVN0kEIbw X-Received: by 2002:aa7:c90a:: with SMTP id b10mr13294265edt.266.1604898727517; Sun, 08 Nov 2020 21:12:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604898727; cv=none; d=google.com; s=arc-20160816; b=R/i8TTJtugyndTJLMgdh6HyjJFX8CwpxbRBiFGp3vk5SDnk8Ytrl/uk7sQMFbNC8FS UxB8qE54DdwNXnleHprEJ1XLLMCZ+t3wL11Kpz1hU2DZy8GZzecVLJpF6O3HKIBsuzGi We++UupYAD4fncA7aYjVCoMq30WXX4yItJlRU4DfTypHkCOxMEYgt3ilMEbpAUCU+p5u +TWaj6ukKOod6/eoAj38PxYJXytnSjairCf5wWQtYWAswkMwfFfXFzUumPuYqYPj8DcT V0f9NwBER2lj/WhsclcMOW40wVS3xpJSC2ksrxenjysG8M3ILb8JY6NWQHHppHYDT3im zmVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=XgmwVftW1h6VXvLFHyQ3D2f7dAvQEabg59R1W+Mex10=; b=HuZVWUvn4XrQX3Rc5vP09MmPZxPq2CriS017HDGWmH2F9RO0hYV0CK29qveVm3sbGI z1CMvtmUtVmiW/v1QUEYYroFvpy6RRV7W5LKZ/rv+jEHCkM/VPK/y/4Rrou8x2Zh3rHv PMj2cerGYt4atd4jbWqeG6xDhtS/ILsPVqBbulHQ5/Jm1hgSAsQHCm1wbVm/qXKpT6f8 tZGvViklahz/0XwWd+m5XyZMCXCNGsTKXYDGtSlKkZOTX74xWoPJ/zyVHq5tnzv3dxBf 0h6LkZ1xlWcPeB0SK8jBv3STOVN+bOzfGlY5tGeoTh99DyltniJleYZUgmyU1xGITHSp k7Ug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=HyJFeNy9; 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 d8si1891106edm.404.2020.11.08.21.11.44; Sun, 08 Nov 2020 21:12:07 -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=@linaro.org header.s=google header.b=HyJFeNy9; 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 S1729420AbgKIFKS (ORCPT + 99 others); Mon, 9 Nov 2020 00:10:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60486 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725865AbgKIFKS (ORCPT ); Mon, 9 Nov 2020 00:10:18 -0500 Received: from mail-pf1-x441.google.com (mail-pf1-x441.google.com [IPv6:2607:f8b0:4864:20::441]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BFE97C0613D3 for ; Sun, 8 Nov 2020 21:10:17 -0800 (PST) Received: by mail-pf1-x441.google.com with SMTP id e7so6976949pfn.12 for ; Sun, 08 Nov 2020 21:10:17 -0800 (PST) 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:content-transfer-encoding:in-reply-to :user-agent; bh=XgmwVftW1h6VXvLFHyQ3D2f7dAvQEabg59R1W+Mex10=; b=HyJFeNy9dRofz/VIB02kKnHQ0GZ5T+96JVvhYzk10jI5ctp9i7zGwjha0J9RvT7KoS 2pc97Wdrzsn3PyolfwPehIR6O2LtT+VwOUIxiVaNxCqFhlkx612Ci8AYFO6PcqbGvQrV N6KFFNtsuGn9CFEnzWrff+eXgA4jRD0J1w1EFt+NwY3ZWJBjfZw9+PHLeLfm2io1Nn/V Kh/3YaDQmTGBwyacSRhSPhXy6GHls0BoTJcsdaXKvYkli5kqPDght02p1aMejDD0uQXp CmTemGtBgOzJfqUVfFZlkKFA7ogWF1ZmjSAhv8iADJbcpOm7EQ1TTBPscIh1rHcB20RM nMww== 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:content-transfer-encoding :in-reply-to:user-agent; bh=XgmwVftW1h6VXvLFHyQ3D2f7dAvQEabg59R1W+Mex10=; b=L0NcB7VhCsVQm+pekk2w2sBENS01QdDtB9cEjq3Ej4mGgTotsoOWxNMDgPPE287a7f kmhLRRIjNYq66TfrFgF0KV/AaCCo4pJNlRim/i796poeIkSPkIQTThIytIqZRR/Rgle7 KXwxkpEnpcfirATCu+dCrLbj0vV3oTLbpFDSnEIqzZI21BtwPg4rHLPXZJaRuIAJrad4 J2cVreAzch4z5qgTPj85Rto2FZJZVcEqvZ7+5/lHE95/4RssWRbg77kIzSqVnKUGhsvX qkD2j+qaH0qxcXAOWDnRcLkHD2vc8BBYpCjLjY3vqfsygaoPrW4UdJpYnoqEGZvq8LLn JZjA== X-Gm-Message-State: AOAM530V13kVHm5OIXmrNHhlKFe0/r3q02LdUOyL/SGwIHYHAf/wMUwx Mg3XGnMw0IN8QC/PUZaSwQmqmw== X-Received: by 2002:a63:380b:: with SMTP id f11mr11374932pga.198.1604898617255; Sun, 08 Nov 2020 21:10:17 -0800 (PST) Received: from localhost ([122.172.12.172]) by smtp.gmail.com with ESMTPSA id s23sm8781212pgl.47.2020.11.08.21.10.15 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 08 Nov 2020 21:10:16 -0800 (PST) Date: Mon, 9 Nov 2020 10:40:14 +0530 From: Viresh Kumar To: Dmitry Osipenko Cc: Frank Lee , Thierry Reding , Jonathan Hunter , Alan Stern , Peter Chen , Mark Brown , Liam Girdwood , Adrian Hunter , Krzysztof Kozlowski , Greg Kroah-Hartman , Lee Jones , Uwe =?utf-8?Q?Kleine-K=C3=B6nig?= , Ulf Hansson , Mauro Carvalho Chehab , Rob Herring , Marek Szyprowski , Peter Geis , Nicolas Chauvet , driver-dev , linux-pwm@vger.kernel.org, linux-samsung-soc , DTML , linux-usb@vger.kernel.org, "open list:SECURE DIGITAL HO..." , Linux Kernel Mailing List , dri-devel , linux-tegra@vger.kernel.org, linux-media@vger.kernel.org Subject: Re: [PATCH v1 17/30] mmc: sdhci-tegra: Support OPP and core voltage scaling Message-ID: <20201109051014.oa6bt4g3ctm2hnuy@vireshk-i7> References: <20201104234427.26477-1-digetx@gmail.com> <20201104234427.26477-18-digetx@gmail.com> <6fa54ce6-d5ae-d04f-7c77-b62c148d92b7@gmail.com> <20201106061513.uyys7njcqcdlah67@vireshk-i7> <20201109050010.g47zojh6wafvwqva@vireshk-i7> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: NeoMutt/20180716-391-311a52 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09-11-20, 08:08, Dmitry Osipenko wrote: > 09.11.2020 08:00, Viresh Kumar пишет: > > On 06-11-20, 21:41, Frank Lee wrote: > >> On Fri, Nov 6, 2020 at 9:18 PM Dmitry Osipenko wrote: > >>> > >>> 06.11.2020 09:15, Viresh Kumar пишет: > >>>> Setting regulators for count as 0 doesn't sound good to me. > >>>> > >>>> But, I understand that you don't want to have that if (have_regulator) > >>>> check, and it is a fair request. What I will instead do is, allow all > >>>> dev_pm_opp_put*() API to start accepting a NULL pointer for the OPP > >>>> table and fail silently. And so you won't be required to have this > >>>> unwanted check. But you will be required to save the pointer returned > >>>> back by dev_pm_opp_set_regulators(), which is the right thing to do > >>>> anyways. > >>> > >>> Perhaps even a better variant could be to add a devm versions of the OPP > >>> API functions, then drivers won't need to care about storing the > >>> opp_table pointer if it's unused by drivers. > >> > >> I think so. The consumer may not be so concerned about the status of > >> these OPP tables. > >> If the driver needs to manage the release, it needs to add a pointer > >> to their driver global structure. > >> > >> Maybe it's worth having these devm interfaces for opp. > > > > Sure if there are enough users of this, I am all for it. I was fine > > with the patches you sent, just that there were not a lot of users of > > it and so I pushed them back. If we find that we have more users of it > > now, we can surely get that back. > > > > There was already attempt to add the devm? Could you please give me a > link to the patches? > > I already prepared a patch which adds the devm helpers. It helps to keep > code cleaner and readable. https://lore.kernel.org/lkml/20201012135517.19468-1-frank@allwinnertech.com/ -- viresh