Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4296243imu; Mon, 28 Jan 2019 22:12:12 -0800 (PST) X-Google-Smtp-Source: ALg8bN75ufD03zza4QVqgrsoMkhqEvYJjbEyDt5LbVaDdA5Qs8SOywVK3V7vfy8+zacaeFFiw1sh X-Received: by 2002:a63:ce50:: with SMTP id r16mr22323685pgi.217.1548742332125; Mon, 28 Jan 2019 22:12:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548742332; cv=none; d=google.com; s=arc-20160816; b=0BkumXw+B/5H28Jsk7mmr5+J0m+oNYi7v3KhbyY79GWQZFFAzjbA51NkrMcDDgxbWz 4Tias+LBLnqPti3T7HQ1vZn9ij7qZJiJ6QYu9CJxfexIYuvXgCyC84A7rSmBBexyW+mi YV1JcCAUWW97Jkt1xBvQRWph649GCXrFt4f1+ij7ux0tYrSdhEMT9Vjdx19UzO91iBb4 8VSXPx8JJdvv8UMId/QbDNxXJ5yPUq9E61e376HKOhHFoTZgEEvmQJWT4aChXSLPPGPc AFESN1KLDXyU1fhOzxt/lCdXydTZfZi92sYDzW9RRkTRZOYE4AptLDGXqugLYet22R5e 9xJw== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=d4u5QoU1LDhnqy0WrPYZTntflZzR+s87jma/z34WbzE=; b=l+GGtkLq1CxW9iynDtSC09c89rwbJGAOj3Eymohn9Fs0KWh1hM2Q/dgiuOk8IWaSIK zeHCiJPd+M9ZS5lH3s09P4jknDnDr2r82dgnNE5b19eJLoYTlMDEHJnV2Q00I465FC93 IDfheAPg9VMWN3byxbKYyqADgmFL/0NKQ6KQkKFfRTVu9EW9MzYRBVC5l1ggQ1rh45ZN /Xq+D84tXW7UQPFJ64D7EexLRFCLRcnuz56dUJpdiW0zKkiaf7LA2TrHRd7oZQK1ba/E E8fF/kFysoJNRnEqZcjzA7KuVHDkE/CxokqYGdVaVgOOVsX0/GkWxpQjAGpkcQMpNNPP YVog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=eudWBhKH; 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 q8si14338792pli.284.2019.01.28.22.11.56; Mon, 28 Jan 2019 22:12:12 -0800 (PST) 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=eudWBhKH; 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 S1727222AbfA2GKY (ORCPT + 99 others); Tue, 29 Jan 2019 01:10:24 -0500 Received: from mail.kernel.org ([198.145.29.99]:33394 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725832AbfA2GKY (ORCPT ); Tue, 29 Jan 2019 01:10:24 -0500 Received: from mail.kernel.org (unknown [104.132.0.74]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6FD822175B; Tue, 29 Jan 2019 06:10:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1548742222; bh=CDbiA01wIj3YJh2W5ajCbcvfWbn6X5JCqFTrTrXKrXA=; h=From:To:Cc:Subject:Date:From; b=eudWBhKHIpQf0aF82qOD6jkMoI7eB0v32bY/JGjGuST3/6CsnFuJaOjSsZV5LQ4Q/ Vsd4bRCqSsJkKXzRSIHu54n9TEyKmJby4pHmJso75tqngWGc5ihFvwAHYwe/477d14 yGFXDVqmpmCeCob1UzGkFlxpeEVZbISH7WcZYK70= From: Stephen Boyd To: Michael Turquette , Stephen Boyd Cc: linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, Miquel Raynal , Jerome Brunet , Russell King Subject: [PATCH 0/9] Rewrite clk parent handling Date: Mon, 28 Jan 2019 22:10:12 -0800 Message-Id: <20190129061021.94775-1-sboyd@kernel.org> X-Mailer: git-send-email 2.20.1.495.gaa96b0ce6b-goog 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 There are a couple problems with clk parent handling in the common clk framework. This patch series combines a few different topics together as all this code is closely related. First off, we don't do well at determining parents of clks at clk registration time because the return type of the clk_ops::get_parent() op is a u8 which isn't expressive enough to cover all our use-cases. Secondly, we use strings for all parent-child linkages, and this leads to poorly written code that extracts clk names from struct clk pointers and makes clk provider drivers use clk consumer APIs. Thirdly, clkdev.c has a collection of DT parsing logic in it that is only used when the common clk framework is present but we want to use that same logic for describing parent-child linkages of clk providers via in DT. This should all be moved into the common clk framework and used from there as well as from clkdev.c, so this series changes the way clkdev interacts with the clk framework by having clkdev get clk_hw pointers out of DT clk specifiers and then convert those into clk pointers with clk_hw_create_clk(). Splitting the API this way lets us get clk_hw pointers for clk providers and skip the struct clk pointer creation phase that we don't need to do when describing parent-child linkages. And finally, we have a few patches in here that lay the groundwork for supporting device links in the common clk framework. We do that by pushing the consuming device pointer through to the clk pointer creation in clk_hw_create_clk(). This wasn't always easy to do when we had __clk_create_clk() called from multiple places, some being deep in the clk registration path. This series simplifies that logic so that we can always attach a consumer device to a clk that we create in one place, instead of making that linkage in multiple places near where we create struct clk pointers. Miquel Raynal (1): clk: core: clarify the check for runtime PM Stephen Boyd (8): clk: Combine __clk_get() and __clk_create_clk() clk: Introduce get_parent_hw clk op clk: Introduce of_clk_get_hw_from_clkspec() clk: Inform the core about consumer devices clk: Move of_clk_*() APIs into clk.c from clkdev.c clk: Allow parents to be specified without string names clk: qcom: gcc-sdm845: Migrate to DT parent mapping arm64: dts: qcom: Specify XO clk as input to GCC node Cc: Miquel Raynal Cc: Jerome Brunet Cc: Russell King Cc: Michael Turquette arch/arm64/boot/dts/qcom/sdm845.dtsi | 2 + drivers/clk/clk.c | 584 ++++++++++++++++++++------- drivers/clk/clk.h | 23 +- drivers/clk/clkdev.c | 120 +----- drivers/clk/qcom/gcc-sdm845.c | 180 ++++----- include/linux/clk-provider.h | 26 +- 6 files changed, 583 insertions(+), 352 deletions(-) base-commit: 651022382c7f8da46cb4872a545ee1da6d097d2a -- Sent by a computer through tubes