Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4711270yba; Mon, 20 May 2019 02:20:55 -0700 (PDT) X-Google-Smtp-Source: APXvYqwlT095tigx2MuetZEB1QVF6tutbHAaq2Y74nLloLWU7DDkN0iQ9WdM0xNjWhLFLyn33+B1 X-Received: by 2002:a17:902:ac90:: with SMTP id h16mr11994701plr.162.1558344055834; Mon, 20 May 2019 02:20:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558344055; cv=none; d=google.com; s=arc-20160816; b=YjZp5DghOWwQxzOFmHEYf4Liac8SGkbZ3Khr0Rim4D5MqCbm+IB9ZOH8ishYwS3yPS d3sWa+bduwFWbvUZC3QdjMvoD7i2XjSlRtRvfCIGrYjX6CoWHg9HtxvyINzw1xqGfMYY BIVB+M/nhJeU7cBljXhyXmYT9h930VfZ6MlQpF2jtu6sIp++G00XWWjY1j6UqBGw2PWf vwV4Uqe9JDA+lsoRsl0ZcjdqxYnwiNBka/6qneta70dOFxHfOtv3atTlHEWhTBL4R68z S+kMFGN6h13lUBilUXTgziHWea7JcFbeoxl5zehjfrKK7Z32I/JNzxdnUP4xuHs561HF TXyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=0vQrFC/PNetJaiL5KBSEy8rsrpTcx/7IxW3dqYaBYjo=; b=BzHiyo7oicilJILSAY5w/kDe2ivtG2/8h1Hup1/nSMkNpymE8+rjXlgnBjE9jOldI9 GxZZ9UX+mEOqiO9sGpptr1PI28R90eAZsClFtRBDs20VK/AVrau6HZMXVWk8e14NdHdS fAbJ9NM8sjr3M2cW1lA//o3fZ9quYF4uyE9NIjbfgL1D6mRxL1JQg8WdgxCbMnxd7nvv f/nnsGqKtbgpq7hlDLy6a3kV3U9yV0x4w624GdY0eqXCHnEtQcWOpEpd4SJOwfqXYNA4 oIaGCuSpx07Kae+QNbRlyc79v1xSVeTWF+3qPRfaO4sW3dIIpcp0iWN6NiHQJZRjpUud 6lFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=wjuAv9oj; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d10si14049196pla.406.2019.05.20.02.20.41; Mon, 20 May 2019 02:20:55 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=wjuAv9oj; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1730824AbfETIFg (ORCPT + 99 others); Mon, 20 May 2019 04:05:36 -0400 Received: from mail.kernel.org ([198.145.29.99]:36250 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730564AbfETIFf (ORCPT ); Mon, 20 May 2019 04:05:35 -0400 Received: from wens.tw (mirror2.csie.ntu.edu.tw [140.112.30.76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B0A7B2085A; Mon, 20 May 2019 08:05:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1558339534; bh=+xkhllsSjVjbpVBqPaXjmCtg9BOWN3ILFlcR4TcmBAk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wjuAv9ojJKEQJ2xZYp00iCUNPsKCbmW2+DoqnKbsDel11gbBR/z+dO9mJlVTz+Ljh r7vFtMr7Bl7eDg89WBp8COwvMlx/aRvylbixnks/mehwIoysCv9PWe7HViXETZNRSn pIJjV6OdzldaYeWm6WzJcylNdI1WEDzD3GlqbZFw= Received: by wens.tw (Postfix, from userid 1000) id 4FA2C5FF38; Mon, 20 May 2019 16:05:32 +0800 (CST) From: Chen-Yu Tsai To: Maxime Ripard , Stephen Boyd , Michael Turquette Cc: Chen-Yu Tsai , linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 03/25] clk: Add CLK_HW_INIT_FW_NAME macro using .fw_name in .parent_data Date: Mon, 20 May 2019 16:03:59 +0800 Message-Id: <20190520080421.12575-4-wens@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190520080421.12575-1-wens@kernel.org> References: <20190520080421.12575-1-wens@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Chen-Yu Tsai With the new clk parenting code, clk_init_data was expanded to include .parent_data, for clk drivers that have parents referenced using a combination of device tree clock-names, clock indices, and/or clk_hw pointers. Add a CLK_HW_INIT macro for specifying a single parent from the device tree using .fw_name in struct clk_parent_data. Signed-off-by: Chen-Yu Tsai --- include/linux/clk-provider.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h index 0c241b43a802..edad4ad5d897 100644 --- a/include/linux/clk-provider.h +++ b/include/linux/clk-provider.h @@ -922,6 +922,17 @@ extern struct of_device_id __clk_of_table; .ops = _ops, \ }) +#define CLK_HW_INIT_FW_NAME(_name, _parent, _ops, _flags) \ + (&(struct clk_init_data) { \ + .flags = _flags, \ + .name = _name, \ + .parent_data = (const struct clk_parent_data[]) { \ + { .fw_name = _parent }, \ + }, \ + .num_parents = 1, \ + .ops = _ops, \ + }) + #define CLK_HW_INIT_PARENTS(_name, _parents, _ops, _flags) \ (&(struct clk_init_data) { \ .flags = _flags, \ -- 2.20.1