Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp667175imm; Wed, 23 May 2018 03:40:19 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrhyUyy1jJ92U+SmMgn6B0EhWYUzxZgrUhi3Ojep43symU87uNO4+5t90eu8BhAXFynUTx6 X-Received: by 2002:a63:6584:: with SMTP id z126-v6mr1917902pgb.168.1527072019415; Wed, 23 May 2018 03:40:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527072019; cv=none; d=google.com; s=arc-20160816; b=Gu6GIGVrNwO9E8BXkArNC0OK+GxVxfdT3kbgiczkyNDxnHji29S8JKIPwVQe2UOcKU iyI4K1fSqTQqztopGzq34IeecdeZIf8vK55gIzyIi8pBAwbYhvhOmtBxel0vhP02Tu/e 2ZR8wFUwIi2nOSys9S8g/fciRoYq/WMvLIVPLNQWPMYp2qikQaX+cVxyA/Zz35102JEP cbgczmDlsrtLlsS+7yA/sV8RY4lxLqJjLoqyJdaowjc6AxkqFW2OJ6roQyMgQ/Cam29d UGOwmwY5fu9Vjfk2j88COObJU40ZA7zgV+J6+upDhf0Rwei5D9UdaLEPUjjJIS/R/bOE Rchw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:organization:from:references:to:subject:cc :arc-authentication-results; bh=ksaV1/ZDMvzshuqxbEKxIr/lJFcTh5XZeawznfYNqUA=; b=iD6TkPeCL6OD+lcAlMp87qF8EdCNciHZ94RQb5iJ5icWcz4guhPtDaKCLZgXxnkL9T 4L4jm9ma25HkOl2IAZTzwDhB1cSKgxfyu8jQCOS2dgnrCR7hnkplX3A5o0cfJM69+Ywr G7m4uT0bWCaIu73Ag2MktzBu9xR09arNwYpLljibI1NGPXZ8Q5FQ8sWj4c58ebS5+Wad ka/yVYTAoiW1ZditbEA/+AkamispQDj041Ks1Vb4L3v8WjxvlQDv7j8b28E2plmdVsg+ z6HW5fnvYTZUlb8oJgvpgSSbDQwsLcFB+uVm+jND50mN+I0HMDFSQnMHLwFwXydLlldo 5E0g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v69-v6si18376016pfd.341.2018.05.23.03.40.02; Wed, 23 May 2018 03:40:19 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932427AbeEWKjr (ORCPT + 99 others); Wed, 23 May 2018 06:39:47 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:53082 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932180AbeEWKjn (ORCPT ); Wed, 23 May 2018 06:39:43 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 23EA580D; Wed, 23 May 2018 03:39:43 -0700 (PDT) Received: from [10.1.210.28] (unknown [10.1.210.28]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 332143F589; Wed, 23 May 2018 03:39:41 -0700 (PDT) Cc: Sudeep Holla Subject: Re: [PATCH v10 1/2] cpufreq: Add Kryo CPU scaling driver To: Ilia Lin , vireshk@kernel.org, nm@ti.com, sboyd@kernel.org, robh@kernel.org, mark.rutland@arm.com, rjw@rjwysocki.net, linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org References: <1527068454-28921-1-git-send-email-ilialin@codeaurora.org> <1527068454-28921-2-git-send-email-ilialin@codeaurora.org> From: Sudeep Holla Organization: ARM Message-ID: <3f1ca60e-7aa8-fccc-ab1c-4b7c37731cce@arm.com> Date: Wed, 23 May 2018 11:39:37 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <1527068454-28921-2-git-send-email-ilialin@codeaurora.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 23/05/18 10:40, Ilia Lin wrote: > In Certain QCOM SoCs like apq8096 and msm8996 that have KRYO processors, > the CPU frequency subset and voltage value of each OPP varies > based on the silicon variant in use. Qualcomm Process Voltage Scaling Tables > defines the voltage and frequency value based on the msm-id in SMEM > and speedbin blown in the efuse combination. > The qcom-cpufreq-kryo driver reads the msm-id and efuse value from the SoC > to provide the OPP framework with required information. > This is used to determine the voltage and frequency value for each OPP of > operating-points-v2 table when it is parsed by the OPP framework. > > Signed-off-by: Ilia Lin [...] > + pdev = platform_device_register_simple("cpufreq-dt", -1, NULL, 0); > + if (!IS_ERR(pdev)) > + return 0; > + > + ret = PTR_ERR(pdev); > + dev_err(cpu_dev, "Failed to register platform device\n"); > + > +free_opp: > + for_each_possible_cpu(cpu) { > + if (IS_ERR_OR_NULL(opp_tables[cpu])) > + break; > + dev_pm_opp_put_supported_hw(opp_tables[cpu]); > + } > +free_np: > + of_node_put(np); > + > + return ret; > +} > +late_initcall(qcom_cpufreq_kryo_driver_init); Any particular reason why this *has* to be late initcall ? Please change it to module_initcall otherwise. Also address the of_node comments from Viresh. Otherwise, it looks good. -- Regards, Sudeep