Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp4237191ybi; Tue, 11 Jun 2019 03:20:26 -0700 (PDT) X-Google-Smtp-Source: APXvYqwrohTKbm5YIlVtTrvOTdXsIM4m/dEaedVjSu64brvJHsCB+SzD0xJxgJp4zL+Edqnp6Wj9 X-Received: by 2002:a17:902:8a87:: with SMTP id p7mr58434058plo.124.1560248426037; Tue, 11 Jun 2019 03:20:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560248426; cv=none; d=google.com; s=arc-20160816; b=VLfzro0myN07/3bSeCuGUooJ8qomCLNjKbCE+u0J8eVfr0/o+Z/I/0eiS0ruIHyQq2 E8By0f4f4Do6u+IQ4aJ3pfSiz5pvK+qLa0LIEnR+0vQHAwL2MvxNQy9+lxDv1c+nfVTz rWr+A/AFa/woGii/hv21lhVH2Pa/6VbYAnrvLv1oFPf+0wQhhMQG6Lcj+P4jyxq5cpNh 9XDZq/1/Fz3NPSBo0ZqtvuRUWSiIdYXhgdsZwa98S++e+1p86hFSRvUWmyaowiKMpfAG BsGwpuVodI3HQz5c0Zr/mBwe7CTkqyxYhHbMzT2xarAD3w12rMYqWqakvW7t47lNIZc1 B12w== 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=QMsHhoYVA/vsmMMIxVirtzkW4fVPYwgpwmwcft3xtr0=; b=StNDj2JtNEQf8ztBuQT2+U6XRh5O7rEJP853TrETaPStS+wwie5SOjGWeFZNV8xw0d 4a9P9mX0wnM/0MD0yxh6T7IrQ3lQdnelwBpvAVfJJILUHaSnYbkVJBunP90ZHJTuiddf CqY9AGqBUMMaaqqvtbwHJqHVQ2IlNCv0Oy4eL+M5gvldS4MK0acFMAmVnAyLMU0qo/rN r0AiF6y3KGMuZ87zzYTkGuIwgusRNtn/GWjEHmMrU9mFcY0WK59KREegw03zS5p61FYa b3WjdDyEM1govf5xRezhbPrMpTIG7SpdHwBMwBFNYZ5jHIpFNujpzg9JN5ucwr/eOPFP ENhw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=CFB2YHMn; 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 a7si3477456pfc.54.2019.06.11.03.20.10; Tue, 11 Jun 2019 03:20:26 -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=CFB2YHMn; 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 S2405258AbfFKKRW (ORCPT + 99 others); Tue, 11 Jun 2019 06:17:22 -0400 Received: from mail.kernel.org ([198.145.29.99]:45530 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404521AbfFKKRV (ORCPT ); Tue, 11 Jun 2019 06:17:21 -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 071F52089E; Tue, 11 Jun 2019 10:17:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1560248241; bh=KouIinatvemgGOpgiZa1tRYYMGvRXsqhx6dScroA1Vs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CFB2YHMnvMkfpUyAFeJiyjHkB4CQZ6FHv6lpmcoKZfnpJyfbCudWCGLgpRvh8ORLO OVzJW+8UiLiFiA9nyq3s/PnIJyJJJZAuZxlMuKF92saI7HPoZzPRRKMnOi66OCJFm7 g5TzEQ7GoTld8RtLC8HzWPDKi2kMtJ4bnIlbpvag= Received: by wens.tw (Postfix, from userid 1000) id 2A0675FE53; Tue, 11 Jun 2019 18:17:18 +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, Chen-Yu Tsai Subject: [PATCH v2 04/25] clk: Add CLK_HW_INIT_PARENT_DATA macro using .parent_data Date: Tue, 11 Jun 2019 18:16:37 +0800 Message-Id: <20190611101658.23855-5-wens@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190611101658.23855-1-wens@kernel.org> References: <20190611101658.23855-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, struct 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 struct clk_hw pointers. Add a new macro that can take a list of struct clk_parent_data for drivers to use. Signed-off-by: Chen-Yu Tsai --- include/linux/clk-provider.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h index b19063512a29..0fd14c4874d6 100644 --- a/include/linux/clk-provider.h +++ b/include/linux/clk-provider.h @@ -956,6 +956,15 @@ extern struct of_device_id __clk_of_table; .ops = _ops, \ }) +#define CLK_HW_INIT_PARENTS_DATA(_name, _parents, _ops, _flags) \ + (&(struct clk_init_data) { \ + .flags = _flags, \ + .name = _name, \ + .parent_data = _parents, \ + .num_parents = ARRAY_SIZE(_parents), \ + .ops = _ops, \ + }) + #define CLK_HW_INIT_NO_PARENT(_name, _ops, _flags) \ (&(struct clk_init_data) { \ .flags = _flags, \ -- 2.20.1