Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp8412698ybi; Thu, 6 Jun 2019 11:54:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqxRZskdMWcJkHqGTVuIuTin3NXX8In74trvd+dYlR033aaoaLmw7vnsWtHvTl+LpsbmDhva X-Received: by 2002:a17:90a:9281:: with SMTP id n1mr1253549pjo.25.1559847242277; Thu, 06 Jun 2019 11:54:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559847242; cv=none; d=google.com; s=arc-20160816; b=MzsVa/hhCNJwE1Lh9Rc1lUn6Nn0W4dm7TKLI+heDNP00uB3txPJm1HALkTdKSEIr3f TyYggkZMG678u1NdDKsuQVIakhF3xUOb5+dSKqoOcF4V8jE4Rr/rS/E+ydppxfHhFnrm JC1epErzV2gAN7qanupSDpP9xZ3OdmbKHMGHBXqoK4Ok73NZQBOxjHabu1y22+G93GtR KBWtb5qyCIPdxfT/arzR/OizYz7gSf3QK7iVMFEDqqBYgazOckdCcF1Od2AjQeA5QzaS GhT1BIYi3D8iZYhgME+cLF7TxM4xWRkSpDw9vDOiNID14asnbDhKtkkKaz1I4GV2C0qN riXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:user-agent:cc:from :subject:to:references:in-reply-to:content-transfer-encoding :mime-version:dkim-signature; bh=PBqW/ASh+XAl8ZHNlfVe2mEchphxP+dgQAamD3YuFp0=; b=zxcr3nXUPcLXZJV9a/PNRm7J/GCqacSlBKX/x+yEWN3pVOG0lEmuQFM887WU2kPP/e 6oTVmfzO4vzI9UBPlulPWo8+D8IfFDlj/qT4+jRQlzoTM1KcthoqDZOK29CHjuG5XEj6 GVivZnMipp4p6T0+OTbVTdAFOr1Cz/7p9U3ZHtmpoWhkYX5XjfQV1aOFCt0MUYAYf1TX J+d7Br8MUdcmfV80MzDlXomWHLBNNnaaDLDkzvbmYUjQpZ4UNggCyUYYdJtjQNXAxlvj /yz90TqsN6YGEnNQHKf1+XkhuMYW0OCPLV8/Hn8oa3nSbE1JNvn/3WBMFrh5IonxYCVa bjtA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=vey45CAW; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y24si2675977pgh.372.2019.06.06.11.53.45; Thu, 06 Jun 2019 11:54:02 -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; dkim=pass header.i=@kernel.org header.s=default header.b=vey45CAW; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729935AbfFFRJu (ORCPT + 99 others); Thu, 6 Jun 2019 13:09:50 -0400 Received: from mail.kernel.org ([198.145.29.99]:46338 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726693AbfFFRJu (ORCPT ); Thu, 6 Jun 2019 13:09:50 -0400 Received: from kernel.org (unknown [104.132.0.74]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 4A46720652; Thu, 6 Jun 2019 17:09:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1559840989; bh=VJ78nIAOqbxKhvQ9fWU/8oqK8Ly4Neair/9DFPw853o=; h=In-Reply-To:References:To:Subject:From:Cc:Date:From; b=vey45CAW9C6njeSvn2wtNwQSizkVfCIzbt/u6buG7aTNO2jr3w2AF7f3KI8o1O/Vv 1MJmqEcfiW5KMdtPoUnvOL/IIuwZadTb4gQJek/tIaPZCdTnoHSWjLtjzdqGAnd5gV BjpBe2l91Mg6icC09KsC9BIyncbX9KXf9u3snZd0= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: <20190606142255.29454-5-nsaenzjulienne@suse.de> References: <20190606142255.29454-1-nsaenzjulienne@suse.de> <20190606142255.29454-5-nsaenzjulienne@suse.de> To: "Rafael J. Wysocki" , Nicolas Saenz Julienne , Viresh Kumar , stefan.wahren@i2se.com Subject: Re: [PATCH v2 4/7] cpufreq: add driver for Raspbery Pi From: Stephen Boyd Cc: mbrugger@suse.de, 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 , linux-kernel@vger.kernel.org User-Agent: alot/0.8.1 Date: Thu, 06 Jun 2019 10:09:48 -0700 Message-Id: <20190606170949.4A46720652@mail.kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Nicolas Saenz Julienne (2019-06-06 07:22:56) > diff --git a/drivers/cpufreq/raspberrypi-cpufreq.c b/drivers/cpufreq/rasp= berrypi-cpufreq.c > new file mode 100644 > index 000000000000..99b59d5a50aa > --- /dev/null > +++ b/drivers/cpufreq/raspberrypi-cpufreq.c [...] > + > +/* > + * Since the driver depends on clk-raspberrypi, which may return EPROBE_= DEFER, > + * all the activity is performed in the probe, which may be defered as w= ell. > + */ > +static struct platform_driver raspberrypi_cpufreq_driver =3D { > + .driver =3D { > + .name =3D "raspberrypi-cpufreq", > + }, > + .probe =3D raspberrypi_cpufreq_probe, > + .remove =3D raspberrypi_cpufreq_remove, > +}; > +module_platform_driver(raspberrypi_cpufreq_driver); How does this driver probe? Do you have a node in DT named raspberrypi-cpufreq that matches and probes this? I would think this would follow the drivers/cpufreq/cpufreq-dt-platdev.c design where it's an initcall that probes the board compatible string. Or, if it depends on clk-raspberrypi probing, maybe it could create the platform device in that drivers probe function. > + > +MODULE_AUTHOR("Nicolas Saenz Julienne +MODULE_DESCRIPTION("Raspberry Pi cpufreq driver"); > +MODULE_LICENSE("GPL"); > +MODULE_ALIAS("platform:raspberrypi-cpufreq"); I don't think the module alias is needed anymore.