Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp3322146imm; Fri, 25 May 2018 03:49:32 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpwwmUW0xj3CwiOhYymno/gZF1CdwROXAiDk1eoYPFuTffaLZ2GHgFv5SW3A76v+8S/Szv+ X-Received: by 2002:a17:902:5409:: with SMTP id d9-v6mr2033349pli.1.1527245372583; Fri, 25 May 2018 03:49:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527245372; cv=none; d=google.com; s=arc-20160816; b=XDXHpcTCsS16AdvwjiaNEhUhphpHGzsYxBO8bRPG2gyoeUaoa/LdLw2FJmdNH6a4JX v/FWmQhkvOineBvuqdWmcaDO4MtJrqXzi4JG6/HrlJGpT2ppFkpRVsP4YkbGyc9tk6nF TBrXia83D8RM3AsmKtc904MT3GPShRwl5XBz4F8CD0BiSzSJSvug3nFaAZKbvVh1K1dC N4hHfxoT1DkiUhZNTquYZxvZ0gH2aeUb+P5fecQMr/dCoRb2cefhQ1gC9FU3T+ML5qQr 2TWUS5pQEeAW1d0uY0m1ADnKDk9JiJXcBSqpQaEJIAczL4jvyesbauWoGoRyWIz0cj0k lUlg== 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=t8DV/i/Y0RiXJDyRO870GpA+QSKBgcx1UK9ko49iIjQ=; b=boqHdo82abrKmcr4+jCYvscz+X+pSaoItHCxVVAM1vwDAop5H8mdSXe3/+9IVFoj9W OeWV3V//8BUeN1PQ66RoLqVRDcckBIxXYIZPGh/QlCVCt9eBRjylcKUfzocKMfnCOZ4J Jy0/11AjNJnbtZW55qket7p6M18dditZ3zjdRbHSIGMpAoL9qxK2+LsMfs3qCKlJNRkd +yddLmON4S5QF7VKIxOwIKV6cwfMAxRvKR6XRpGMrqRxugBnhhj/VOaayOVN8DxPQ0Mg edTrh4LICqBKg0JvFG3tMHyQFNyJqssNj6r9RayCqgjD7V6FLhjIkX0ya+tDHMJLS8g+ 0IOA== 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 p23-v6si339112plr.384.2018.05.25.03.49.17; Fri, 25 May 2018 03:49:32 -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 S966195AbeEYKsl (ORCPT + 99 others); Fri, 25 May 2018 06:48:41 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:59426 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965255AbeEYKsj (ORCPT ); Fri, 25 May 2018 06:48:39 -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 6809E1596; Fri, 25 May 2018 03:48:39 -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 629EF3F24A; Fri, 25 May 2018 03:48:35 -0700 (PDT) Cc: Sudeep Holla , 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 Subject: Re: [PATCH v13 1/2] cpufreq: Add Kryo CPU scaling driver To: Viresh Kumar , Ilia Lin References: <1527174220-13244-1-git-send-email-ilialin@codeaurora.org> <1527174220-13244-2-git-send-email-ilialin@codeaurora.org> <20180525035412.3jjocp7ccmv5u2il@vireshk-i7> <20180525040536.njrdqjn376oehw2b@vireshk-i7> From: Sudeep Holla Organization: ARM Message-ID: <3aa2ced3-ad14-e02b-6702-c0fd1c48513b@arm.com> Date: Fri, 25 May 2018 11:48:33 +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: <20180525040536.njrdqjn376oehw2b@vireshk-i7> 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 25/05/18 05:05, Viresh Kumar wrote: > On 25-05-18, 07:00, Ilia Lin wrote: >> >> >> On May 25, 2018 6:54:12 AM GMT+03:00, Viresh Kumar wrote: >>> On 24-05-18, 18:03, Ilia Lin wrote: >>>> +static int __init qcom_cpufreq_kryo_init(void) >>>> +{ >>>> + struct device_node *np; >>>> + struct device *cpu_dev; >>>> + int ret; >>>> + >>>> + cpu_dev = get_cpu_device(0); >>>> + if (NULL == cpu_dev) >>>> + ret = -ENODEV; >>>> + >>>> + np = dev_pm_opp_of_get_opp_desc_node(cpu_dev); >>>> + if (IS_ERR(np)) >>>> + return PTR_ERR(np); >>>> + >>>> + ret = of_device_is_compatible(np, "operating-points-v2-kryo-cpu"); >>>> + of_node_put(np); >>>> + if (!ret) >>>> + return -ENOENT; >>>> + >>> >>> I hate the fact that it is taking so long to get done with this. But >>> can't you >>> just check machine compatibility instead of this complicated setup to >>> check OPP >>> node ? Like: >>> >>> if (!of_device_is_compatible("qcom,apq8096") && >>> !of_device_is_compatible("qcom,msm8996")) >>> return; >> >> I have to check the "operating-points-v2-kryo-cpu" anyway, so I moved it from probe to the init. > > Okay, leave it as is then. Don't send anything yet and wait for Sudeep to > respond. > I have already mentioned that I can't suggest since I don't have much knowledge on QCOM PM. I see lots of patches flying around these days with multiple people doing same things in different ways. That's why I suggested Ilia to check with Taniya or Saravana or SBoyd to see what's the best thing to do in this context. I don't prefer using OPP compatible and would go with machine compatibility as you suggested. But I am fine with OPP, just wanted to make sure it won't clash with anything else. -- Regards, Sudeep