From patchwork Wed Mar 24 15:18:21 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 407864 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp501804jai; Wed, 24 Mar 2021 08:19:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxEFdFqOtbcV1Q5RRlFM4z19rLrm/VZqt7Bh5izQQo3gI940ygKFNmrp3hUW0rH65KBqtdz X-Received: by 2002:a17:902:da81:b029:e5:de44:af5b with SMTP id j1-20020a170902da81b02900e5de44af5bmr4030954plx.27.1616599158087; Wed, 24 Mar 2021 08:19:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616599158; cv=none; d=google.com; s=arc-20160816; b=yfu68CcAE9+yy8ukDIoeIkz0JdmFcDPdNti+gfxUaM29CXHoOXQB1Sn9kJXB9NDm4F q/S3OXydu5Kp7RmgQskaLE2rCy99hJhqn+l+Xn0UQ2BfZW6btxoJdSfDo2OsHt1TWXfL 5Y3lGETc222rEVKJUG54zIHPhGju9vizXvqt/5VVIdHkBq7gd9sGdO0E6Z/lowESAMld xigDS5LOsyD9X/C09XnT+8ge+p2KlWgekDEoqTlu5tcYQQKv3hLD6UTCFdllcSCI/CEm dRx4OeRijfxsSYE82hFgRkEj6+mfpeLO1apqynh7BX18IeZ+6/8P2ybiBmAUc5zDBFdL aWlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mime-version:references:in-reply-to:message-id:date :subject:to:from:dkim-signature:delivered-to; bh=SKOT36tiD63IWoJH2yc3UyGzig1CopoxFk37/pE0Mpo=; b=WrUgkaHuvbT7lSR/lrOOjZhc/zbme7LrrMW4YVinnIC95gwDOlYJTRILZVhBYWSBMd bFS8CwVjdWJyMQqtfEoHU0Cn6PovrbEik655V5Hhhq7OanR/1ZnULCngpBFwNAdUOpHA P6p6Q9LNSzMTqUFSUwbu4lfG358FgP88K6hLCaXG/ulvHXgkPOYkTDy1Nc3wP8HdcRJX 4GnUGxgj8VeF0G3qG3TYQ+dk8YjRJcnut/xdfwkCzmkMS0GquY6HarR7kvpe9/iUSvbg yDAOWMifTNUdniSArk6zhOzIjr4BzKN+YrTOi+nmql5j6Es3wT0cQfheWjw0gDK5j+sf dhRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=v97pfOc4; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id j7si2369488pfj.339.2021.03.24.08.19.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Mar 2021 08:19:18 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=v97pfOc4; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 469AD6EC1A; Wed, 24 Mar 2021 15:19:12 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lj1-x236.google.com (mail-lj1-x236.google.com [IPv6:2a00:1450:4864:20::236]) by gabe.freedesktop.org (Postfix) with ESMTPS id BE71C6EC1A for ; Wed, 24 Mar 2021 15:19:11 +0000 (UTC) Received: by mail-lj1-x236.google.com with SMTP id u20so30645294lja.13 for ; Wed, 24 Mar 2021 08:19:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=PBXzeZeDyvQyLPoNa1KGeI/poAISjCxdb5q3SKcFJsU=; b=v97pfOc4wkHEYLNV13IKhZN4dNBeU79Lu9y2VS+lBjB12QYlkvwkgu5zYE9OCOosLl BBGF0NeD6RdbhyA4ZSLoAWj57W6+NeHbE4i9klTOV1u2ZYpSnl3jBmmAOF2jtqH+a6B5 7XIdCG37smDlqai4oAnutXmDnP5F7+xNN1t4Sqoqg61BMea2j9G+33R/V97EjyytAm4+ WTllpBHpiT/zceAldkY5KNC2sx6XJyJl8imGEpWR1Z84pSSwo4FJ3yJuGHsIjmd3RK+q hzrGdGq9n6RD9MQJKAZrDguHacli8bMQQd2tDY7UX62AbZbhdwV36Cdus3DI7C4D7ZXR +AuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=PBXzeZeDyvQyLPoNa1KGeI/poAISjCxdb5q3SKcFJsU=; b=Xc3aPduSZee9Org4Rl4rEdZIAn8dJGMQxpJWvIMs/a4uZ70lF7c3ni18yDk3fEaXpj 1MU2TEzJ82iNx2W1PJ+mLPtBOXd+K3pteUKNgZl/aXYjZO5g8PO319zRjF3hC2gfpwFH /G/UsTEBaEcmo6MkzZZXGzDQJWzbc64ov9vPv4o2gn9z02uZH3mwGGcXjjTRmG5J/Lox I1RLKnyIkGTIYbEzMXz2Cv5EdoZmrW8TXH5Yjbd4zuMLwqm5D6ejYi5BAXIh11X3zY9V b60gktAzJHgglenIIyHqN+qQlim02UgOc028DSgsf63da9SW1u2w2EXcHbzmfiCMx0/N Ukvg== X-Gm-Message-State: AOAM531x3uZNIg9frvaKO87+gueFJkY8kiiif6XBwN1qIlTKzdVR+Odb vEP4l8SupHaYBjz4DXo5y/MM0w== X-Received: by 2002:a2e:7301:: with SMTP id o1mr2429148ljc.42.1616599150228; Wed, 24 Mar 2021 08:19:10 -0700 (PDT) Received: from eriador.lan ([37.153.55.125]) by smtp.gmail.com with ESMTPSA id d22sm255199lfm.267.2021.03.24.08.19.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Mar 2021 08:19:09 -0700 (PDT) From: Dmitry Baryshkov To: Rob Clark , Sean Paul , Jonathan Marek , Michael Turquette Subject: [PATCH v2 03/28] clk: divider: add devm_clk_hw_register_divider Date: Wed, 24 Mar 2021 18:18:21 +0300 Message-Id: <20210324151846.2774204-4-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210324151846.2774204-1-dmitry.baryshkov@linaro.org> References: <20210324151846.2774204-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Stephen Boyd , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, David Airlie , freedreno@lists.freedesktop.org, linux-clk@vger.kernel.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Add devm_clk_hw_register_divider() - devres version of clk_hw_register_divider(). Signed-off-by: Dmitry Baryshkov --- include/linux/clk-provider.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) -- 2.30.2 _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h index 3eb15e0262f5..162a2e5546a3 100644 --- a/include/linux/clk-provider.h +++ b/include/linux/clk-provider.h @@ -785,6 +785,23 @@ struct clk *clk_register_divider_table(struct device *dev, const char *name, (parent_data), (flags), (reg), (shift), \ (width), (clk_divider_flags), (table), \ (lock)) +/** + * devm_clk_hw_register_divider - register a divider clock with the clock framework + * @dev: device registering this clock + * @name: name of this clock + * @parent_name: name of clock's parent + * @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(dev, name, parent_name, flags, reg, shift, \ + width, clk_divider_flags, lock) \ + __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_table - register a table based divider clock * with the clock framework (devres variant)