Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp8149235ybi; Thu, 6 Jun 2019 07:30:38 -0700 (PDT) X-Google-Smtp-Source: APXvYqw1CuYJDRy6eCrcTdLc3RB3Q8PHTwM9c4HoWgqzHmwVkiyti6BsB0q3X7P8KFg5XwhrNAeD X-Received: by 2002:a17:902:8a8f:: with SMTP id p15mr49566654plo.157.1559831438538; Thu, 06 Jun 2019 07:30:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559831438; cv=none; d=google.com; s=arc-20160816; b=dT+74s++uqv9+nPXicjDX2iWa+5W0hnVqTSWrxdOdi4m5oVjKdi+Y4/nuIPR5wEkOy bauRSwqUh+17lA/8HiBElby/FkjCFVF5BW0nKXXh4HTcmdwHITgdSrlrCIR0/SGEAh2x QMdqY8eseJxlNHXDuwESS8Km2fC/FwQPybeccy8uYzVnd726Cy2wJyKJSGjUdOjxvG+T KFXVdNMhgpwK5cWJaBkCTdS1UrHBei3yBUXHmarID5ay+n/ONVPdCx0HRr1YrzqTjPuH tLvCiiMl5aElWwSPNTNYkaKZV0+iQtBcMHDynWPbw8uQ+Twyac1OxUmjuhvYiE7YGAtg 5Ogw== 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=rgrgS/E7hqVvgaMIoQicr93x5d2TAy4lBaAYsb7XXxs=; b=fu32+zNbnTJppgQZUSRwWUYaEEpN98f3FY/tuNPTrGnsJ7g42hxp997MDEGjmRYW9T RYNn6t3TLrNTUgYYI+tmUqfzl/pzfpOHJSov/YaxxMyQNygd+sXZwKJ/OTc25gyCKRh/ HcMVsEiSCiQhDQvLbOnUCTymp1vh7gtsUQ2xvgtPkPXtpFqcQorT/RtJbY7aEOeodTU6 sobz725PBGQ85ky/k0zqXVD+YDvYKNEfAO5a0Kob9hN2b2cSzxVxX++Rrl9u496dPgQv EoGwL2UrkaluBYe+fQhzRQh/mGhRgGt+YZuVJTKIDy+boLHPH9KhYRLIl2BXYu/CrzlI M2Rw== 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 o1si2046108pgp.466.2019.06.06.07.30.21; Thu, 06 Jun 2019 07:30:38 -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 S1729093AbfFFO2U (ORCPT + 99 others); Thu, 6 Jun 2019 10:28:20 -0400 Received: from mx2.suse.de ([195.135.220.15]:49340 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727133AbfFFO2T (ORCPT ); Thu, 6 Jun 2019 10:28:19 -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 87E17AFD1; Thu, 6 Jun 2019 14:28:17 +0000 (UTC) From: Nicolas Saenz Julienne To: stefan.wahren@i2se.com, linux-kernel@vger.kernel.org Cc: mbrugger@suse.de, viresh.kumar@linaro.org, rjw@rjwysocki.net, sboyd@kernel.org, eric@anholt.net, f.fainelli@gmail.com, bcm-kernel-feedback-list@broadcom.com, 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 Subject: [PATCH v2 3/7] firmware: raspberrypi: register clk device Date: Thu, 6 Jun 2019 16:22:54 +0200 Message-Id: <20190606142255.29454-4-nsaenzjulienne@suse.de> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190606142255.29454-1-nsaenzjulienne@suse.de> References: <20190606142255.29454-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 Since clk-raspberrypi is tied to the VC4 firmware instead of particular hardware it's registration should be performed by the firmware driver. Signed-off-by: Nicolas Saenz Julienne Acked-by: Eric Anholt --- drivers/firmware/raspberrypi.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/firmware/raspberrypi.c b/drivers/firmware/raspberrypi.c index 61be15d9df7d..da26a584dca0 100644 --- a/drivers/firmware/raspberrypi.c +++ b/drivers/firmware/raspberrypi.c @@ -20,6 +20,7 @@ #define MBOX_CHAN_PROPERTY 8 static struct platform_device *rpi_hwmon; +static struct platform_device *rpi_clk; struct rpi_firmware { struct mbox_client cl; @@ -207,6 +208,12 @@ rpi_register_hwmon_driver(struct device *dev, struct rpi_firmware *fw) -1, NULL, 0); } +static void rpi_register_clk_driver(struct device *dev) +{ + rpi_clk = platform_device_register_data(dev, "raspberrypi-clk", + -1, NULL, 0); +} + static int rpi_firmware_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; @@ -234,6 +241,7 @@ static int rpi_firmware_probe(struct platform_device *pdev) rpi_firmware_print_firmware_revision(fw); rpi_register_hwmon_driver(dev, fw); + rpi_register_clk_driver(dev); return 0; } @@ -254,6 +262,8 @@ static int rpi_firmware_remove(struct platform_device *pdev) platform_device_unregister(rpi_hwmon); rpi_hwmon = NULL; + platform_device_unregister(rpi_clk); + rpi_clk = NULL; mbox_free_channel(fw->chan); return 0; -- 2.21.0