Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp3889686rwd; Mon, 29 May 2023 19:20:59 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5/XhqAAsSMNhtKXQ9KqjAb5AkdKbypNuz1jgwEZKYB3wue9Zmeylx5MAdI22Yr5WpP8oc4 X-Received: by 2002:a05:6a00:16c7:b0:64f:85a9:3a20 with SMTP id l7-20020a056a0016c700b0064f85a93a20mr691117pfc.22.1685413259327; Mon, 29 May 2023 19:20:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685413259; cv=none; d=google.com; s=arc-20160816; b=t76tTMLoOTRhE6M9O3LaLtytlwxiJZ2jt1KM9XvyHIm3Bw/LjQD1jCnFBFQi3DTXqs q++zfzyn/gITLUPGWIinFjs5661dCvb859+Qa6AZb4XxQYvjM63ghUB9G68WSDVsDexw vZae7+ch29vxzLBVPLJodLOf74EJN2q6iaZpcSMLNAfaXSLRpq1vIQqfL7PhT6nekWZd zBRc1d24Zz459ngPYHfyVjZI7PQO/mF4YHqAeriPIu0kkE7EpzlPUOTwhwHUXaTIH4Kv 5K1k9M/3At9QLRIiw58kTEgZ+j/YuCjzTx8ifC9rHzVKW6Z+mmq/mPpmwnI0CDnE/u8O ftJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:references :cc:to:from:content-language:subject:user-agent:mime-version:date :message-id; bh=QwunZuTOtQkdfjQSHDr1EUjiN2WNanCJwjUCnMyAyMk=; b=POSe1/dlXxxrApAhoG947goF0jBfzBR0LFs6Qei+AN55Q4k/gwOv2iw7w5tJmndElp tLGcOA5hvWXgjjWxAaYBBdbuizW/IZSgIelfMcxPCA1db2HWqk8gn85abnCGyX642cQz CWCI+0mjR8qr544mi4B7iVxxdqeyJ1rD0fFcNc8H6Fs7CO4tohwVOsrQWGkaEMVnf7EK CSGsUQH+VVQmuhk+YPYLxCUMlbPEyrsDs5T5MOSy+c68UEAjxvI7AuXKn9UuYo/Tf/mh LZCRGpAt8GxboiSzjQj0ycYiUll//gj33ttpn0NcT1Pb0QXGgSHX7GVMqNtLoLkhvhLz h2JA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i129-20020a626d87000000b0063f2827e1dasi865632pfc.184.2023.05.29.19.20.47; Mon, 29 May 2023 19:20:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229586AbjE3CHB (ORCPT + 99 others); Mon, 29 May 2023 22:07:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47442 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230028AbjE3CG7 (ORCPT ); Mon, 29 May 2023 22:06:59 -0400 Received: from ex01.ufhost.com (ex01.ufhost.com [61.152.239.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 321ED1B4; Mon, 29 May 2023 19:06:26 -0700 (PDT) Received: from EXMBX166.cuchost.com (unknown [175.102.18.54]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "EXMBX166", Issuer "EXMBX166" (not verified)) by ex01.ufhost.com (Postfix) with ESMTP id B3D2424E271; Tue, 30 May 2023 10:05:39 +0800 (CST) Received: from EXMBX168.cuchost.com (172.16.6.78) by EXMBX166.cuchost.com (172.16.6.76) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Tue, 30 May 2023 10:05:39 +0800 Received: from [192.168.120.57] (171.223.208.138) by EXMBX168.cuchost.com (172.16.6.78) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Tue, 30 May 2023 10:05:39 +0800 Message-ID: <86555925-b8dd-29a8-60cd-5c2ff2c1432a@starfivetech.com> Date: Tue, 30 May 2023 10:05:38 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: [PATCH v1 2/3] spi: cadence-quadspi: Add clock configuration for StarFive JH7110 QSPI Content-Language: en-US From: William Qiu To: Mark Brown CC: , , , , "Rob Herring" , Krzysztof Kozlowski , Conor Dooley , "Emil Renner Berthing" , Ziv Xu References: <20230526062529.46747-1-william.qiu@starfivetech.com> <20230526062529.46747-3-william.qiu@starfivetech.com> <042c560d-1f36-8e97-3796-7423245592f4@starfivetech.com> In-Reply-To: <042c560d-1f36-8e97-3796-7423245592f4@starfivetech.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [171.223.208.138] X-ClientProxiedBy: EXCAS066.cuchost.com (172.16.6.26) To EXMBX168.cuchost.com (172.16.6.78) X-YovoleRuleAgent: yovoleflag X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2023/5/29 14:44, William Qiu wrote: > > > On 2023/5/26 23:36, Mark Brown wrote: >> On Fri, May 26, 2023 at 02:25:28PM +0800, William Qiu wrote: >> >>> if (of_device_is_compatible(pdev->dev.of_node, "starfive,jh7110-qspi")) { >>> + qspi_ahb = devm_clk_get(dev, "qspi-ahb"); >>> + if (IS_ERR(qspi_ahb)) { >>> + dev_err(dev, "Cannot claim QSPI_AHB clock.\n"); >>> + ret = PTR_ERR(qspi_ahb); >>> + return ret; >>> + } >>> + >>> + ret = clk_prepare_enable(qspi_ahb); >>> + if (ret) { >>> + dev_err(dev, "Cannot enable QSPI AHB clock.\n"); >>> + goto probe_clk_failed; >>> + } >> >> Nothing ever disables or unprepares this clock as far as I can tell? >> Perhaps also consider using the clk_bulk_ APIs. > > I will add in next version. > > Thanks for taking time to review this patch series and give useful > suggestions. > > Best regards, > William Hi Mark, Now I want to replace the original devm_clk_get API in the driver with devm_clk_bulk_get_all API, which can achieve compatibility, but it seems that it is not good for other ip with only one clock, so I want to ask about that can I replace it? Or define that inside jh7110? Best regards, William