From patchwork Wed Jan 17 11:04:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sibi Sankar X-Patchwork-Id: 13521627 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 40BEFC47DA2 for ; Wed, 17 Jan 2024 11:05:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=koHvdbcbLA9xZQt47qUTq76reeaQDmp/223v1kA8CVI=; b=cU0njY6SkCpiT/ YOhKvXnfmQ3jYLJMclqyelIZc3qwCv6wKUkpQQinjtw1IfUz9o8odvPx2bb+UHMElK55/7zkZlzNF FU8X5BbyajpDUPP38Zj+VTCN3T42EBLCdKDdEX9djQ4wOoFPYiy/znPIWdd2huUd3Jhk+0VbzxBW5 k5GxZ/6bQzXDCUxaxGswGGo5MzMs4p0Rhh4clJwc5q0thUp3Az/TwYdbPiS8dKq4WIErIIX83+Rx/ ADDierVYBU5kEEgVSdvMdoCtq0r5FTO8qVrUfMuPP3D1F6/tq3GxeINy1npfLXvnh/4JQ+FOztTRn VzypKyna0rnbgfN5HiQA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rQ3jT-00FO7I-2p; Wed, 17 Jan 2024 11:05:19 +0000 Received: from mx0a-0031df01.pphosted.com ([205.220.168.131]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rQ3jR-00FO4u-15 for linux-arm-kernel@lists.infradead.org; Wed, 17 Jan 2024 11:05:18 +0000 Received: from pps.filterd (m0279865.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 40HAmiPl016006; Wed, 17 Jan 2024 11:05:08 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s= qcppdkim1; bh=HsxiSsCFdmIbg8BYHbMzFgtmOiVLc8AZK3LlDrMztDA=; b=HV +qRTAY2ukThgT+dPMBxpOFTj36EHTl2jJxWHs+fER9zMHBcdNrqHXEnVVEBg0GEW ay5TXBCcSGPo7pHk/OcUfP/q0sWvz5IcvSCNPcwOE7uTFZYZk/3HORnDjaCsmksm CgAUda43RMjlMbadw6PQPUiU1VzOAMXHQm8cUjXn6/9B0wATSG67nLsLD7pJgi8g Zmn2HCzr+c/GJ+1DtlGM/tsCHOC+vGdC7jpitHMpTWXTsTRlHTmFfM2IOnxUsyAY O9Dpu1Z5SS/1u7ajOW3EGaRBWWzBfTsh6FOTz9qPH5Qw1Ig8Hyok9AbQutl4eahJ SADQY1UTl513I+KzumEg== Received: from nalasppmta01.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3vpdfgr0wc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 17 Jan 2024 11:05:08 +0000 (GMT) Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA01.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 40HB57v4007804 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 17 Jan 2024 11:05:07 GMT Received: from hu-sibis-blr.qualcomm.com (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Wed, 17 Jan 2024 03:05:02 -0800 From: Sibi Sankar To: , , , , , , , CC: , , , , , , Sibi Sankar Subject: [PATCH 1/3] OPP: Extend dev_pm_opp_data with turbo support Date: Wed, 17 Jan 2024 16:34:41 +0530 Message-ID: <20240117110443.2060704-2-quic_sibis@quicinc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240117110443.2060704-1-quic_sibis@quicinc.com> References: <20240117110443.2060704-1-quic_sibis@quicinc.com> MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: 8kTFpV05Rzz1uffd1YDmDEF69leh9Xqd X-Proofpoint-ORIG-GUID: 8kTFpV05Rzz1uffd1YDmDEF69leh9Xqd X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-01-17_06,2024-01-17_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 spamscore=0 impostorscore=0 lowpriorityscore=0 bulkscore=0 clxscore=1015 mlxlogscore=999 phishscore=0 malwarescore=0 suspectscore=0 priorityscore=1501 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2311290000 definitions=main-2401170078 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240117_030517_441157_37A4B6A1 X-CRM114-Status: GOOD ( 12.53 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Let's extend the dev_pm_opp_data with a turbo variable, to allow users to specify if it's a boost frequency for a dynamically added OPP. Signed-off-by: Sibi Sankar --- drivers/opp/core.c | 1 + include/linux/pm_opp.h | 1 + 2 files changed, 2 insertions(+) diff --git a/drivers/opp/core.c b/drivers/opp/core.c index c4e0432ae42a..e233734b7220 100644 --- a/drivers/opp/core.c +++ b/drivers/opp/core.c @@ -2065,6 +2065,7 @@ int _opp_add_v1(struct opp_table *opp_table, struct device *dev, /* populate the opp table */ new_opp->rates[0] = data->freq; new_opp->level = data->level; + new_opp->turbo = data->turbo; tol = u_volt * opp_table->voltage_tolerance_v1 / 100; new_opp->supplies[0].u_volt = u_volt; new_opp->supplies[0].u_volt_min = u_volt - tol; diff --git a/include/linux/pm_opp.h b/include/linux/pm_opp.h index 76dcb7f37bcd..a08a1fb1ca2a 100644 --- a/include/linux/pm_opp.h +++ b/include/linux/pm_opp.h @@ -93,6 +93,7 @@ struct dev_pm_opp_config { * @u_volt: The voltage in uV for the OPP. */ struct dev_pm_opp_data { + bool turbo; unsigned int level; unsigned long freq; unsigned long u_volt;