From patchwork Tue Dec 5 15:46:57 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Georgi Djakov X-Patchwork-Id: 120700 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp5906614qgn; Tue, 5 Dec 2017 07:47:52 -0800 (PST) X-Google-Smtp-Source: AGs4zMaR1/YEw2HL3vzXm9l2l0gDVS3MKSw4Sq2LmINlRN6RTHBLWA9whkY+gC2VKOsFEpoXmYTQ X-Received: by 10.159.254.6 with SMTP id r6mr19006272pls.144.1512488872151; Tue, 05 Dec 2017 07:47:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512488872; cv=none; d=google.com; s=arc-20160816; b=001fz4Ep9XVvqFOMB9FhOxQ0qlscLxXX3pcSldEYEoJbwimlNV1G2F362oiHZb/VLP M0PM6aHEtcIO3wABOV+Kn9aXxS0cOfD7ZUCCtuyEd9bQov8Jifk1csBDXCZb74V35A/m QMB3z5nhBdc44c+v4I6zUKfZ+RAXt2tEjdmmFwP0C/vPNKpH8VylBGfiFOjjcAXxXPZf a1WtKglH3IbwbuSYIhrGxeSpYCcIGgS2rf2LPjAsbPI+QrvhjSwo7wQHnvztuCGtR+1T dhG3wOCX5xTqxXEGbLsi5Zoyy8MedJYGEyZko4Beg3ihOuC4YB4o/xkTXngbJ4P7oLh3 muuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=M1ZktkenVPhWAklFkRkUr8MNJX7MrhwJ+2Hr5xd1K5s=; b=cBW/phWt83sg7wqxkp0AEWjbfnNTBIf3E60nTDa8k/ZSTPrNnJ/lXSOMuP7p0S0H3x AgBsUjn0a3gqtEFTTna9aqBSDWPfg29fdrR1bKgrp2S6DytY3WORuZqK5VrTCVMi75Kf 9cN7LLimg8UmWiy1MLrzz/S9LEBvydTu8rlVrBBFlfsQA01g+/kyAfbokxT4ZZV7hE5K lumK6QtbY+XLX4x1VnMbppS24TfpRi62lGaPok/8NufeEsOqFxL+mD1qkg0NgOAyQKjB 1rbhKM0/GMTvgV7/mzbAusA4ncgmFXtBpNmZL+D7L0Q1jTxAY6JG6CSPmsLVBpZ05xRU L5Aw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=RK/9XmgW; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o2si235836pll.585.2017.12.05.07.47.51; Tue, 05 Dec 2017 07:47:52 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=RK/9XmgW; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753189AbdLEPru (ORCPT + 10 others); Tue, 5 Dec 2017 10:47:50 -0500 Received: from mail-wr0-f193.google.com ([209.85.128.193]:38764 "EHLO mail-wr0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752996AbdLEPrI (ORCPT ); Tue, 5 Dec 2017 10:47:08 -0500 Received: by mail-wr0-f193.google.com with SMTP id o2so784838wro.5 for ; Tue, 05 Dec 2017 07:47:07 -0800 (PST) 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; bh=J54cUz8cByVAIC1R7usxpO0FFrUQJouk4nlZHfLBoEQ=; b=RK/9XmgW1YBL2G4ez09+JjMJcsSYCYwn2JOtvTp8vGciEIaI4/KD4KzUE97zEQEzVM 9JtVaHzJqyHr9oEhvW5nTlepB1La3VGP2T1H2/mK3RCJSjD3CbSw8ZT6NF27XYsoMv0y 8c/Mx/1D4Q9EkgM9uiUD9aycBSfsh7WmLtOXs= 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; bh=J54cUz8cByVAIC1R7usxpO0FFrUQJouk4nlZHfLBoEQ=; b=UgYJr+5XRUz9hVV8P3vqm7E737HCLa09mtggGMps8lEWq015XLjsnmSxtNybCM7ItS g+41NclHxNqicRdb3+43enN7VRBYCITw68ng2DAvRaEAHKxDayqNbl0BlNKrJlrdBgFK lMo1pPykh7mAHNK0Jr1DIiwX3dPMiLpE5/rVU257E0VhgfgdefX+XANuCdSX7j6UVUSb j50FpDvMWzo/qXb+G8jwUxgHKF2FCxj+h7jQx5rYamqtMNtwJqqYQacGRyRB7zxiZbUX IO2mHUnM6/ZvNlAwVZ5oohDto5LFq+XCZG1eJSPOaYoITD2j62aVwDnlMzaeUz36RY6A tZog== X-Gm-Message-State: AJaThX5M7KGoMWUrqzccUkGIvVVYDnJo5f8j8u+MpFmLSv4Ve5Lickvf cc1NHqYGTt6jRJOVgPFzYcNEaQ== X-Received: by 10.223.150.68 with SMTP id c4mr16359458wra.255.1512488826943; Tue, 05 Dec 2017 07:47:06 -0800 (PST) Received: from localhost.localdomain ([212.45.67.2]) by smtp.googlemail.com with ESMTPSA id v47sm500946wrc.13.2017.12.05.07.47.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 05 Dec 2017 07:47:05 -0800 (PST) From: Georgi Djakov To: sboyd@codeaurora.org, jassisinghbrar@gmail.com, bjorn.andersson@linaro.org Cc: mturquette@baylibre.com, robh@kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, georgi.djakov@linaro.org Subject: [PATCH v11 2/6] mailbox: qcom: Create APCS child device for clock controller Date: Tue, 5 Dec 2017 17:46:57 +0200 Message-Id: <20171205154701.27730-3-georgi.djakov@linaro.org> X-Mailer: git-send-email 2.14.2 In-Reply-To: <20171205154701.27730-1-georgi.djakov@linaro.org> References: <20171205154701.27730-1-georgi.djakov@linaro.org> Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org There is a clock controller functionality provided by the APCS hardware block of msm8916 devices. The device-tree would represent an APCS node with both mailbox and clock provider properties. Create a platform child device for the clock controller functionality so the driver can probe and use APCS as parent. Signed-off-by: Georgi Djakov Acked-by: Bjorn Andersson --- drivers/mailbox/qcom-apcs-ipc-mailbox.c | 11 +++++++++++ 1 file changed, 11 insertions(+) -- To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/mailbox/qcom-apcs-ipc-mailbox.c b/drivers/mailbox/qcom-apcs-ipc-mailbox.c index ab344bc6fa63..57bde0dfd12f 100644 --- a/drivers/mailbox/qcom-apcs-ipc-mailbox.c +++ b/drivers/mailbox/qcom-apcs-ipc-mailbox.c @@ -29,6 +29,7 @@ struct qcom_apcs_ipc { struct regmap *regmap; unsigned long offset; + struct platform_device *clk; }; static const struct regmap_config apcs_regmap_config = { @@ -96,6 +97,14 @@ static int qcom_apcs_ipc_probe(struct platform_device *pdev) return ret; } + if (of_device_is_compatible(np, "qcom,msm8916-apcs-kpss-global")) { + apcs->clk = platform_device_register_data(&pdev->dev, + "qcom-apcs-msm8916-clk", + -1, NULL, 0); + if (IS_ERR(apcs->clk)) + dev_err(&pdev->dev, "failed to register APCS clk\n"); + } + platform_set_drvdata(pdev, apcs); return 0; @@ -104,8 +113,10 @@ static int qcom_apcs_ipc_probe(struct platform_device *pdev) static int qcom_apcs_ipc_remove(struct platform_device *pdev) { struct qcom_apcs_ipc *apcs = platform_get_drvdata(pdev); + struct platform_device *clk = apcs->clk; mbox_controller_unregister(&apcs->mbox); + platform_device_unregister(clk); return 0; }