Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp25828485rwd; Mon, 3 Jul 2023 01:22:46 -0700 (PDT) X-Google-Smtp-Source: APBJJlGTpVk4yeK4+HBPPn2GMKjRRZo9dNa7qmPn8s72j1sD9IJhJyifN1F0EzoP8UrTpHjeugCF X-Received: by 2002:a05:6358:9f9f:b0:134:d26c:4a97 with SMTP id fy31-20020a0563589f9f00b00134d26c4a97mr4501283rwb.23.1688372566069; Mon, 03 Jul 2023 01:22:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688372566; cv=none; d=google.com; s=arc-20160816; b=cVPJldFmfrE2ON8Egu14WZyywsRx+6iVVtugIm9ZfGcVTk+tmbnebcVdKDDghG7e9T 3Hnv7zuyYTbnCAZzo2nFFniiAFMDmHHqRIqAwwl5uWfF99Ru4dPuJ30DZBNDnBhbwGQN bTgETAp1RpYc5tiDcpppttyx3w366fkUXo162tKZvZy/H0t0AnGUZDWG/iL0Easy3ZzC 2a1HUdwuaziSCdhfzSYKO66TSI+NVflviNfCDY1FnMLsAeViZj97LZX6QoXb/xniiGiA W2RViCwRFkDz1DVJFly9ab5psSvGYbMmpPtNEnsINMtM+TO1Vao0OQ4JWVnfy5riuZEW kgOQ== 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:feedback-id :dkim-signature:dkim-signature; bh=fOiPJH964JbMWdWtw/Lr9kGAyKHEcXeffDI0IDClADA=; fh=+KcAhWSG9RzC2SvYVXgDzJ1nkcDBnTpIanTuJBxcWXo=; b=ULs0svzdA/w/rWNWTQyWCJMNqh/uyulOPufr8DWuuASHy/mU97mQhmBRtCxFqVahGv wwsyKWUKUOrJBPy8JqO/ozdlktCSeGb/AY0CVwdvJsAea9s22g0r3JY8frQJ1a1jBfC7 pfbTTXPQePSJ2pTDvga4X6kP54qWbWcwpFNo9Sb7LbsNRyzLQpAK2VzIwiYvpNbdE4QP lMfmaKX/Ic2Wr7swjS2uTlAtsUWuDBCx/zegFogPdCx5pOVuNgDhioUAt9/a0otvTywx cNMAIJt9GLsKdz1CmuVd0fW3ZKn+G1JL22NnYb/ZMBM94AH+OqqDgocSYWKyp0gmJ3Sy 7blQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cerno.tech header.s=fm2 header.b=5O0eNBSb; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=k5ZNUpnk; 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=cerno.tech Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s20-20020a632c14000000b0055ac5d0fc79si15494196pgs.648.2023.07.03.01.22.31; Mon, 03 Jul 2023 01:22:46 -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=@cerno.tech header.s=fm2 header.b=5O0eNBSb; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=k5ZNUpnk; 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=cerno.tech Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230006AbjGCHuQ (ORCPT + 99 others); Mon, 3 Jul 2023 03:50:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40794 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229581AbjGCHuN (ORCPT ); Mon, 3 Jul 2023 03:50:13 -0400 Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2AF3BC2; Mon, 3 Jul 2023 00:50:11 -0700 (PDT) Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 1541C5C0190; Mon, 3 Jul 2023 03:50:08 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Mon, 03 Jul 2023 03:50:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm2; t=1688370608; x=1688457008; bh=fO iPJH964JbMWdWtw/Lr9kGAyKHEcXeffDI0IDClADA=; b=5O0eNBSbTrxUjX2Ym5 2u/+TXoHE2iMdhZX+ASAVWARZj5IBBR4e6LlS2VMSj4qq7G0KRAVlcyChqscWeL1 7Gv2OxxhpEH0zRSYCNekH8XrQAzQmKaRH/PQBy1CKNGj6HeRBDyjSVFTnsMIvYLU 0MC7mkInIfkH8N6GeKImgYTaFwxgkoQ6OvjNTOV8cbFfdTDDF25pexDPe9S05WB/ xwAv8l7IsHSl9XgwawXulUOhD3Q5rCVT9foeNLtv38pZ3TsnbF+QvBds/y3mkhuN eRXJmdZONUuVVEp20TGJo9TIcJpY0GVvwrnwZMVIsfqPuzjLGBEi0I9HxKnX6cAq ThnA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; t=1688370608; x=1688457008; bh=fOiPJH964JbMW dWtw/Lr9kGAyKHEcXeffDI0IDClADA=; b=k5ZNUpnkNASHl1XDqlS0QZv9vvXJr 7Z1rRQXtqwyocnI/q3J8KaodIeVfDQjC/s5MP9qN0KyFq1nPd+Ss4yDaoPJiwEKH 1cuIF4YnOqEiZla8KBt/Gb/C+OL4pvDt5lQExuAhenB7s5DwJUVkPpZ6j8+xy4U7 CyY8wp6M9c4itQxebu/5/KM0IKcPxEGeoJzAhgmluzrwXGgRd75TM/lbEJClXxd6 13YOFWcM4GzADROWDLJJDij32zSyQdwm2ToZkzo5+CtL8aj1Ed+K8ldiheZ/cuEz jsHuqFO7RXFsSuYpXjzhGZtnZaiP07bODiTKe4yOuMbPj8TyzRbWonzkQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedruddugdduvddvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkfhggtggujgesghdtsfertddtvdenucfhrhhomhepofgrgihi mhgvucftihhprghrugcuoehmrgigihhmvgestggvrhhnohdrthgvtghhqeenucggtffrrg htthgvrhhnpeeuveduheeutdekvefgudevjeeufedvvdevhfejgfelgfdtkeevueegteek gfelfeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe hmrgigihhmvgestggvrhhnohdrthgvtghh X-ME-Proxy: Feedback-ID: i8771445c:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 3 Jul 2023 03:50:06 -0400 (EDT) Date: Mon, 3 Jul 2023 09:50:05 +0200 From: Maxime Ripard To: Frank Oltmanns Cc: Michael Turquette , Stephen Boyd , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Andre Przywara , Roman Beranek , linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 8/8] clk: sunxi-ng: a64: select closest rate for pll-video0 Message-ID: References: <20230702-pll-mipi_set_rate_parent-v3-0-46dcb8aa9cbc@oltmanns.dev> <20230702-pll-mipi_set_rate_parent-v3-8-46dcb8aa9cbc@oltmanns.dev> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="scpwnkcrk67jfkfn" Content-Disposition: inline In-Reply-To: <20230702-pll-mipi_set_rate_parent-v3-8-46dcb8aa9cbc@oltmanns.dev> X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,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 --scpwnkcrk67jfkfn Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sun, Jul 02, 2023 at 07:55:27PM +0200, Frank Oltmanns wrote: > @@ -541,7 +542,7 @@ static const char * const tcon1_parents[] = { "pll-video0", "pll-video1" }; > static const u8 tcon1_table[] = { 0, 2, }; > static struct ccu_div tcon1_clk = { > .enable = BIT(31), > - .div = _SUNXI_CCU_DIV(0, 4), > + .div = _SUNXI_CCU_DIV_FLAGS(0, 4, CLK_DIVIDER_ROUND_CLOSEST), > .mux = _SUNXI_CCU_MUX_TABLE(24, 2, tcon1_table), > .common = { > .reg = 0x11c, > @@ -549,6 +550,7 @@ static struct ccu_div tcon1_clk = { > tcon1_parents, > &ccu_div_ops, > CLK_SET_RATE_PARENT), > + .features = CCU_FEATURE_CLOSEST_RATE, > }, > }; I'm not super comfortable with having to set it twice for dividers (or composite clocks). Could we set CLK_DIVIDER_ROUND_CLOSEST automatically if CCU_FEATURE_CLOSEST_RATE is set? I'm guessing we would need it for muxes as well? Maxime --scpwnkcrk67jfkfn Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCZKJ9rQAKCRDj7w1vZxhR xfKdAQDoedHfL48OImEDGH6Me5/cxerV8zCFt0MPDatzDChGWAEAs70t/UrLzho6 FXnXOCNE5lVTqlIl/hE5si3bdNAfXwU= =lwbj -----END PGP SIGNATURE----- --scpwnkcrk67jfkfn--