Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp8417948ybi; Thu, 6 Jun 2019 12:00:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqyivFoCQOGMKrUnyHvZYDKuLwDDS8kUt14MR2UTN44FeuSnH3WI89TzLp9g76bYaQh1Kwdt X-Received: by 2002:a17:90a:290b:: with SMTP id g11mr1338152pjd.122.1559847619611; Thu, 06 Jun 2019 12:00:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559847619; cv=none; d=google.com; s=arc-20160816; b=vxmiqWjdCE8HJ5NHdkgQNO4QIGk31rr2JMASo9lT/YDLD9wWTHUpopgR9Q5+JzPC7V Tq8CPL9fX0XDvpRc/IvgRJDoQPfKCK3NmxuTeUB10EZlPlmgNF2qMMkeLXq0yDS1UC3W FGRL+ZORea+N1jJzBmqLbSdvj2knvFC2yzOQqvNI9d2bSxnTd+oyzDXtJDYRuhDRwtO/ BA8Rz8zR510yJ6d8x7sCN4jVUzKSbuayvXYzeZQKV77zz7I+8SUzwWTBFGg+M6gmmt0n Cz20xHG0tTBAH1+X16NxuKE9f039EV6WOCWdruJtPkZUnhonhwYUIL3vG1geaumiaR9k qeYQ== 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=FwaonWBbRgsIBUm+ocQtvBm3S59dez0S/kN8OriRvm8=; b=VCgqEkcrK8EGrWb5YlTIk9v4KqMr9scbUf4SVlY6JG0CO5SGL3G2+kZnKaK1/OICQu mtDZXXMjs+mjKv4S7I6Us/TsgdHIClpfVclC7pr7VbYEisHOk4IjD79b+5GUdwnx5ECq DLPXAemnTBGeNDcpv7An0m3WZhP7x3/eElxhBH2D6T3w5siE88KhWObq939tt/oAT9hD vAxw/92QzicIoQsqZgLlDYWo4DQJACYH0g1RC9Psc6v854NptebL5o4GTokagCu9bdVv /nl+WA0MACk9jrAWCg6QsE79QEP042spCmdZS+PWJ3zaFGI4HnXkYeyDv4cLqd7j+TxW MYwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=BwVfvF8v; 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 m10si2509822pgq.420.2019.06.06.12.00.03; Thu, 06 Jun 2019 12:00:19 -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=BwVfvF8v; 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 S1730168AbfFFRgK (ORCPT + 99 others); Thu, 6 Jun 2019 13:36:10 -0400 Received: from mail.kernel.org ([198.145.29.99]:59536 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726863AbfFFRgJ (ORCPT ); Thu, 6 Jun 2019 13:36:09 -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 2C3952083D; Thu, 6 Jun 2019 17:36:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1559842569; bh=pdq8qWIQe2AXVUfwDoQAl3L/f1GBHM2CtgEayvOOJOg=; h=In-Reply-To:References:To:Subject:From:Cc:Date:From; b=BwVfvF8v2Q979AL6mVsnn+nE3xjQrUjwkRimjqFEJhiFbEf8SR2T9nCVGTybohqdR AOoYSR0emcwc0BLcR1DkGl8wBOGZukuLZfVlGmkot+thcQ2z546O2TpYYmzUUHW5zj KTFdSDZq6kGs2i8xJJOqYFuh01E18mzPP7/+4R5Y= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: References: <20190606142255.29454-1-nsaenzjulienne@suse.de> <20190606142255.29454-5-nsaenzjulienne@suse.de> <20190606170949.4A46720652@mail.kernel.org> 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: linux-arm-kernel@lists.infradead.org, f.fainelli@gmail.com, ptesarik@suse.com, mturquette@baylibre.com, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, eric@anholt.net, bcm-kernel-feedback-list@broadcom.com, linux-rpi-kernel@lists.infradead.org, linux-clk@vger.kernel.org, mbrugger@suse.de, ssuloev@orpaltech.com User-Agent: alot/0.8.1 Date: Thu, 06 Jun 2019 10:36:08 -0700 Message-Id: <20190606173609.2C3952083D@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 10:22:16) > Hi Stephen, > Thanks for the review. >=20 > On Thu, 2019-06-06 at 10:09 -0700, Stephen Boyd wrote: > > Quoting Nicolas Saenz Julienne (2019-06-06 07:22:56) > > > diff --git a/drivers/cpufreq/raspberrypi-cpufreq.c > > > b/drivers/cpufreq/raspberrypi-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 > > > well. > > > + */ > > > +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); > >=20 > > 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. >=20 > Well you just reviewed that patch :) Ok. So what's your plan? >=20 > > > + > > > +MODULE_AUTHOR("Nicolas Saenz Julienne > > +MODULE_DESCRIPTION("Raspberry Pi cpufreq driver"); > > > +MODULE_LICENSE("GPL"); > > > +MODULE_ALIAS("platform:raspberrypi-cpufreq"); > >=20 > > I don't think the module alias is needed anymore. >=20 > That's surprising. I remember the driver not being loaded by udev without= it. >=20 Maybe I'm wrong. Could be not needed for DT based platform devices with an OF table.