Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp4308533pxt; Wed, 11 Aug 2021 03:03:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJznzTKUf89HrdzmydExdKYOSO7OTh0vGynH+g9r8Am0K/TMLsKZTYC1lfveDTpcWY+l2Urn X-Received: by 2002:a05:6638:410e:: with SMTP id ay14mr30742328jab.76.1628676204875; Wed, 11 Aug 2021 03:03:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628676204; cv=none; d=google.com; s=arc-20160816; b=xA9CTRu6PGC+lvfHd40nx1oadLpc0ZmN6FhCnQnlMY68SwRxnog/Yy5M9HAQg1ncN4 ZoQ8WCWJPfIS6VGjlXVEasXNEPHY+DNAf7w3tHFEm58VtbeJjbYNGKgrnnQsqH+UOFtV 6khKztk5Sx5CP5L6pWG82Vz/ykvzcElxV4sm2gDJRsF0oeAV9/g/yDF4hH8peYofg+1w TnDEcm1nZA69c4/aMfgkQkgwNhlMyxuUotzyIpfz2Dabr7+wJpRi4Ehmmyr+hnvZDACR dgA82itzyofnlCVQAgKht2ZyRI4zvZewYW8WO9UXabzV7H4XcEHVAb83OLl7vTZDjo+v NvzQ== 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:dmarc-filter:sender:dkim-signature; bh=YsRXRW60o9vyHLLImrko8sF08vcveheFzhu6/n2s0+Y=; b=N2YattVhjs9pTJSAJnX1WbGQby17CpYzC1fjeOh/KUi88PejkIqWB4qsXMLFSCwZzz AM3lVtSgZLJBfjFsq4/0cEuQBYbHje7sWIH7xd/wQounkkLiDvefIMsLUayosSsqn+ef CKz+idOLahY2Py8djkxU3o1U79+qsBBeD5Wn6ZFr2lSMCoijhZKo9abYpRg5ta3G73mW HtQ7h6+O8XGzLRMihxGyh2DsuGe+dl2T3QG0B9xrS7yq9sCy+nIofZb/DdQp6/MfSz/f EAJM0RnpwRrMIvqem173ml/GjZlmA/PUOVrpWKp3DWTw6cT4ZszENu88wpt/PTxb/nOg b1Nw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=obiwAA8K; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g17si25226049jao.103.2021.08.11.03.03.11; Wed, 11 Aug 2021 03:03:24 -0700 (PDT) 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=@mg.codeaurora.org header.s=smtp header.b=obiwAA8K; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236797AbhHKKBf (ORCPT + 99 others); Wed, 11 Aug 2021 06:01:35 -0400 Received: from m43-7.mailgun.net ([69.72.43.7]:53962 "EHLO m43-7.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236784AbhHKKBf (ORCPT ); Wed, 11 Aug 2021 06:01:35 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1628676071; h=Content-Transfer-Encoding: Content-Type: In-Reply-To: MIME-Version: Date: Message-ID: From: References: Cc: To: Subject: Sender; bh=YsRXRW60o9vyHLLImrko8sF08vcveheFzhu6/n2s0+Y=; b=obiwAA8K4wTIW9gUaYidDFlTknBLP1Z3lQX7mldZc61nVsccf9QSjuzQCP+ndU4Qm5yDxvX7 eYCWlssfqg6dgdqq1esG83YBgabsy8vaUs/0tZJvqf7rIF7qLCVU8+Ms9lcLoMMqGUYR4co8 zjzpoACRu+9qv8MGKXX2XdO2c7k= X-Mailgun-Sending-Ip: 69.72.43.7 X-Mailgun-Sid: WyI0MWYwYSIsICJsaW51eC1rZXJuZWxAdmdlci5rZXJuZWwub3JnIiwgImJlOWU0YSJd Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n03.prod.us-west-2.postgun.com with SMTP id 61139fd5f746c298d96b87ab (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Wed, 11 Aug 2021 10:00:52 GMT Sender: rnayak=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 7E28FC433F1; Wed, 11 Aug 2021 10:00:52 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=ALL_TRUSTED,BAYES_00, NICE_REPLY_A,SPF_FAIL autolearn=no autolearn_force=no version=3.4.0 Received: from [192.168.1.100] (unknown [49.207.220.239]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: rnayak) by smtp.codeaurora.org (Postfix) with ESMTPSA id 89553C433F1; Wed, 11 Aug 2021 10:00:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 89553C433F1 Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=fail smtp.mailfrom=rnayak@codeaurora.org Subject: Re: [PATCH v6 1/2] PM / Domains: Add support for 'required-opps' to set default perf state To: Viresh Kumar Cc: Ulf Hansson , Bjorn Andersson , Linux PM , DTML , Linux Kernel Mailing List , linux-arm-msm , Stephen Boyd , Roja Rani Yarubandi , Stephan Gerhold References: <1628074696-7979-1-git-send-email-rnayak@codeaurora.org> <1628074696-7979-2-git-send-email-rnayak@codeaurora.org> <2afd0fac-ed28-c090-a345-3fd4284b4125@codeaurora.org> <20210810024308.gurvzpbe2bc2bhky@vireshk-i7> From: Rajendra Nayak Message-ID: Date: Wed, 11 Aug 2021 15:30:46 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 In-Reply-To: <20210810024308.gurvzpbe2bc2bhky@vireshk-i7> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 8/10/2021 8:13 AM, Viresh Kumar wrote: > On 09-08-21, 16:38, Rajendra Nayak wrote: >> Sure, I can do that, apart from the error print, the function currently also >> returns a -EINVAL in case of the missing 'required-opps', are we suggesting >> we change that to not return an error also? > > No. > >> Since this is completely optional in the device node, we would want the function to >> ideally not return error and only do so in case 'required-opps' exists and the >> translation to performance state fails. > > Not really. The function should return failure if the property isn't > there, but it shouldn't be EINVAL but ENODEV. In my case I don't want to error out if the property is missing, I want to error out only when the property exists but can't be translated into a performance state. So currently I check if the property exists and *only then* try to translate it, Ulf asked me to skip the check. If I do that and I call of_get_required_opp_performance_state() unconditionally, and if it errors out I will need to put in additional logic (check for return value of ENODEV) to distinguish between the property-does-not-exist vs property-exists-but-cannot-be-translated case. It just seems more straight-forward to call this only when the property exists, Ulf? -- QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation