Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp45877rwl; Tue, 11 Apr 2023 14:10:26 -0700 (PDT) X-Google-Smtp-Source: AKy350ZSr5hG6X5Eo4MRLW2TYtLuLFU4EY86jMEPfCFvsGxiiLj02judGQM5a9u5NT1N0P6bXnK5 X-Received: by 2002:a50:e713:0:b0:502:24a4:b0ad with SMTP id a19-20020a50e713000000b0050224a4b0admr15678071edn.4.1681247425629; Tue, 11 Apr 2023 14:10:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681247425; cv=none; d=google.com; s=arc-20160816; b=yzDxqp/JCxyrTuoPZ7gzmh7Uklwq8iwiGradmeFkxkX3fUutOnmQiw4kfNEZt8zxmq 80TyoVkC+clg+wgm8bYPkMjoQz3Q4OI2CX34ojye9hI1apOR9W+t5CKk7s6cjxj0DzaP XACTplLbOidO+6ljYJRFeQfrCDcvoX7U0FbRxSFQMJkTx6YPXMHMYQ00kEGC3d2QPbP9 lpoG+OAqQWcS6UwSULITSns90TBVq8P47urYAZVWcD1zw8YwF/a0dTefj7EiAV83XQ6a F+SIPX0PwpHN2OpMmBPe8s9bn3xVjY8K9JuncswjuXrmYrgDc114NgiuATFWbhx23fXt 4v9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=e7DWl5X4s3AHb7qf5hQlkj7iAPpy6fxZDNOwH1Q63eI=; b=mOoC4JduFFKI2Nu2u3T1PfwNCz8+1gOgRY5jKDcwQe3pfcP6TyPURRmhdrl5bbJZ+F b6ti19H+bFiu1LO7tL8yEaVcSFEbXUxtNZvPMfSMS+VSnyvSyYRqOeQfIcwfBHc92qVC mu+TZOqzBgZuulw1RTYA5sN16mkOVwNj1Gjr7e80Y3YmIo8Zks9XAiuhEiMRUNAu8Yw5 njHZGM9kJ0oHfyDI5rrWw4MA+Rm6a4S4iyOOb74hvATr/Q5y3rRhJUY0a/mL8srAK3tp NPN03zVQRMITeDaAQGGjpOO2rLrU2VuSwii+/woyXMmS0gbSdhD1gZwBgZ1VtCbuJ/90 CPAQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=PbIKZGOC; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z4-20020aa7cf84000000b0050479b46abcsi11038828edx.542.2023.04.11.14.09.59; Tue, 11 Apr 2023 14:10:25 -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=@kernel.org header.s=k20201202 header.b=PbIKZGOC; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229611AbjDKVG6 (ORCPT + 99 others); Tue, 11 Apr 2023 17:06:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32958 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229525AbjDKVG5 (ORCPT ); Tue, 11 Apr 2023 17:06:57 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 821194482; Tue, 11 Apr 2023 14:06:56 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 13FBC625C3; Tue, 11 Apr 2023 21:06:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3585AC433D2; Tue, 11 Apr 2023 21:06:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1681247215; bh=P5kk+3HVor0otYo94Y9G9N4eNK+mWyQxWEUIOko/rMY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=PbIKZGOCX/7fiRt1GpDSR+rtak3ggv7H77B2RxD/Hc77w1JmFPLR1dnH1REUEzfSQ DN0CCuxfM4QR88K9qVp3NoXzkSupq9iGFP3Fu6K3DNBxGB9ACEN4n6orD+FJ26IuEG oi2rdpOCAVYKY0n7TT4Yq9lTLW4F9anemxOGpe4/2cKSJXNV5gMPUs96t2v3y7Ebnb V/64xUxcPEfnuwKOZMo0ntcSqZlQAJWcLXAdHRE7TYxqNZ48q0f1j95flV/dmAE0B0 0HuDa55MzfNfqHNSM9NCfu5ml/xYvLPFi1S3thPEfiy5O2VdqkLL5evp3Ma1938+S6 9i+u/0/r8KceQ== Date: Tue, 11 Apr 2023 22:06:50 +0100 From: Conor Dooley To: Changhuang Liang Cc: Rob Herring , Krzysztof Kozlowski , Emil Renner Berthing , Paul Walmsley , Palmer Dabbelt , Albert Ou , Walker Chen , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org Subject: Re: [PATCH v1 5/7] soc: starfive: Use call back to parse device tree resources Message-ID: <20230411-stimuli-reapprove-4659d50e5d2e@spud> References: <20230411064743.273388-1-changhuang.liang@starfivetech.com> <20230411064743.273388-6-changhuang.liang@starfivetech.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="bDUiOgF7hkvaIlrf" Content-Disposition: inline In-Reply-To: <20230411064743.273388-6-changhuang.liang@starfivetech.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS 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 --bDUiOgF7hkvaIlrf Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Apr 10, 2023 at 11:47:41PM -0700, Changhuang Liang wrote: > Different compatible parse device tree resources work in different ways. Right now there is only one compatible, so this commit message needs to be expanded on to provide more information on your motivation. > Signed-off-by: Changhuang Liang > static int jh71xx_pmu_init_domain(struct jh71xx_pmu *pmu, int index) > { > struct jh71xx_pmu_dev *pmd; > @@ -296,23 +325,20 @@ static int jh71xx_pmu_probe(struct platform_device = *pdev) > if (!pmu) > return -ENOMEM; > =20 > - pmu->base =3D device_node_to_regmap(np); > - if (IS_ERR(pmu->base)) > - return PTR_ERR(pmu->base); > - > - pmu->irq =3D platform_get_irq(pdev, 0); > - if (pmu->irq < 0) > - return pmu->irq; > - > - ret =3D devm_request_irq(dev, pmu->irq, jh71xx_pmu_interrupt, > - 0, pdev->name, pmu); > - if (ret) > - dev_err(dev, "failed to request irq\n"); > + spin_lock_init(&pmu->lock); > =20 > match_data =3D of_device_get_match_data(dev); > if (!match_data) > return -EINVAL; > =20 > + if (match_data->pmu_parse_dt) { How can this be false? Cheers, Conor. --bDUiOgF7hkvaIlrf Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZDXL6gAKCRB4tDGHoIJi 0hKsAQDfXKLTbzKOVFnOKyo4Q8rhO79dEC4uKOIjSEkTkNr0sAEAmTPcrqwT9S1J id3pUSxlo+QqgTZJtIAEFaPBifiRGg8= =MAxW -----END PGP SIGNATURE----- --bDUiOgF7hkvaIlrf--