Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp356994rwd; Mon, 12 Jun 2023 14:54:08 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6fU1rf1N5ZHGwdu+wAg1L+tz576QxJcARMlO+35j4xHeFrUSI7awBPoyLm3T6OKhXtoVbw X-Received: by 2002:a17:907:7d8f:b0:97d:2bcc:47d5 with SMTP id oz15-20020a1709077d8f00b0097d2bcc47d5mr9064781ejc.49.1686606848153; Mon, 12 Jun 2023 14:54:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686606848; cv=none; d=google.com; s=arc-20160816; b=smZtxfNRT/Uq7rQFY2JOnn1JyBkI+FzMVh4ClRjU/FzJFIDIoRFCzF7u4woaqKqr9f eXiihSdLcP5UB1EfuR/qjngvvpaHDk27fenMlzhVKrVICjfoCtbYT24bL57LCGsr8Dxg e4NZ3gv0RkfNrXadoRe18OrKHEsGNhj5IE16M/FFWVs4+ZY2tScGRqr+SmGRwFe5XoAH 9ZszZAv2f7kmjrHGozfWPZBsujf2gXRA5NsL909zh6OjsXBokSPm1E2CmLSCzAytgH7J hJztln/k6VCxhTiagnS2VGluDU1S/eEfDt0/CNGi0nEXHc8SRWEIVEkiFi7mIacw4wHn YD1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:date:to:cc:from:subject:references :in-reply-to:content-transfer-encoding:mime-version:message-id :dkim-signature; bh=pW+2HhRl8G0UCJqWx3NwfAzoCRzjUOFPNkG02u9jq5Q=; b=DbXzrw+O16SnZQ3CqtWA4msuuJwnPBaD3O7SGxXAlJp7NxTCuC7iB98vnJDhhmhYY8 JhFYeRP/O2GOfRrLTEBfHo4zusLi+rkrFr2ihIKH/GwCT7cIThWxwWPPSDyzzYZmi+vs szY3SmBWKg6uG561kzBExLI381Il0zgcXVQ0qkyAxZ9uE8aKwfxSYizKiRshyeyZjiDU WYmVlO/EBiFRcRTtbDFENl0KiBhay0PwEnszVmvhhdM/DbgatzB6/DmxUbgvbn5An1qG 4/Ux43eu0b5Pk/30WfsfPEBJYjgQXfCuL10t1v0bZljRGfFmO5ldfS3kNYssjYiKeR3T AzVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Tlc1PrpA; 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 d24-20020a170906345800b00975786d299fsi5615957ejb.941.2023.06.12.14.53.43; Mon, 12 Jun 2023 14:54:08 -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=Tlc1PrpA; 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 S237637AbjFLVjF (ORCPT + 99 others); Mon, 12 Jun 2023 17:39:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51336 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237581AbjFLVjE (ORCPT ); Mon, 12 Jun 2023 17:39:04 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1D64CAA; Mon, 12 Jun 2023 14:39:04 -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 AEDF1622CA; Mon, 12 Jun 2023 21:39:03 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EC549C433D2; Mon, 12 Jun 2023 21:39:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1686605943; bh=pW+2HhRl8G0UCJqWx3NwfAzoCRzjUOFPNkG02u9jq5Q=; h=In-Reply-To:References:Subject:From:Cc:To:Date:From; b=Tlc1PrpAu9wjqw8Fkzfc+oS2N8lHAgOIwryOA4WMifO5dLmJ3nY061GaDnoBt6wfP LeplpF+cbcICriSYrXTgM0o68hNlZ/lekCbzHsND6G+TGzHyDgOdBb3C29d6dWm/sW AzTaUoNwg7kNC5aXZi1BLJbVpbhB1YUUKNuKoITSXUWFS3aVF1hdW6Vhtjo7sFzP2o dsM95/IBA7W28ctT1tIZHKqAW9yfo8HqisbRzqh8HB/MYTKVfhVOcnu/ZiDzVSs5me Sy+BJ1aBv7YfvcWMGxuQCR9Fdlxc7nb8JUYpDJUQd54ksw6fUFRVHBnolKSNd/onf1 gZ3VRiWW0DZAg== Message-ID: <69a0b07442116b52e359534d93433f55.sboyd@kernel.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: <20230529133433.56215-1-frank@oltmanns.dev> References: <20230529133433.56215-1-frank@oltmanns.dev> Subject: Re: [PATCH] clk: fractional-divider: Improve approximation when zero based From: Stephen Boyd Cc: Frank Oltmanns , Abel Vesa , Peng Fan , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Jacky Bai , Anson Huang , linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org To: Frank Oltmanns , Michael Turquette Date: Mon, 12 Jun 2023 14:39:00 -0700 User-Agent: alot/0.10 X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,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 Quoting Frank Oltmanns (2023-05-29 06:34:33) > Consider the CLK_FRAC_DIVIDER_ZERO_BASED flag when finding the best > approximation for m and n. By doing so, increase the range of valid > values for the numerator and denominator by 1. >=20 > Cc: A.s. Dong Signed-off-by: Frank Oltmanns > --- > I stumpled upon this, when familiarizing myself with clk drivers. Unfortu= nately, > I have no boards to test this patch. It seems the only user of this flag = in > mainline is drivers/clk/imx/clk-composite-7ulp.c, therefore I'm cc-ing > get_maintainers.pl --git-blame -f drivers/clk/imx/clk-composite-7ulp.c > in the hopes of a wider audience. >=20 > Thank you for considering this contribution, Thanks for looking at this. Can you add a kunit test (or a suite of tests) to confirm that this doesn't break existing functionality and also improves a case that would have failed or been suboptimal before?