Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp2965313pxb; Sun, 8 Nov 2020 21:12:04 -0800 (PST) X-Google-Smtp-Source: ABdhPJyNP79lXGMboK7LPHf+nuLNWeNlz2zmaax/F7QJ+Lg9myNPvuR2kvsDYzjNREzqsAhRDXH6 X-Received: by 2002:a50:b761:: with SMTP id g88mr13889503ede.387.1604898724545; Sun, 08 Nov 2020 21:12:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604898724; cv=none; d=google.com; s=arc-20160816; b=szVlRBFiO9/0uhSmkrkSIGWxnAXJE82UB+gdaNt+aYOPTW8lEyNSsLa5voUOQd9HJk m7tqYdaoLNPe7xaDUh8JHb1Ze4TqoPfE0eFLa0wYexTUGBadrVCs34OMqAftzHOEzgAR NfbPbxG5TGUTxxXapk8Yxvyu5Es9MP25K2Jd+pRRDymWtxii0ZpYBJZbxkELfQKhZi+P RNsN/ModB/YCfbFmSZWv9twqsgdcPhej9X/WRJHbuuVYi5u2l+azA1xkC61oh62AdMp7 Tz1z++VsPATh5DezVRaWmn4pGQ9mN45pkMCvZfd7Ery36WfRj5ipOI+o1n2ez8VHJfIG ob/Q== 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=FeL/6AVX9ZUMu7dDHuIXkGUemXJf7ZARpxKlL5RCoNQ=; b=QYK0Nxu85Um/Iq79VwovuBRKVNO2Fdukmh0rSc7HzfRe2/3vhmrMAINDhsXBjPiFCD QEklQqJMbWhtWSrQntcREk2D09147xrE2BCTZJXSEjEDUB3SVjuTgZeGtQqRn2eogsAP vICGJ3w4oNizANkPJ4c4y62IBGG177O6Ebmdnyl8h3CeUF7MKhCyhH2GAVN2xLFE7FYP xKcQ/w/TBunb2lrb7MkW4HiJmEv/vYP1v9ZgWIDl/7fdNwHZpcryMsCwsWQLI1dEhmmc 4D+qKcwLGRrDmZWjhC83PgXViuWf7aCLycOTudB46mZXZZHW9Uh0MKDZwie6I26NfrT/ 7FJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=HASuQOXk; 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 dc22si7589323ejb.275.2020.11.08.21.11.39; Sun, 08 Nov 2020 21:12:04 -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=HASuQOXk; 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 S1729335AbgKIFJD (ORCPT + 99 others); Mon, 9 Nov 2020 00:09:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60292 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725865AbgKIFJC (ORCPT ); Mon, 9 Nov 2020 00:09:02 -0500 Received: from mail-lf1-x143.google.com (mail-lf1-x143.google.com [IPv6:2a00:1450:4864:20::143]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 38D62C0613CF; Sun, 8 Nov 2020 21:09:02 -0800 (PST) Received: by mail-lf1-x143.google.com with SMTP id w142so3659815lff.8; Sun, 08 Nov 2020 21:09:02 -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=FeL/6AVX9ZUMu7dDHuIXkGUemXJf7ZARpxKlL5RCoNQ=; b=HASuQOXkF1RZA3cFoj4FpQvKgZV2Q1/lr5KDfeyQiu7UzOUcgR2MLIo0A9WjcfOmav ata3slrLCP7pYpjJJpH3hsWHJQhWDFD2MnuhKZ/K2Wi3PTDjn+6YANdF7+WLjyyARswK xjvHnNgEGoDtms4JWbiH/Eldmfj6//odfOM4UJkGJg1nbiyF9x+dhfPodAtsd68AVRQt aYvz1hbhU2LBNUEhS+Pd+SfaNp7EwpvEEKUFSYkSpU0qD7E4OjNohzH6JLJrfeYiaYh+ TKX+gaGoXyq8SLKOzNJ4iFAJkgcC2xWjpa2lrpe34n1HFP7FxGpRlfeKBkcE/EIUJsh1 aq6A== 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=FeL/6AVX9ZUMu7dDHuIXkGUemXJf7ZARpxKlL5RCoNQ=; b=Em/A75Ib06pzgRU50JcxNMu2yyS/a3HT6ls4eo5Vxe2CnG+9vTRC0PsV0nnrNBdqp7 F+JodYi9H2r7+v0TEWvB5VBHXTQ38eEKNFOSlZdNli1iFgtoeF3fKaOUbQTNVIy7C68Y g2nnDtA0ajBSBGGJPI/s9S3FrB0iaoYdLm8LMWFheLQGVDamUQqXSeR3dslqvzhodVTY +JdKu3YRmEs5mFnkc+Gno1CA7TUgHQw75Y78dceuLWfLq9gNTot4hEYbiuTy775Ob/RR pGvN6mSn98WVF8eFXntSN0xgG8h2CXL4UF/5872XDCRHUS+p4aIM0KskOirYb+bMhZnp B9/A== X-Gm-Message-State: AOAM532KOCmbWnuJ2rCqfujbBTaDQEaIUNORGZiNc3ojmhc0hGScUj0M gqtPhujQsOy+gZHGy+M9rQdz3h6byDc= X-Received: by 2002:a19:c714:: with SMTP id x20mr2310703lff.537.1604898540523; Sun, 08 Nov 2020 21:09:00 -0800 (PST) Received: from [192.168.2.145] (109-252-193-159.dynamic.spd-mgts.ru. [109.252.193.159]) by smtp.googlemail.com with ESMTPSA id w22sm1662291ljm.20.2020.11.08.21.08.58 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 08 Nov 2020 21:08:59 -0800 (PST) Subject: Re: [PATCH v1 17/30] mmc: sdhci-tegra: Support OPP and core voltage scaling To: Viresh Kumar , Frank Lee Cc: Thierry Reding , Jonathan Hunter , Alan Stern , Peter Chen , Mark Brown , Liam Girdwood , Adrian Hunter , Krzysztof Kozlowski , Greg Kroah-Hartman , Lee Jones , =?UTF-8?Q?Uwe_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 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> From: Dmitry Osipenko Message-ID: Date: Mon, 9 Nov 2020 08:08:58 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20201109050010.g47zojh6wafvwqva@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 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.