From patchwork Fri Dec 1 17:02:20 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Georgi Djakov X-Patchwork-Id: 120367 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp1392313qgn; Fri, 1 Dec 2017 09:04:21 -0800 (PST) X-Google-Smtp-Source: AGs4zMaRHp4Tg1QbPMWgE4OTfdt/t2krSamXhhLl4o5snyjbtoZCsCSz1uvxpi59GcPdG0JABrs0 X-Received: by 10.84.233.1 with SMTP id j1mr6943788plk.311.1512147861459; Fri, 01 Dec 2017 09:04:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512147861; cv=none; d=google.com; s=arc-20160816; b=E8R6xfQZwPKRjoqRFDFg/h9/m81o4s3mtduHuZq6wb7jKHx9j3K7KiRcRhKhuY9RIi K+hcOTu/g+Mdezr2rdgtS7SmyoDcKcRLcPyZ1v0NNGbA5AtHKpWp1QXDKDJ3NsiAUNPU jNHcw7k6KdCAdUibYCXIYhl++awJJ3BkXK/FBrdg5+6mvo+j9xIBYVoMXf0KbClIBPPx htcDS1HkUnFmtIaB0B6o3p8jCDDz8mcTa1U++MqDCE7hHmW9dZY0kKDHc6rvMiverj8X cnWhkTEvVRMGcgD3X+dlkw34ROIFWWmUpXSYMpMfvegJxZO7cIHo6nl+uCvlzceIGoG+ bE6w== 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=udHrCP8X/rH5vJR7UrGv7uDa4HXXQqVPS5jjxobdi5M=; b=uKTBHoM7JIJQ3HpkrJ9Mx1v3TYVmVB+lOArzJKcnGGqu6v4NnewHxDFb4b5uYTzXa8 N6A8/KH/ZPpIdzcQcKg5HakvM2urRplgi8BBPXv8E4G5DrB9XKWBPkuz9q0Nr3UAVW1c X1H88wBtWtLp1VVZ96Lydsr03QX0azdUVjX176TFb5IyK0cQb1novTFObNUZ2hEOFcgK 33H7fjJqLfkuWAbgA0zGwEO6jPPg5riDR3MzM1emuFCE+go5LgqyTGYoJJlSP7KbWaZd TGxzd7rBtOfFqhqZvtLfwWE+uPkIxJuDtjY4cnIvcP7vNjy1CfCOhIx13o/5AGEELZMq AeCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=XolMmIZT; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-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 w15si5056502pgc.761.2017.12.01.09.04.21; Fri, 01 Dec 2017 09:04:21 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of devicetree-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=XolMmIZT; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-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 S1752160AbdLARET (ORCPT + 6 others); Fri, 1 Dec 2017 12:04:19 -0500 Received: from mail-wr0-f193.google.com ([209.85.128.193]:38750 "EHLO mail-wr0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751412AbdLARCa (ORCPT ); Fri, 1 Dec 2017 12:02:30 -0500 Received: by mail-wr0-f193.google.com with SMTP id o2so10804223wro.5 for ; Fri, 01 Dec 2017 09:02:29 -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=9B3G6NS11o6KqmBXkqtc8ZC9LPZ/gii+IDRAlOT3nBY=; b=XolMmIZT1tusvmw+XDe2YxtfL9+0bEHfLCZE+FelAahk4TRWfut+sSX85Z63THMGNZ lvLWHYYWp2FHvdqoPMANse3MPhvyNPklf80L06JwDnossA9aqGw1kwfXnAyEJxsyXkRZ tcekjWOAp9mmh/7WmPCva3nv+NeXOJOVxDhQ8= 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=9B3G6NS11o6KqmBXkqtc8ZC9LPZ/gii+IDRAlOT3nBY=; b=XooLa4k67xFcVuNds+3ncDFeUAEHnhJejE8c5aMl0UOxDSm2ebHtkACYZM0dqf/E6l 9lWLmhkcFTR+QjttXoN+BM+zZDD8NptYx5eNuc3+xNuZR5AAecnJZ2Rx3BN7PsoukwMt qqTW4mFghwUY89Qj/ARdiSe0pXk/cKvOi/3pX37w7Vp0V5zch1Ug8GSTyPnN4XIUlfSl v0MagSFb/9Vu6/DcBGZ3I2qAzObZr7KgGq3+UmBcEC/QpfgNzkDMkT+4NlrGZ+ckMh1a pwKKzMeHE7NxQeQ1tbcn3oJwlV85r/YBSzIa8r3nyItJG2el0ACubXZvda7ymVKzAlgu XmmQ== X-Gm-Message-State: AJaThX6JZQcZSUyau45EgKQFx5LhGm3/1xUmOk8WY4vLWX9tVpAzDnbS vupGNA6BA8YTZNjaw9UN6/Xcow== X-Received: by 10.223.177.194 with SMTP id r2mr3304363wra.84.1512147749085; Fri, 01 Dec 2017 09:02:29 -0800 (PST) Received: from localhost.localdomain ([212.45.67.2]) by smtp.googlemail.com with ESMTPSA id 2sm1535253wmk.28.2017.12.01.09.02.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 01 Dec 2017 09:02:28 -0800 (PST) From: Georgi Djakov To: sboyd@codeaurora.org, jassisinghbrar@gmail.com, bjorn.andersson@linaro.org, robh@kernel.org Cc: mturquette@baylibre.com, 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 v10 2/6] mailbox: qcom: Create APCS child device for clock controller Date: Fri, 1 Dec 2017 19:02:20 +0200 Message-Id: <20171201170224.25053-3-georgi.djakov@linaro.org> X-Mailer: git-send-email 2.14.2 In-Reply-To: <20171201170224.25053-1-georgi.djakov@linaro.org> References: <20171201170224.25053-1-georgi.djakov@linaro.org> Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@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 --- drivers/mailbox/qcom-apcs-ipc-mailbox.c | 11 +++++++++++ 1 file changed, 11 insertions(+) -- To unsubscribe from this list: send the line "unsubscribe devicetree" 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; }