From mboxrd@z Thu Jan 1 00:00:00 1970 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 547D4C001B3 for ; Wed, 5 Jul 2023 07:23:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232251AbjGEHXt (ORCPT ); Wed, 5 Jul 2023 03:23:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46078 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232230AbjGEHXs (ORCPT ); Wed, 5 Jul 2023 03:23:48 -0400 Received: from mail-ej1-x636.google.com (mail-ej1-x636.google.com [IPv6:2a00:1450:4864:20::636]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 723C210D5 for ; Wed, 5 Jul 2023 00:23:46 -0700 (PDT) Received: by mail-ej1-x636.google.com with SMTP id a640c23a62f3a-9939fbb7191so74577766b.0 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=BeeK9KzNnXwDENqVe8a5hjj5tESYk4Zedi4eAKh0ZqjBdekN9I4pQuFKc3iqv6CIye NyhA+mNGoBtThHrO/ssZmvK5AwBcW2ilvjOivjm8rqV7N2vdvfqkyqv3Azk6b53iDiQg 4BXXYauBUaQ38ROSYYmt+p9Ocr8/8Si2WMzqNLKfDkwHB2drlAe96qeavksLDwowsfwM MYHLF8lBxr1nLdDZmfvL7tW1tU9OzRLzpNdYEN+T2G+R/fZfFi5iheJSLKn1orQgfTJ1 q5fJ1nLB6Zk3Hdl/0UsE3746gsXSAFzF5xkKJNFKqfUR5Y8af8D+OSBJg8wX0yFCHG2i 9pbw== X-Gm-Message-State: ABy/qLbU3rlSvxk59qoCRgRqAAZMYc821PFEe64M7HTDtSqvH0klosK6 15aLeR8cdArssXK4Wz1/ngTm1A== X-Google-Smtp-Source: APBJJlHFN29jfTiNUx5sFWnNBEOCkG12dMSYS1/ng4NNgeX2L9P1cSy+erlCNqaNEgJair2vOCiZJw== 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 Precedence: bulk List-ID: X-Mailing-List: devicetree@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