Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4708628yba; Mon, 20 May 2019 02:17:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqzXUUdFGIsDD4SVOdvKU41+XpXx10S/KpkpZhk1Wjmv+IAR1Yh+6kLrbFRikFqJk7gM/DZd X-Received: by 2002:a63:1c16:: with SMTP id c22mr13590661pgc.333.1558343840148; Mon, 20 May 2019 02:17:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558343840; cv=none; d=google.com; s=arc-20160816; b=f28OhscVHB+AbuTgpaB87MsNZ+SKjyFaVvnDKNojSU4IfS/gvDVYEKPV7qSFt+/u2z Pf/U0wu25glsYcMyxyMhdFfqmHwIzUxLHu4S9cpsZ1dLRylQ22cPKWMC9ME+0S+FTwsc YNBTmb9PsQjhuZaDWdtXVC+pMhb7lcCQnpuKGiWcMtTKlkqw9itCF+4BThBPdXUEZf8M SVo4XbUth3YRQ2cFfibYthT6OJNI2Q5rNC1847vBbGYTpdsUpaTKqCoHLVyYJaiXwbQX N3eYJIf7dSA1R28AloLmNYOlgeGRCXCVNUatOyeQbxja1r6hTyiHlQtORKcs3r7Qzblt lBrA== 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=BtPM0J8MR/iT7D1Ajx1B0UpfQQgm0KBRnlYBk0v74BM=; b=g7BeOGRfe/b2gxUsz8vlLLShoKlq6mzv9n6nSJaxI6bp0hK5TLDfjJE9aNsKbAnaej qg50xo4+z/OYYR+3tRi8QvBdsiU9QGLIXrnsTjhX7IIa4yhDEon959j6AU+uZuvywURZ jopQwlZUtgqs1KD9xnBSLuyzaVZloVy7lgSrKMR+g0AjAryJDP3v/+lLhJPR3I8Aasuz /EUdwK6H+rP/q+3EkpI33/LcBN0MLarI+Zb7tIPvhuWG52uJI0UtR0iDut/3AFC139ra YXuEXYFcvI3ksg92gj1KSx3KwBn9ceR1n24U9k32lAJ5FneLl/gvRhT2dCEScoI3asxR /ncw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=CbFn0yPg; 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 u3si18375053pfa.128.2019.05.20.02.17.04; Mon, 20 May 2019 02:17:20 -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=CbFn0yPg; 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 S1730759AbfETIFg (ORCPT + 99 others); Mon, 20 May 2019 04:05:36 -0400 Received: from mail.kernel.org ([198.145.29.99]:36240 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726266AbfETIFf (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 A544720856; 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=bQgehpdwJzg1v6T6W08qkEx1c9bSqawoCkXT0ME7XwA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CbFn0yPghbZ2rjhsPAaW+eVmdn/Luj2YxI/1PbriDe7mAPNSDrOWfUlsSjRD2B5ZU O2LJ8UNu7WzmPUirO5KrqsPTT/42mc4VaqN1iLCYcOEHLscADbWhbkCEOSz4T9g7AU DKgUbVZJpwMh3CZ+zhLz/IgDfraSuDKBZI4Sm5/o= Received: by wens.tw (Postfix, from userid 1000) id 55EC6602F9; 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 04/25] clk: Add CLK_HW_INIT_PARENT_DATA macro using .parent_data Date: Mon, 20 May 2019 16:04:00 +0800 Message-Id: <20190520080421.12575-5-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, 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 edad4ad5d897..d0d58c49f3ad 100644 --- a/include/linux/clk-provider.h +++ b/include/linux/clk-provider.h @@ -951,6 +951,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