Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp1055912iog; Wed, 29 Jun 2022 16:16:47 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uiDvhKiP07xWa+UuhrNlZ2CIMMZqwVjV8OGqVU+TNBKdUz6AdvmlB8dZ22IkJ1FqHOj1Dy X-Received: by 2002:a17:907:97d0:b0:726:ccd3:1757 with SMTP id js16-20020a17090797d000b00726ccd31757mr5732446ejc.399.1656544607203; Wed, 29 Jun 2022 16:16:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656544607; cv=none; d=google.com; s=arc-20160816; b=tPoOV3jLVxBhiK8DEDV15tUzuBMOZktgfE+wdp/Uoc/GBbCZXuzODCiRdtR+Gdw47o JFo6uBdAxb43o4CCfU5b9DEiHPg4su292FanVUESiDg2Mid9svtNMmHICzTYgRoCxUJy 57yiBQO/LA2v0vdMZs+IbgFp67Ved7h0tXhTKp5iPydyzvq7N+BUhn0H1tTfw3mlaoLr XVrM5n9cKvVL70/Z0EQQcPrkCyDpJ5sgPqR9CQHuO3is1U7Y127oLoJUxK5LocGvSAfj BZYrT0sTcA/zSIh8rb6+GkxGRRilVU/rcij+GbBLzd+bKaSFPN2MxmMzS1UoS2uJuWBX NNIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=G7jsQpKIAilIcdtocyjJWYeKNXrL7qFyKZLfDj6G9/A=; b=GmrmamuyhJ8WZab2hpHzDBT/7ts4qUI+EoqRvCjUb8350O4nIWSYHrvd2GYC3nbhsr RQwc9oBAZCYXpZymG4UDgMknMJZkARHmBgJL+RzNvuZuAngU+ZesyUUWqG1fLvCsT/fm jILK0a1pb9pU7hx8LGo+RszLoc9GaEoFVhTX3hHJ6Y8JgLL0glkrqpJUcTUelt7WBtff atGTWZy8Vto91lLFhHldR0psURQmO1i2aSb5IInv0mSljgt5ed6Ws5BGeZx2Z8uOKsK1 1FaMkhOBv+3nX+1jJRM6xgERGd849G9MJJsHQigqKeht7zVvOeb7jb+P4b10hA8oCjMi 1QSA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gs16-20020a1709072d1000b00726258680desi21823504ejc.418.2022.06.29.16.16.22; Wed, 29 Jun 2022 16:16:47 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229715AbiF2Wxi (ORCPT + 99 others); Wed, 29 Jun 2022 18:53:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35494 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230099AbiF2Wxh (ORCPT ); Wed, 29 Jun 2022 18:53:37 -0400 Received: from relay08.th.seeweb.it (relay08.th.seeweb.it [IPv6:2001:4b7a:2000:18::169]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8E73B248FD for ; Wed, 29 Jun 2022 15:53:35 -0700 (PDT) Received: from Marijn-Arch-PC.localdomain (94-209-165-62.cable.dynamic.v4.ziggo.nl [94.209.165.62]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by m-r2.th.seeweb.it (Postfix) with ESMTPSA id 832913F7DC; Thu, 30 Jun 2022 00:53:33 +0200 (CEST) From: Marijn Suijten To: phone-devel@vger.kernel.org, Dmitry Baryshkov , Stephen Boyd Cc: ~postmarketos/upstreaming@lists.sr.ht, AngeloGioacchino Del Regno , Konrad Dybcio , Martin Botka , Jami Kettunen , Marijn Suijten , Michael Turquette , Rob Clark , Abhinav Kumar , Sean Paul , David Airlie , Daniel Vetter , Rajeev Nandan , Vladimir Lypak , Jonathan Marek , linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org Subject: [PATCH v3 01/11] clk: divider: Introduce devm_clk_hw_register_divider_parent_hw() Date: Thu, 30 Jun 2022 00:53:21 +0200 Message-Id: <20220629225331.357308-2-marijn.suijten@somainline.org> X-Mailer: git-send-email 2.37.0 In-Reply-To: <20220629225331.357308-1-marijn.suijten@somainline.org> References: <20220629225331.357308-1-marijn.suijten@somainline.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, 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 Add the devres variant of clk_hw_register_divider_parent_hw() for registering a divider clock with clk_hw parent pointer instead of parent name. Signed-off-by: Marijn Suijten Reviewed-by: Dmitry Baryshkov --- include/linux/clk-provider.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h index 72d937c03a3e..f3f2ae1229f8 100644 --- a/include/linux/clk-provider.h +++ b/include/linux/clk-provider.h @@ -831,6 +831,25 @@ struct clk *clk_register_divider_table(struct device *dev, const char *name, __devm_clk_hw_register_divider((dev), NULL, (name), (parent_name), NULL, \ NULL, (flags), (reg), (shift), (width), \ (clk_divider_flags), NULL, (lock)) +/** + * devm_clk_hw_register_divider_parent_hw - register a divider clock with the clock framework + * @dev: device registering this clock + * @name: name of this clock + * @parent_hw: pointer to parent clk + * @flags: framework-specific flags + * @reg: register address to adjust divider + * @shift: number of bits to shift the bitfield + * @width: width of the bitfield + * @clk_divider_flags: divider-specific flags for this clock + * @lock: shared register lock for this clock + */ +#define devm_clk_hw_register_divider_parent_hw(dev, name, parent_hw, flags, \ + reg, shift, width, \ + clk_divider_flags, lock) \ + __devm_clk_hw_register_divider((dev), NULL, (name), NULL, \ + (parent_hw), NULL, (flags), (reg), \ + (shift), (width), (clk_divider_flags), \ + NULL, (lock)) /** * devm_clk_hw_register_divider_table - register a table based divider clock * with the clock framework (devres variant) -- 2.37.0