Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp793876rdg; Wed, 11 Oct 2023 05:56:08 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGV7+NEGwdSV+AuQtZWSgf2uhai4qqRqBhAPL+8fYPE13gCGlha9Rvp3CwuQhiEW/64e27w X-Received: by 2002:a05:6a20:5508:b0:14c:d494:77c3 with SMTP id ko8-20020a056a20550800b0014cd49477c3mr13098248pzb.33.1697028968520; Wed, 11 Oct 2023 05:56:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697028968; cv=none; d=google.com; s=arc-20160816; b=A5XESeWbcO9vhsBJvf9k2FznGvbIyXtzEsrF/oXbCbVI4ORKy3E6uTnhQnaQIyydeL 1UmzQ/dJymVXWNeSe110i8JVM3FLCi/k6xjpM2Suc743IeVFFkrvtmy89rIWOCA3p1YI elGEL3hdN+1MPeWIQTz6PzIHuXkTKYj6MjNSWVblTCLrBxLT1sGC4drgdfEx16vXzhrh CoB2+Cl/adY+zHKBE1mkXC4E2k0k8DaCn5XliBxdcw/bVIoBGM/hu+qhqNUy2KXcolES V4ZwBAJjcOfZSIzmMzp09ebS9FUnlRCBTaj0gVIZ3G+detV4QpF51HaGdJHIqmE2N8JX i5ww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=ZuD+kzTK3GMqMh4cRFD6FbY1OqwfVp6oqKPDZbwG/ng=; fh=1N2DBqAE4qlJ/MdmzyBAVyqZb6NxbBXSfjSgYrLDqv0=; b=xS2mvPbFyulNf1awmRRk7M/MMh5WUxnCL0xK3ZLer5TaEqA7JQpKcVzFBa2jh0ZH28 W1pznfCPylGgcicoWHLeq05NPuDP16dzrrVGx+jd7eU3SHP69jaVJPgdkyNPpk0Z9QGD J/NWlMjzrIg2JoD9VczCnTVgUVC/jtlN3Pt/JUNLWx0qlupGMQ3cchCrx0MktEZu6AEg l+u4Qae9IH+Qujadz3d9NEap/tYoMtc5nMOUNF+1ghJrTu9FuXLvy4LJuXYEfB/mCfTf rNrqqab2imHdpF8G+Oh4R9QWckVPw1Ryw96tBTSoRKfF5V9UMBYLJZ4H0cU1WMJ40q2u iP2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b="LVgDHsL/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id j3-20020a170903028300b001c61073b06bsi15133553plr.427.2023.10.11.05.56.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 05:56:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b="LVgDHsL/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 185668182DE6; Wed, 11 Oct 2023 05:55:59 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346938AbjJKMzd (ORCPT + 99 others); Wed, 11 Oct 2023 08:55:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34524 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346463AbjJKMza (ORCPT ); Wed, 11 Oct 2023 08:55:30 -0400 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E1FA993; Wed, 11 Oct 2023 05:55:27 -0700 (PDT) Received: from pps.filterd (m0279862.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 39BCOE3G022363; Wed, 11 Oct 2023 12:55:12 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=ZuD+kzTK3GMqMh4cRFD6FbY1OqwfVp6oqKPDZbwG/ng=; b=LVgDHsL/iILINAO1W8a8fMG/gy0K9Zyf2ttc/aHHioaOC1MDl7aKHPwrWOVO1toxNyps X2IWQ9b4BaWfykJugZxRGG12yPiOE+shQQzjECh8R1T86KSAQiw7qvPkS4+ITaYdcEnB rpaj/1EdaBEGug3kdmsQPFgFqLeMUhr6WerUjCvrqisXWaiLayiFXAni1Z59DCJ0qUYY UgJWJ9eeywmoFS88tFWejGkBG+/FuqQKaVYOjXrDN9uJ0jt0QLIB553r5/ty1/9733BS oItETKuX5nSzD/F9rCb3Kd407wlD4lihkgJDzzFxapdNko/CNYIIQttgWUSpD8RMCs2B UQ== Received: from nalasppmta03.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3tnmds91pf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 11 Oct 2023 12:55:11 +0000 Received: from nalasex01c.na.qualcomm.com (nalasex01c.na.qualcomm.com [10.47.97.35]) by NALASPPMTA03.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 39BCtBVC009419 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 11 Oct 2023 12:55:11 GMT Received: from akronite-sh-dev02.qualcomm.com (10.80.80.8) by nalasex01c.na.qualcomm.com (10.47.97.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.30; Wed, 11 Oct 2023 05:55:07 -0700 From: Luo Jie To: , , , , , , , , , , CC: , , , , Subject: [PATCH v10 1/4] clk: qcom: branch: Add clk_branch2_prepare_ops Date: Wed, 11 Oct 2023 20:54:44 +0800 Message-ID: <20231011125447.26530-2-quic_luoj@quicinc.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231011125447.26530-1-quic_luoj@quicinc.com> References: <20231011125447.26530-1-quic_luoj@quicinc.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01c.na.qualcomm.com (10.47.97.35) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: DBEIz4jYb-gL9XXRaIJ9c2CGHzhglg-Y X-Proofpoint-GUID: DBEIz4jYb-gL9XXRaIJ9c2CGHzhglg-Y X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.980,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-10-11_09,2023-10-11_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 bulkscore=0 lowpriorityscore=0 adultscore=0 suspectscore=0 clxscore=1015 spamscore=0 phishscore=0 impostorscore=0 mlxlogscore=791 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2309180000 definitions=main-2310110114 X-Spam-Status: No, score=2.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Wed, 11 Oct 2023 05:55:59 -0700 (PDT) X-Spam-Level: ** Add the clk_branch2_prepare_ops for supporting clock controller where the hardware register is accessed by MDIO bus, and the spin lock can't be used because of sleep during the MDIO operation. The clock is enabled by the .prepare instead of .enable when the clk_branch2_prepare_ops is used. Signed-off-by: Luo Jie Acked-by: Stephen Boyd --- drivers/clk/qcom/clk-branch.c | 7 +++++++ drivers/clk/qcom/clk-branch.h | 1 + 2 files changed, 8 insertions(+) diff --git a/drivers/clk/qcom/clk-branch.c b/drivers/clk/qcom/clk-branch.c index fc4735f74f0f..e22cdcf694f6 100644 --- a/drivers/clk/qcom/clk-branch.c +++ b/drivers/clk/qcom/clk-branch.c @@ -153,3 +153,10 @@ const struct clk_ops clk_branch_simple_ops = { .is_enabled = clk_is_enabled_regmap, }; EXPORT_SYMBOL_GPL(clk_branch_simple_ops); + +const struct clk_ops clk_branch2_prepare_ops = { + .prepare = clk_branch2_enable, + .unprepare = clk_branch2_disable, + .is_prepared = clk_is_enabled_regmap, +}; +EXPORT_SYMBOL_GPL(clk_branch2_prepare_ops); diff --git a/drivers/clk/qcom/clk-branch.h b/drivers/clk/qcom/clk-branch.h index 0cf800b9d08d..f6f355f28b71 100644 --- a/drivers/clk/qcom/clk-branch.h +++ b/drivers/clk/qcom/clk-branch.h @@ -85,6 +85,7 @@ extern const struct clk_ops clk_branch_ops; extern const struct clk_ops clk_branch2_ops; extern const struct clk_ops clk_branch_simple_ops; extern const struct clk_ops clk_branch2_aon_ops; +extern const struct clk_ops clk_branch2_prepare_ops; #define to_clk_branch(_hw) \ container_of(to_clk_regmap(_hw), struct clk_branch, clkr) -- 2.42.0