Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp919645rwd; Tue, 13 Jun 2023 02:07:00 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4nLFXOGuk8/CV184qGRhEDTHraQKkBpyV5kPJGN0nehB+Bqc6g73b+O60qv1ht0ERI6uao X-Received: by 2002:a05:6402:4d6:b0:518:72b8:1fe9 with SMTP id n22-20020a05640204d600b0051872b81fe9mr1077809edw.25.1686647219784; Tue, 13 Jun 2023 02:06:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686647219; cv=none; d=google.com; s=arc-20160816; b=DsUMt1rJnwgZeReW4dnS/HbvPbQrsAuS6CdfMst5aB/NADtlL+G+jXxnAZgfPvtKTk W5cq8c26m48dmo3ik+qTSXVUzg5y4ToeaDEgRMQyJLFA4+Yc6LuwAMJX631ZXfBFSI8Z A496VF4W9/EoGxgH2Ar3Ris17j1Zgws6G68G5Z1TVG3uhpHCTlwZb8gyxUT1FqPLXiTt qXaAxkXhMDR76/hZmkCoKNIjqenKn3kzr9Cgg6B2Yzrh27wGB8JCqhmP123qxLhoFzyu JdzyW2J+uNBLGHKck0MMgplCdbrrGPMbQjeTMcYKr3TugCcwJma4PE5tvS1paorEGh+5 tg/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:in-reply-to:subject :cc:to:from:references:dkim-signature; bh=F4YR6IC11dblIqgF9IfE7gEo2pRgRczWDAIr1+EuyLQ=; b=Pb5qBVtGbJ0/3dMeQDlGIOiXT3CJQAIOzaJz8RGsg9aNVusLJugiKo4hhb4lVf/oez XqG7ljSLV7JbWX95PpHec//MxrDw+x7kCLOYVmVDJSgoTlilqmqbHAwf+JV4A0gAFkyG XGoBb8cAMHZiofvdOqhYdFtMLqyR/w/QH9wAYCbNob00u7Q7UTFd+SB2s6FiF9bNXYzD 9/ujej8YkpPDa0SbzTKPQgfh29VtMNDMswAaiO4JX29Xz7xRjhdn5uF8k5dntyh5x0u/ tuRfs6nxKz4AlkYPU7yWV1BWGvY4WgphjfVlcckElVxVobc3KZ79MxxiXCEeTNpx6NqK J62A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oltmanns.dev header.s=MBO0001 header.b=uHu3KnFj; 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=oltmanns.dev Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s20-20020a056402165400b00506758661fdsi7251184edx.618.2023.06.13.02.06.35; Tue, 13 Jun 2023 02:06:59 -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=@oltmanns.dev header.s=MBO0001 header.b=uHu3KnFj; 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=oltmanns.dev Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241818AbjFMIln (ORCPT + 99 others); Tue, 13 Jun 2023 04:41:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49808 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241695AbjFMIky (ORCPT ); Tue, 13 Jun 2023 04:40:54 -0400 X-Greylist: delayed 243 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Tue, 13 Jun 2023 01:40:45 PDT Received: from mout-p-102.mailbox.org (mout-p-102.mailbox.org [IPv6:2001:67c:2050:0:465::102]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BD8E7A0; Tue, 13 Jun 2023 01:40:45 -0700 (PDT) Received: from smtp1.mailbox.org (smtp1.mailbox.org [IPv6:2001:67c:2050:b231:465::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-102.mailbox.org (Postfix) with ESMTPS id 4QgMT62WB0z9smX; Tue, 13 Jun 2023 10:40:42 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oltmanns.dev; s=MBO0001; t=1686645642; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=F4YR6IC11dblIqgF9IfE7gEo2pRgRczWDAIr1+EuyLQ=; b=uHu3KnFjumsj3KVvsIxFa5qbz7R5TJoEBx6uzPIP9sPj+t/s4QhN2PBRzU9hQ3Z1ukHlk6 K5E3nwo9JPvEUni832RmtTxLZ4ajKne4JDpllxjTjtJtpa3/70x5VrUlzIAxCmRs0FITXB IAQsd9Cydes9Jys/2+edOYNSq/kVAoMn5Rpe1XGI5TyYZdrT/YZuPSMFJOQhrkTaemDZFL /6hF8VNRzVG0rBZEvJ+vZWyIpNeKyHJvp/Tg+fcjpz0ooTk3XLXtV/+1TirGKKDyU5qEAd ZcWbBi7Fs+uVLpC6+hZ2gZCYP2BTX7d9483Apo2SgMjGX+H7Ii+cRDM3ZzKLfQ== References: <20230529133433.56215-1-frank@oltmanns.dev> <69a0b07442116b52e359534d93433f55.sboyd@kernel.org> From: Frank Oltmanns To: Stephen Boyd Cc: Michael Turquette , 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 Subject: Re: [PATCH] clk: fractional-divider: Improve approximation when zero based In-reply-to: <69a0b07442116b52e359534d93433f55.sboyd@kernel.org> Date: Tue, 13 Jun 2023 10:40:33 +0200 Message-ID: <875y7r21ry.fsf@oltmanns.dev> MIME-Version: 1.0 Content-Type: text/plain X-Rspamd-Queue-Id: 4QgMT62WB0z9smX 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,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 Hi Stephen, On 2023-06-12 at 14:39:00 -0700, Stephen Boyd wrote: > 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. >> >> Cc: A.s. Dong > Signed-off-by: Frank Oltmanns >> --- >> I stumpled upon this, when familiarizing myself with clk drivers. Unfortunately, >> 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. >> >> 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? Thank you for your feedback, I've submitted a V2 that contains the tests: https://lore.kernel.org/lkml/20230613083626.227476-1-frank@oltmanns.dev/ Thanks, Frank