Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp28706273rwd; Wed, 5 Jul 2023 01:11:36 -0700 (PDT) X-Google-Smtp-Source: APBJJlHrLq6qnwiNxcPdzyTBcn+CxrJVTdLPb+BOJQdqUaxbOzJx5XAszoh7uiSG1uLWkPw/arhZ X-Received: by 2002:a05:6808:1409:b0:3a3:9965:19c5 with SMTP id w9-20020a056808140900b003a3996519c5mr11727223oiv.27.1688544696120; Wed, 05 Jul 2023 01:11:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688544696; cv=none; d=google.com; s=arc-20160816; b=MipiupAfyorqAitEF2Xa3Xzox/K3GKsVbZWoP4fDQkMvLy0A4Kg5ggJHwoZdEs5h5V vfIUAMoTHjCvAumSduvqtcU7xeAASYrLF13Q0fkTQPMgTkAuVLC3G2hjiZ987tWxlFMS LAN9TJXjx0Vkp0s4sirIHrzg/AFv/prU6TNQTc/XVlSa7Ltk5kimTRci0jg7vsrwK4vv v7RD3TawQ0JreszGu3W3F7lAlfLtXTXTsTPCETfqz1zEaMssMH7xAmHUIgkL54NehG0f VZTFYU0SGtcmd/7nhUO0TGg1IUHUnmUq7JPwAbU6Cr/4cGG3kKaYAY7s6bihBHXU+uz1 a1iw== 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:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=lfHsvDQ9gANPVD8NJhKIViMe2g10IPISfPCqc4m/wEU=; fh=JfxsS/DmyKHOd43flq7sJkz5eUNloh4dXWHLkZvBdDQ=; b=uLms0+irsfWsi3jID7/8D3Uq+hS58D/aF1PJTBMpC4cIhXtkRdxS4JPdJBJB6a/MqL +TKFcGhfk4DHwJ5jkFy1ZCn53/T08V5rclEC53b6JvtRRUtGbosQqy4ZbmrdN1X4KcoM B8b6h7yoq0FMQVaxL81+WBzEg6HUIaOgViXnCmXOZf1iaF90FgZulioeOT+RdS1/2UgW MoeLwOPHJWG81DSdyrgIlM0dtp506INKEYNFswezx6GdPG3QBmBdrxPer0WnTV132Zp/ /c+oz5GwmpvP5XUnGPsT7ReIKvZcddrTnPE+1iyIuVju91HJ4GHKR04nZTEzfWnNiGHJ orPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Kfs3hrRI; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a17-20020a17090a481100b0025c256add2bsi1096263pjh.49.2023.07.05.01.11.23; Wed, 05 Jul 2023 01:11:36 -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; dkim=pass header.i=@linaro.org header.s=google header.b=Kfs3hrRI; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232233AbjGEHXu (ORCPT + 99 others); Wed, 5 Jul 2023 03:23:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46074 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231769AbjGEHXs (ORCPT ); Wed, 5 Jul 2023 03:23:48 -0400 Received: from mail-ej1-x633.google.com (mail-ej1-x633.google.com [IPv6:2a00:1450:4864:20::633]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6032810C3 for ; Wed, 5 Jul 2023 00:23:46 -0700 (PDT) Received: by mail-ej1-x633.google.com with SMTP id a640c23a62f3a-9891c73e0fbso77422366b.1 for ; Wed, 05 Jul 2023 00:23:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1688541825; x=1691133825; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=lfHsvDQ9gANPVD8NJhKIViMe2g10IPISfPCqc4m/wEU=; b=Kfs3hrRItqd9Y7BwC9buaitUGmo3La9s/LDZVVR/eZeWRl8IXBxJUGjPl7VVSCujc4 mfprd+UZdPsiwiDulfVUBm42k3zIZFk2c4fPArW5zrAVI2Dabho9AZK1IHJMrTm4QxVc BJoNoUgcnQzmsm2UgcJ8fyOd/nky2Btk6Zg9nTbQiAK0zAD+h+1JMkW0tb62ZT+Cl9TN mywdoYAQe5n8zGTXANOeEHAh/Yz/tZiJoE1zmbIHzulY024fkIX501zAcRVU2asSUpfF xCoLzDOtM65yiuDgTzccaVxxRbur+k4Ym9PwPejDfPX84e8pyjbzfUd513EFn5tjvj7v 38jQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688541825; x=1691133825; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=lfHsvDQ9gANPVD8NJhKIViMe2g10IPISfPCqc4m/wEU=; b=FixoC6vC0w1FzWVZNuAZ6JMDjGTAhioR2fjscQMUo+m3QGBHpdmmNE5ggOsd0moQb8 h/K5+2bS5jeSTPJyFsZoyezpkx8vIg6+3dvWRFp/J6vPTGDUZyjLwDDRWy5R0bKvoj1Y oYyPJsCzx1IFHc6IWPNyLgJZ6N6kTywoB0r+CMHrJwmx5UxWvbw3D2rn8WJ1SIG8V8L2 NPf95cSMI6FkiJdK7wQBz9XDILtCibYfGy1Lff4VXbr0XcBRJrnooRdNIUESYyF/h8Kh iZqQdFFHppAq3LYruE08nihwhrMvH19OeIYsxdZw7FXLqtRIn4sZfqod0dVuLV1sXj3u rxoQ== X-Gm-Message-State: ABy/qLYrp/l/xMGo+7/MyomYh8SSSTwhr3HvD6I9rOH8MmlojK+Sta1P YHAytwj5IZUBqLzPNGbJtHoPIA== X-Received: by 2002:a17:906:2d1:b0:98f:8481:24b3 with SMTP id 17-20020a17090602d100b0098f848124b3mr1189990ejk.37.1688541824853; Wed, 05 Jul 2023 00:23:44 -0700 (PDT) Received: from [192.168.1.20] ([178.197.219.26]) by smtp.gmail.com with ESMTPSA id gw26-20020a170906f15a00b009929d998abcsm8546834ejb.209.2023.07.05.00.23.43 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 05 Jul 2023 00:23:44 -0700 (PDT) Message-ID: <175d03f6-122f-bbd2-5d38-61fe4022c5cd@linaro.org> Date: Wed, 5 Jul 2023 09:23:42 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: [PATCH v4 2/3] spi: cadence-quadspi: Add clock configuration for StarFive JH7110 QSPI Content-Language: en-US To: William Qiu , devicetree@vger.kernel.org, linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org Cc: Mark Brown , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Emil Renner Berthing , Ziv Xu References: <20230704090453.83980-1-william.qiu@starfivetech.com> <20230704090453.83980-3-william.qiu@starfivetech.com> <808dac44-a72c-4675-1e4a-0ed96190efb4@linaro.org> <90b55926-1d0c-b9c0-3020-5837e2028809@starfivetech.com> From: Krzysztof Kozlowski In-Reply-To: <90b55926-1d0c-b9c0-3020-5837e2028809@starfivetech.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 05/07/2023 09:04, William Qiu wrote: > > > On 2023/7/5 14:21, Krzysztof Kozlowski wrote: >> On 04/07/2023 11:04, William Qiu wrote: >>> Add QSPI clock operation in device probe. >>> >>> Signed-off-by: William Qiu >>> Reviewed-by: Hal Feng >>> Reported-by: kernel test robot >>> Closes: https://lore.kernel.org/oe-kbuild-all/202306022017.UbwjjWRN-lkp@intel.com/ >>> Reported-by: Julia Lawall >>> Closes: https://lore.kernel.org/r/202306040644.6ZHs55x4-lkp@intel.com/ >> >> >>> >>> @@ -1840,6 +1858,8 @@ static int cqspi_resume(struct device *dev) >>> struct spi_master *master = dev_get_drvdata(dev); >>> >>> clk_prepare_enable(cqspi->clk); >>> + if (of_device_is_compatible(dev->of_node, "starfive,jh7110-qspi")) >> >> Don't add compatible checks inside the code. It does not scale. We >> expect compatibles to be listed only in one place - of_device_id - and >> customize driver with match data / quirks / flags. >> >> Comment applies to all your diff hunks. >> > I'll use "of_device_get_match_data" to replace it. But the way I added > reset before is also by compatible checks. Should I change this place to > "of_device_get_match_data" as well? I don't know what's there, but in general driver should be written in a consistent style. Best regards, Krzysztof