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: 10087511 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 620536037E for ; Fri, 1 Dec 2017 17:04:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 50C742A567 for ; Fri, 1 Dec 2017 17:04:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4566F2A590; Fri, 1 Dec 2017 17:04:35 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D9CC42A567 for ; Fri, 1 Dec 2017 17:04:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752150AbdLARET (ORCPT ); Fri, 1 Dec 2017 12:04:19 -0500 Received: from mail-wr0-f193.google.com ([209.85.128.193]:45925 "EHLO mail-wr0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751486AbdLARCa (ORCPT ); Fri, 1 Dec 2017 12:02:30 -0500 Received: by mail-wr0-f193.google.com with SMTP id h1so10788611wre.12 for ; Fri, 01 Dec 2017 09:02:30 -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=TuoVOGseQdx+hW4XIe8ZAaACzr85spZim7zTmkqFVakZsE5Ij7Oht1KTckrNnMW6ue sqsvZgza6GZLstNM7SLlbSP1pztJ7efM5i33V53YLc+kE3WWiRCX8vpvPL59Gu6pj6gJ NY+8UsyVhTij2VGic37kD70vEnQJdltZbDRCGNds9GwT2+E8e8vA2SgzASkgwEd0tmTf 9g+rOkWUZkJTHKjX5Mv0eIbdZmh7gJpsCsS8RyO9WTdaLdHw+J8lhwMJ75xzNYnHe3w5 ZTyTZXHQiOvAEJ5tDRCMn7ZkDvr6uqzSoKKgaVS2U2cepml7o6X6Aa0A0fjc9DTfduAw ab2A== X-Gm-Message-State: AJaThX5faKO7v6Qk1HnOkemrZ6rehfMkflAqk+cQOpg51DuSb5EbkrWX zLzuTlI4Je7u/i/To4jyCom9oA== X-Google-Smtp-Source: AGs4zMZJ9k2/LjqLRaTwSnaIhVddzoILYyOkNY5410oExvbIHe7ZPq0SBovFjk3/O7Qh/jADgwAhCg== 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: linux-clk-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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-clk" 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; }