Received: by 2002:a05:6358:700f:b0:131:369:b2a3 with SMTP id 15csp44384rwo; Tue, 1 Aug 2023 12:35:54 -0700 (PDT) X-Google-Smtp-Source: APBJJlHkfBcthmDHDilb52A5N+FQyPKwHdBeNkqYOeItmVtZcgo2351J8Q/qrQV83cE3cxEkZnuo X-Received: by 2002:a05:6a20:54a9:b0:13e:9dba:ea43 with SMTP id i41-20020a056a2054a900b0013e9dbaea43mr2665787pzk.2.1690918554555; Tue, 01 Aug 2023 12:35:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690918554; cv=none; d=google.com; s=arc-20160816; b=DgO3XD6Lp8mwwCsVYOvBDFEmWRi3eIO7dK9nqUDNIBr3jca64X2wjM6rnHsfvjCGTA rSsxShvr5wiOaxSEsbe2u23dcsO0w2mk8VVHqlX2D897HtuyyKY7mnDOUOZdmwhJP4wD CFul4ArHT1G5PDTTfkxSocAXFATHNIKH1Px6GejEtIGNr60sM9OGn/a1/4ST3l5oh8gC MDN9d2ktIpc+cwejMexV1Wzv/P1/dEqa5aiiQYjVRYRtQ1eZOtPtziJKWhHqxHNx5mJW LqhS6uFgL/4nznWduQvABVs1aFQijRq8lZdMOH9yhSBmoGqpzd93a44t5JLY9K34i1gz bSvw== 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=5jESSmx5vRHMKwm7Ax5lyaJqORqXvNmxEyi7vB7ISqg=; fh=qmgyw1+sCgyAn3SI0sVQsVNRfBwBIw+5qgigWDBJn34=; b=mgPTp4mp+4/Lf4fn5XAWjHxjO4nockXoVuSrYjWETK5yMadR13JJ0ivCrkvF9wrSC9 jeNBiTITLVbJYx/fHaXh33LZ6/7XZvG1jZmvgaybs89wMGNSK/kLhcW5jykpTzLCB2Xk mQspw6Mta/tau/4epadV3RdbRU6UchqZOTdyBNiiOTelp8wKogg24D/d7tLcOLI2RLum b7JahJQsq3iQsY4LWlEU4tqCkGUMualCT29T24+2sIQsNBLQhWKIr1WVz9WCGYUF5zC7 db0snv/Ik2fngUrmRRAN7QxzuYrydPNVX47c1YzPWrID7TJAIcj1L5fDJ5MVcb3L8sSR gCAQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZmhBbI6q; 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 n4-20020a632704000000b00563d579024dsi9198898pgn.875.2023.08.01.12.35.39; Tue, 01 Aug 2023 12:35:54 -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=ZmhBbI6q; 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 S232341AbjHATOx (ORCPT + 99 others); Tue, 1 Aug 2023 15:14:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48060 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231143AbjHATOw (ORCPT ); Tue, 1 Aug 2023 15:14:52 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9191F1BF0; Tue, 1 Aug 2023 12:14:51 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 2F965616A7; Tue, 1 Aug 2023 19:14:51 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 824A8C433C7; Tue, 1 Aug 2023 19:14:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1690917290; bh=RricL0NBD2SlXPu5D6K3MkV2NfI2Fl9g7qhLIB9lKzs=; h=In-Reply-To:References:Subject:From:Cc:To:Date:From; b=ZmhBbI6q1rH8SwBWw7Bxp58j12JA0u4tagm4I1spQ4hymiK8n+VSfZn4bnDxGQ5eZ zRTn75Ez47dqoWaZAC/USrqMPfbutYJpA39CcU3FzTLBDCEPbHVCDfqNZ5fHPNyVxi F8p1YiI9Q3oxsyXvYMH07aFZjDm0ZBXeOqRDiHtNkE4yBNMT12zQQypoQw/I2MS8CT 9iVPIC5awUS2tzXak5s1SBNF9fSL0887T4zOFPmsLfd7I13Vvi5Ya20JsFXa6JB2fj XC6b1TtXp+N/aGb6yueKNPuXaAKetcrrl1D/WntkFG00YSO5xydBVrzQ6jyiDJaa1k EpxBXA8mJ1DRg== Message-ID: <54b4d761e5b16ffb798a89c1cea99714.sboyd@kernel.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: References: <20230428190226.1304326-1-j.neuschaefer@gmx.net> <20230428190226.1304326-3-j.neuschaefer@gmx.net> <4e0a5db18ed7d37038e67be0f1ddcb08.sboyd@kernel.org> Subject: Re: [PATCH v8 2/2] clk: wpcm450: Add Nuvoton WPCM450 clock/reset controller driver From: Stephen Boyd Cc: Jonathan =?utf-8?q?Neusch=C3=A4fer?= , linux-clk@vger.kernel.org, openbmc@lists.ozlabs.org, linux-kernel@vger.kernel.org, linux-watchdog@vger.kernel.org, devicetree@vger.kernel.org, Michael Turquette , Rob Herring , Krzysztof Kozlowski , Avi Fishman , Tomer Maimon , Tali Perry , Patrick Venture , Nancy Yuen , Benjamin Fair , Daniel Lezcano , Thomas Gleixner , Philipp Zabel , Wim Van Sebroeck , Guenter Roeck , Christophe JAILLET , Joel Stanley To: Jonathan =?utf-8?q?Neusch=C3=A4fer?= Date: Tue, 01 Aug 2023 12:14:48 -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 Jonathan Neusch=C3=A4fer (2023-07-22 08:15:43) > On Thu, Jul 20, 2023 at 05:02:15PM -0700, Stephen Boyd wrote: > > Quoting Jonathan Neusch=C3=A4fer (2023-04-28 12:02:26) > > > diff --git a/drivers/clk/clk-wpcm450.c b/drivers/clk/clk-wpcm450.c > [...] > > > +static unsigned long wpcm450_clk_pll_recalc_rate(struct clk_hw *hw, > > > + unsigned long parent= _rate) > > > +{ > > > + struct wpcm450_clk_pll *pll =3D to_wpcm450_clk_pll(hw); [...] >=20 > > > +static const struct wpcm450_pll_data pll_data[] =3D { > > > + { "pll0", { .name =3D "ref" }, REG_PLLCON0, 0 }, > >=20 > > This is new code, please don't use .name. Instead use .fw_name or .inde= x with preference to > > .index first and .hw if the pointer is available in this driver. >=20 > As far as I can see, .fw_name and .index depend on a struct device* > being passed to clk_hw_register, which won't be available unless I > actually convert the driver to a platform driver. You can call of_clk_hw_register(), but a conversion to a platform driver is preferred. >=20 > Not relying on .name would indeed be nice. Cool.