Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp5699169ybi; Tue, 4 Jun 2019 10:38:29 -0700 (PDT) X-Google-Smtp-Source: APXvYqwKiVvFmZNcHdO7c2R/l9UPGvCWLdnnzuIp2fCea2Q1yRz+pveVqeNb8CWALMv0sw/HgTlB X-Received: by 2002:a17:90a:9f8b:: with SMTP id o11mr31922860pjp.102.1559669909179; Tue, 04 Jun 2019 10:38:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559669909; cv=none; d=google.com; s=arc-20160816; b=AJOEbVikKxgMXf7cyttQpXTxMwmJSEfDwQsB03enr+m2pmwrB8LupxfqbaNi20D7vr dcwgX/5gcl8xctM6BO+uy7OMwwV3dCPljHHDuzC3C1j+9IUWQTGE3Ilsg/X/CcAVxv8c jblmhPp/3sb9LNg3rBhxSawJNnbMD2Scs78XbicWsLfTA8+Vb+RRrLA6IsWdRgnPMAZL 7u4tkjjUc7n/nuYAsyIbTKsymBRlvyza753H+rIEvKIBLN8/FfKawcpb7hHlxp78VpA+ gQY2a4bp7NFaPJxOwKFNLvrKJUHFC9GjGGgZy00+jdtlyRaQsehFYKNPkMsQfiIg7jOX 2pBA== 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; bh=Ewy5CgmBJTa4vDlNhEdxVDmMhJJWbYUsOswbtWet+eM=; b=jIEvimusqy1V3/f2lUghtK7PEhC+wPzPH8THhbmixHaUXlXsuxDbG/9svIEdUX4eY7 tUiR9B+KF6JrTI6F3UiyFSUVZDZkarzcEeHvCYzniKqeinKIxIYsFhbv0Aug8cQ7ZpY3 ckOAH0Rg3zEP8yjYLkNRICIB6oSkucGWJ1rsyZt+t8UQOWp78VG8fegABeZm0K5Go2Ru GXA1klOOZcLDlgU6LZgAI2J+TgoWXc62NkJQFxKbE36aSUcpcrma+8XBKAfBd1vUJrmI dr41wr5BLecQPgOPcZlzwmGYtD9bY4EuoqWn2kBjOA4/KVqy5QA9JyvdOLxOsFTdy6yC bU/g== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q138si23484403pfq.149.2019.06.04.10.38.12; Tue, 04 Jun 2019 10:38:29 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726583AbfFDRg4 (ORCPT + 99 others); Tue, 4 Jun 2019 13:36:56 -0400 Received: from mx2.suse.de ([195.135.220.15]:40592 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725929AbfFDRg4 (ORCPT ); Tue, 4 Jun 2019 13:36:56 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id C4F50AE03; Tue, 4 Jun 2019 17:36:54 +0000 (UTC) From: Nicolas Saenz Julienne To: stefan.wahren@i2se.com, Florian Fainelli , Ray Jui , Scott Branden , bcm-kernel-feedback-list@broadcom.com, Eric Anholt Cc: mbrugger@suse.de, viresh.kumar@linaro.org, rjw@rjwysocki.net, sboyd@kernel.org, ptesarik@suse.com, linux-rpi-kernel@lists.infradead.org, ssuloev@orpaltech.com, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, mturquette@baylibre.com, linux-pm@vger.kernel.org, Nicolas Saenz Julienne , linux-kernel@vger.kernel.org Subject: [PATCH 3/4] clk: bcm2835: register Raspberry Pi's firmware clk device Date: Tue, 4 Jun 2019 19:32:23 +0200 Message-Id: <20190604173223.4229-4-nsaenzjulienne@suse.de> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190604173223.4229-1-nsaenzjulienne@suse.de> References: <20190604173223.4229-1-nsaenzjulienne@suse.de> 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 Registers clk-raspberrypi as a platform device as part of the driver's probe sequence. Signed-off-by: Nicolas Saenz Julienne --- drivers/clk/bcm/clk-bcm2835.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk/bcm/clk-bcm2835.c index ccb0319fc2e9..6f370e6bafed 100644 --- a/drivers/clk/bcm/clk-bcm2835.c +++ b/drivers/clk/bcm/clk-bcm2835.c @@ -2098,6 +2098,7 @@ static int bcm2835_mark_sdc_parent_critical(struct clk *sdc) static int bcm2835_clk_probe(struct platform_device *pdev) { + struct platform_device *rpi_fw_clk; struct device *dev = &pdev->dev; struct clk_hw **hws; struct bcm2835_cprman *cprman; @@ -2150,8 +2151,18 @@ static int bcm2835_clk_probe(struct platform_device *pdev) if (ret) return ret; - return of_clk_add_hw_provider(dev->of_node, of_clk_hw_onecell_get, - &cprman->onecell); + ret = of_clk_add_hw_provider(dev->of_node, of_clk_hw_onecell_get, + &cprman->onecell); + if (ret) + return ret; + + rpi_fw_clk = platform_device_register_data(NULL, "raspberrypi-clk", -1, + NULL, 0); + ret = PTR_ERR_OR_ZERO(rpi_fw_clk); + if (ret) + dev_err(dev, "Failed to create platform device, %d\n", ret); + + return ret; } static const struct of_device_id bcm2835_clk_of_match[] = { -- 2.21.0