Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp3632032rwb; Tue, 8 Nov 2022 06:47:20 -0800 (PST) X-Google-Smtp-Source: AMsMyM4ZSTXWRBUSGKnNb0dr4+jT4IimEJaXDGesWhxkZzzISkIpWB5mzHgP4bd8XBjCFLWEr3T5 X-Received: by 2002:a50:85ca:0:b0:461:168c:83ab with SMTP id q10-20020a5085ca000000b00461168c83abmr56194440edh.359.1667918840648; Tue, 08 Nov 2022 06:47:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667918840; cv=none; d=google.com; s=arc-20160816; b=YYQicNHaSCfqjPmrhHb6bP9IgK92blc4Os9AikcqnLsBEIOm+5Ru6lMPObmck0XqiW q3lSIjYS0JxmshS8iPT4Wgq5erd+16YZk2+gz3jrqBenM1e9UIvBed0eGTVDtqlQ8D5k jZmrcOFDoTHHACxP9zb3WsotIA0XBZnfaLSAUZN8TkDwv2c++KWTOA5Az1EK0REI0Bi+ /pAax+hXxvP3pL7d6ZG00tRNIYP9EZyCIiZtNikMaYlKOI7hQiJTw+O3+zAZChGRRlyZ UeROOqmG0BLyeZvGxXvBMu/e8jE4WndgskAxv+jFVlxfJCEM6g8ePmGLUZTA1o5Xq5+e 3/5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=xIunjndO5rqOpIPjGIQJB4TuLtmFYebQ0fOsvPNeO54=; b=vqS6ml2K6Hc0uAWw5y6bfcSkkXRQ+HFtnVqcDR48UYNU23NtIQqW5wB6z3m2vHXADt nQs9HRwXqY7a2pMLtXdsXKIR5Dkr0W5qBO7ERqHJJCnt3Ei42oHU0pCXtES/moQA3UBd lmxxErgMWdvndSutwz6cGHMbT6bBfwyMZph0Rr31ILFrh8YQkkFy3VpB1TDvW67xmUeP d1CKlTp6gxdIG+Y0UiGYgStHwsNkDMd625vM6fuOPNPqSnzwzDvfxr3HK2yib39Ya0Yw +OuJIhJFECa9amxoA/0zV5v5Y9ESpoNQRtyVMqK5AH9RNm636PH//ec8BSVUW3+bvd4t EjLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dY2KECnu; 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=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ga19-20020a1709070c1300b0078e9ca562d8si13211914ejc.879.2022.11.08.06.46.58; Tue, 08 Nov 2022 06:47:20 -0800 (PST) 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=@linaro.org header.s=google header.b=dY2KECnu; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233771AbiKHNZX (ORCPT + 91 others); Tue, 8 Nov 2022 08:25:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59522 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233681AbiKHNZS (ORCPT ); Tue, 8 Nov 2022 08:25:18 -0500 Received: from mail-ej1-x630.google.com (mail-ej1-x630.google.com [IPv6:2a00:1450:4864:20::630]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2B6471834A for ; Tue, 8 Nov 2022 05:25:17 -0800 (PST) Received: by mail-ej1-x630.google.com with SMTP id ft34so2228895ejc.12 for ; Tue, 08 Nov 2022 05:25:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=xIunjndO5rqOpIPjGIQJB4TuLtmFYebQ0fOsvPNeO54=; b=dY2KECnuVH7NYv0yOK7RrL62QdqUlhl2JmgS7xh7Aop7k+RcPrpLQgabXuGbHHpGQR eHydRYWR08BPIi0DGkFfFL5aziMJHQLfVfnBD+eU2h7KlhHzcO6P+1GLNOD4+iPtpIq9 f+xJ7woffKNTUf34ylHgwFwugM0mjDy+MNR+/tosLv90DX21VaSDgG9tpTl2KCuCdJUO uOa6Dv9G/jILV/FYPlkjsMzVEJLK96Ug7G7tfkWymeifahO0bdSmcFGNxzhRtu8RVMPO uhbfFCJ4Ya/DrkwEqdNt0sBFZZ7Pau3qynHAmgL94y0H0QvBHa6kKlb7zVfFQiDHP0ks 6ZQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=xIunjndO5rqOpIPjGIQJB4TuLtmFYebQ0fOsvPNeO54=; b=I+BIVu3/FDPN8Feig8x3QOzP5fQc6PYTOlLlKPY8yyMUgo0iAVccOOnTT1YPDyLg8k 17a6qgb0oDMXqxOFxqGSrXj4n9x0vOBjcgWbguGKOEIWMmU/jJoYFikozCdouMfK681x SdMBda8tCSzqu+ZICk1mokUsReirPl8KN6My0uFVBfEZlt2I7LqrJuc6SPYnWpww3zNJ 4rkAbbzg3b7F4MqU/16naM8knf6FXlIrT1Ow6c81qd0tiG84ShjifZkdVjSILh7CmBRB qmJ0kRYfUbieAFC/dVma0qk03MEMRE0R49VxBYpnPyIhYYBsfy9J+RJeO8fp9ZaQ9MgY tTtQ== X-Gm-Message-State: ANoB5pmmXaGTReOCxB+PPVzdYfKGgom2r4cJb9mvm5Oc14SKq5LfkEYk mreZMHqKRdYa2hWqgB5wuayPb5j4UzBkuibLMC59/g== X-Received: by 2002:a17:906:6acc:b0:7ae:658c:ee45 with SMTP id q12-20020a1709066acc00b007ae658cee45mr11184945ejs.190.1667913915716; Tue, 08 Nov 2022 05:25:15 -0800 (PST) MIME-Version: 1.0 References: <20221018-clk-range-checks-fixes-v2-0-f6736dec138e@cerno.tech> <20221018-clk-range-checks-fixes-v2-34-f6736dec138e@cerno.tech> In-Reply-To: <20221018-clk-range-checks-fixes-v2-34-f6736dec138e@cerno.tech> From: Linus Walleij Date: Tue, 8 Nov 2022 14:25:04 +0100 Message-ID: Subject: Re: [PATCH v2 34/65] clk: ux500: prcmu: Add a determine_rate hook To: Maxime Ripard Cc: Stephen Boyd , Maxime Coquelin , Chen-Yu Tsai , Daniel Vetter , Nicolas Ferre , Thierry Reding , Jaroslav Kysela , Shawn Guo , Fabio Estevam , Ulf Hansson , Claudiu Beznea , Michael Turquette , Dinh Nguyen , Paul Cercueil , Chunyan Zhang , Manivannan Sadhasivam , =?UTF-8?Q?Andreas_F=C3=A4rber?= , Jonathan Hunter , Abel Vesa , Charles Keepax , Alessandro Zummo , Peter De Schrijver , Orson Zhai , Alexandre Torgue , Prashant Gaikwad , Liam Girdwood , Alexandre Belloni , Samuel Holland , Matthias Brugger , Richard Fitzgerald , Vinod Koul , NXP Linux Team , Sekhar Nori , Kishon Vijay Abraham I , Takashi Iwai , David Airlie , Luca Ceresoli , Jernej Skrabec , Pengutronix Kernel Team , Baolin Wang , David Lechner , Sascha Hauer , Mark Brown , Max Filippov , Geert Uytterhoeven , linux-stm32@st-md-mailman.stormreply.com, alsa-devel@alsa-project.org, linux-mediatek@lists.infradead.org, linux-phy@lists.infradead.org, linux-mips@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-actions@lists.infradead.org, linux-clk@vger.kernel.org, AngeloGioacchino Del Regno , patches@opensource.cirrus.com, linux-tegra@vger.kernel.org, linux-rtc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, 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 On Fri, Nov 4, 2022 at 2:32 PM Maxime Ripard wrote: > The UX500 PRCMU "clkout" clock implements a mux with a set_parent hook, > but doesn't provide a determine_rate implementation. > > This is a bit odd, since set_parent() is there to, as its name implies, > change the parent of a clock. However, the most likely candidate to > trigger that parent change is a call to clk_set_rate(), with > determine_rate() figuring out which parent is the best suited for a > given rate. > > The other trigger would be a call to clk_set_parent(), but it's far less > used, and it doesn't look like there's any obvious user for that clock. > > So, the set_parent hook is effectively unused, possibly because of an > oversight. However, it could also be an explicit decision by the > original author to avoid any reparenting but through an explicit call to > clk_set_parent(). It is actually set up from the device tree, typically like this: /* clkout1 from ACLK divided by 8 */ clocks = <&clkout_clk DB8500_CLKOUT_1 DB8500_CLKOUT_SRC_ACLK 8>; So the parent (source) and divisor comes in there. clk->source and clk->divider is already set up when clk_hw_register() is called. So set/get_parent() is never used on clkout. I think I just added the callbacks for completeness, should we delete them altogether? The patch is probably fine as-is as well so Acked-by: Linus Walleij Yours, Linus Walleij