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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 26DE8CD1292 for ; Thu, 4 Apr 2024 07:55:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: In-Reply-To:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Reply-To:Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date :Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=fzYAguZMX4DZi8wRURxPkS2eVDNGHTFX9TgsODnfAek=; b=JYvRmd/I+kEQD8JJJemvLmA2Xy yLrq6sLRwjGIlP8rbZR173GXRV9vpWX7ZatYc2ME5C2K6DtbdHGaQdDFjAZNM+TOvv6D2lDomKYvN +ST1jsNMRFOuuMvMWzE8HK94YI7pYdbJa5Rt/gDHuPSK9mmE7slvm9YnW36Od2QLQtAGer0FE30++ QbzyQ5voZyVOxt21DPBS69eUw7X7xi5X9BCGsL/ZzhE1BvPJjxwp2b8Mw7fRVt2Jrs2XiQnZc9/Ay QsgXbXWUqYYSyYfI1yHRpi3S0hKsZkBWYSq0duTp3Y8K3utrkKCUiiUVbR9WgzrJAQoy9QNSfTWz8 mv8e0SyA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rsHwh-00000001irX-48Sn; Thu, 04 Apr 2024 07:55:39 +0000 Received: from sin.source.kernel.org ([2604:1380:40e1:4800::1]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rsHwe-00000001iqp-0Ikv for linux-arm-kernel@lists.infradead.org; Thu, 04 Apr 2024 07:55:37 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id C2433CE2F93; Thu, 4 Apr 2024 07:55:32 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8440BC433C7; Thu, 4 Apr 2024 07:55:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712217332; bh=NkrysVRINXxNDAy8IfExdhEZeYy7tThHP05gfrWMM50=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=NT7yD2OUfd0Zx1whJt4h7sW5i46qubWx6f/pyVBMCRAXziAYcs150IWGeMZ2vNvBA GL2bZpV7W0ON6dcfx8UWmjs/nj8A4ChJpPPRZUf9PLymj1zK7GTiw1ZLBpyLMhFULX a3icwhAi+vIEaZljtuo4iweqkad510DkfXdGbzEvJygizLblBI+32T4DNbJtUhzEo+ TIXO8Bhiqp1HaqOc4+Uz4KUmtKqH/jSCklzGfmpSsqjAs04Hqsn96A3jp2J1qRK+09 oFoh5OWJ/lTs+/KosvaT2diZ+8okVy1ZKyxHmxk69LlI8+W0tRgVCJl+UI1N1hhlno 1AajqlqVHf78A== Date: Thu, 4 Apr 2024 09:55:28 +0200 From: Lorenzo Bianconi To: Krzysztof Kozlowski Cc: linux-clk@vger.kernel.org, mturquette@baylibre.com, sboyd@kernel.org, linux-arm-kernel@lists.infradead.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, nbd@nbd.name, john@phrozen.org, devicetree@vger.kernel.org, dd@embedd.com, catalin.marinas@arm.com, will@kernel.org, upstream@airoha.com, lorenzo.bianconi83@gmail.com, angelogioacchino.delregno@collabora.com Subject: Re: [PATCH 4/4] clk: en7523: add EN7581 support Message-ID: References: <3aaf638b846ecfdbfc1c903206b7d519d56c9130.1712160869.git.lorenzo@kernel.org> <95d194ed-86fe-45df-88f1-ae460eb36eaf@linaro.org> MIME-Version: 1.0 In-Reply-To: <95d194ed-86fe-45df-88f1-ae460eb36eaf@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240404_005536_491595_BDF2DAF4 X-CRM114-Status: GOOD ( 19.13 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============6988389063693579016==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============6988389063693579016== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="eVV2+alm6WlfouHe" Content-Disposition: inline --eVV2+alm6WlfouHe Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable > On 03/04/2024 18:20, Lorenzo Bianconi wrote: > > Introduce EN7581 clock support to clk-en7523 driver. > >=20 > > Tested-by: Zhengping Zhang > > Signed-off-by: Lorenzo Bianconi >=20 >=20 > > + return 0; > > +} > > + > > static int en7523_clk_probe(struct platform_device *pdev) > > { > > struct device_node *node =3D pdev->dev.of_node; > > @@ -306,6 +413,12 @@ static int en7523_clk_probe(struct platform_device= *pdev) > > if (IS_ERR(np_base)) > > return PTR_ERR(np_base); > > =20 > > + if (of_device_is_compatible(node, "airoha,en7581-scu")) { >=20 > Having matching and compatible comparisons inside various code is > discouraged. Does not scale. Use driver/match data to store some sort of > flags and check for the flag or some other parameter. The best if > compatible appears once and only once: in of_device_id. ack, I will fix it. Regards, Lorenzo >=20 > > + r =3D en7581_clk_hw_init(pdev, base, np_base); > > + if (r) > > + return r; > > + } > > + > > clk_data =3D devm_kzalloc(&pdev->dev, > > struct_size(clk_data, hws, EN7523_NUM_CLOCKS), > > GFP_KERNEL); > > @@ -329,8 +442,15 @@ static const struct clk_ops en7523_pcie_ops =3D { > > .unprepare =3D en7523_pci_unprepare, > > }; > > =20 > > +static const struct clk_ops en7581_pcie_ops =3D { > > + .is_enabled =3D en7581_pci_is_enabled, > > + .prepare =3D en7581_pci_prepare, > > + .unprepare =3D en7581_pci_unprepare, > > +}; > > + > > static const struct of_device_id of_match_clk_en7523[] =3D { > > { .compatible =3D "airoha,en7523-scu", .data =3D &en7523_pcie_ops }, > > + { .compatible =3D "airoha,en7581-scu", .data =3D &en7581_pcie_ops }, > > { /* sentinel */ } > > }; > > =20 >=20 > Best regards, > Krzysztof >=20 --eVV2+alm6WlfouHe Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQTquNwa3Txd3rGGn7Y6cBh0uS2trAUCZg5c8AAKCRA6cBh0uS2t rBtrAQD0iODN7RFILBb+Bh8RsOOMOb+pGNq7xhHmco94eje0WAEArI+HEHPPkx4/ p0RtLik/EgPWLOJB8drSyuLE30H5Vg4= =oYsi -----END PGP SIGNATURE----- --eVV2+alm6WlfouHe-- --===============6988389063693579016== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel --===============6988389063693579016==--