Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp567241pxb; Thu, 5 Nov 2020 07:24:23 -0800 (PST) X-Google-Smtp-Source: ABdhPJxmzhuUqEvztx/UaWnsMJtGoWaNR/LrlMsNs/cbbeEtdWJso6urMMzTNR6KFWV3zXuOtMlV X-Received: by 2002:a17:906:cede:: with SMTP id si30mr2726257ejb.16.1604589863252; Thu, 05 Nov 2020 07:24:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604589863; cv=none; d=google.com; s=arc-20160816; b=mbe14Pu3wGtb9sRNx7O1KTdDYu9ZKT02LouEeLbdI/RT+lLE9bosEMoT0Tn8J4y+8v G5vBn3jUi43q1RkIDlkJz1zJJVOPejShDHFoUqz4uY/Nn4dZySDcxb1oNaitxeoY8GDD vGfmBFYvz0Fkm9tCNdMb4AxtSmL4aIiJCvdJWOO57QfEem4aF2Nas5myTkgw5CfLBZ8N HVprrpdoq5hKH/VBFDxFFHspWv6Odk5wfzEeyIak6TpX4swAytfbfIIZriPaRXCoVYWO tSBGqcHowHmopwCVPqxnin9HpedNJ2bM9+lh64EQAlgvQOvi+okT56PS8f3KYYGcfP8U dRVA== 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=L7OVsr5m178XbCaCzAWNkdQoFi3/3zu9mN+yPgl2DUs=; b=NcufoAdFxl6PW6SqMPlX80B1fFZNSEFeEfi9KCV4WZWJPXujveVgX1L8Tv8R6vJIpc wR3RPy0El+Aea9NELT7LMItX5eq4ZOt6KQ+o+paheN5E3pB7cpbsAIbDSRC8oRDdEWyr STmrXDPlTP2ABIGdSFubWPeXR2P9TcapIPPy2Mr0hWtWrvDQjTWMD1BRjuvuL1GYpP5J T0UprvgIEpaosg/EkYiRXJC8PgBIeP3sR4wnbluFZi8E/1omw08liMhQz+H/SDsSqPBG clcxQ+Z3DdQ3T6MeI2OetvoAr8hcftDvhST8bBYZe2UMN6oByzk+yVFw84+a5/fW3VGl qztw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ZUE+lII3; 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 j22si548607eds.369.2020.11.05.07.23.59; Thu, 05 Nov 2020 07:24:23 -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=ZUE+lII3; 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 S1731176AbgKEPWR (ORCPT + 99 others); Thu, 5 Nov 2020 10:22:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52754 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730660AbgKEPWQ (ORCPT ); Thu, 5 Nov 2020 10:22:16 -0500 Received: from mail-lj1-x242.google.com (mail-lj1-x242.google.com [IPv6:2a00:1450:4864:20::242]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5261BC0613CF; Thu, 5 Nov 2020 07:22:14 -0800 (PST) Received: by mail-lj1-x242.google.com with SMTP id l10so1979097lji.4; Thu, 05 Nov 2020 07:22: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=L7OVsr5m178XbCaCzAWNkdQoFi3/3zu9mN+yPgl2DUs=; b=ZUE+lII34sxgdJMzK2yn/f7sQCJw/4+mRXBdMBq1/bhBQWtfS/PtExzwYtktIoAWgY SU7g93lwJ2c7NK0CDwzeo+RytY043NhbabYKjJOBr7tIMP5wlLP/u6h82rzBRDjVxP9j EdnAYAZOpmyMs1GUR/kcd37x1kAewnXFex0wqQUKK37hfYXxUIOMvhuhv9Kkm4bWWj03 NYOfuJLDcjhyyGqGtJNpIUWkJQCG6veMjv1sZZ5dae38lEVIkii3wjlD54ZKITpqpnKX 8VoeiDhs1BxqGTAhX5SPmAP4HQXgACk2ac5ePAi3NeEKCHu2erytV3AEJlNMrsBJq5S8 bmSA== 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=L7OVsr5m178XbCaCzAWNkdQoFi3/3zu9mN+yPgl2DUs=; b=twh5NJEnuJ62dpTxoXovRD4gCmY0BG4D9sS+edVQQaMZPACU1iuomMN04SrNwtNh22 xGgIaIIGj3vyBZ9oADNuwuwDVf+fnX79IRtDyPVBi0M7BStghUDNZRkAK7Of7dOgEVq2 SIFpM8RU39rOH0UKaL6zhX5IarWKE5o/lAJs701DcXrY8D5qmZXojcDNMiGQbuL4vFlv 8D9WQ5rOyXrCiJFoIgj2thbGswp7134dZ+pdmXKUUX7/i80MgJ+K3pCsyLmzkqt0AXue PI8v+6G9SRCSt0uBy0cXjRGyCVaq8m9rxGnt7vnEEBfr03P1sJFKGC2UktRMnFqD8Kr0 RDQw== X-Gm-Message-State: AOAM533I23gWFQ5iK/2hzADTQc84tAIocMgvEeppzzNkLTtmlUB8KQgy KSeJV8Z1IXgIGjbGxm2PEqKG+a1OJ9E= X-Received: by 2002:a2e:9a0e:: with SMTP id o14mr1127768lji.340.1604589731407; Thu, 05 Nov 2020 07:22:11 -0800 (PST) Received: from [192.168.2.145] (109-252-192-83.dynamic.spd-mgts.ru. [109.252.192.83]) by smtp.googlemail.com with ESMTPSA id 144sm176642ljj.48.2020.11.05.07.22.09 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 05 Nov 2020 07:22:10 -0800 (PST) Subject: Re: [PATCH v1 00/30] Introduce core voltage scaling for NVIDIA Tegra20/30 SoCs To: Ulf Hansson , Viresh Kumar 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?= , Mauro Carvalho Chehab , Rob Herring , Marek Szyprowski , Peter Geis , Nicolas Chauvet , linux-samsung-soc , driverdevel , Linux USB List , linux-pwm@vger.kernel.org, "linux-mmc@vger.kernel.org" , Linux Kernel Mailing List , DTML , dri-devel , Linux Media Mailing List , linux-tegra References: <20201104234427.26477-1-digetx@gmail.com> From: Dmitry Osipenko Message-ID: Date: Thu, 5 Nov 2020 18:22:09 +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: 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 05.11.2020 12:45, Ulf Hansson пишет: ... > I need some more time to review this, but just a quick check found a > few potential issues... Thank you for starting the review! I'm pretty sure it will take a couple revisions until all the questions will be resolved :) > The "core-supply", that you specify as a regulator for each > controller's device node, is not the way we describe power domains. > Instead, it seems like you should register a power-domain provider > (with the help of genpd) and implement the ->set_performance_state() > callback for it. Each device node should then be hooked up to this > power-domain, rather than to a "core-supply". For DT bindings, please > have a look at Documentation/devicetree/bindings/power/power-domain.yaml > and Documentation/devicetree/bindings/power/power_domain.txt. > > In regards to the "sync state" problem (preventing to change > performance states until all consumers have been attached), this can > then be managed by the genpd provider driver instead. I'll need to take a closer look at GENPD, thank you for the suggestion. Sounds like a software GENPD driver which manages clocks and voltages could be a good idea, but it also could be an unnecessary over-engineering. Let's see..