From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752638AbcCXPJG (ORCPT ); Thu, 24 Mar 2016 11:09:06 -0400 Received: from regular1.263xmail.com ([211.150.99.137]:47695 "EHLO regular1.263xmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752394AbcCXPJA (ORCPT ); Thu, 24 Mar 2016 11:09:00 -0400 X-263anti-spam: KSV:0; X-MAIL-GRAY: 0 X-MAIL-DELIVERY: 1 X-KSVirus-check: 0 X-ABS-CHECKED: 4 X-ADDR-CHECKED: 0 X-RL-SENDER: xf@rock-chips.com X-FST-TO: huangtao@rock-chips.com X-SENDER-IP: 58.22.7.114 X-LOGIN-NAME: xf@rock-chips.com X-UNIQUE-TAG: X-ATTACHMENT-NUM: 0 X-DNS-TYPE: 0 Subject: Re: [PATCH v2] cpufreq: rockchip: add driver To: Viresh Kumar , Feng Xiao References: <1458647848-48999-1-git-send-email-xf@rock-chips.com> <1458699487-58470-1-git-send-email-xf@rock-chips.com> <20160323044033.GQ5272@vireshk-i7> <56F35894.3020106@rock-chips.com> <20160324064324.GG22062@vireshk-i7> Cc: linux@arm.linux.org.uk, heiko@sntech.de, rjw@rjwysocki.net, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, wxt@rock-chips.com, zyw@rock-chips.com, jay.xu@rock-chips.com, tim.chen@rock-chips.com, xxx@rock-chips.com, huangtao@rock-chips.com From: Finley Xiao Message-ID: <56F40328.5090001@rock-chips.com> Date: Thu, 24 Mar 2016 23:09:28 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.0 MIME-Version: 1.0 In-Reply-To: <20160324064324.GG22062@vireshk-i7> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Viresh, can we add a of_match_table with a common compatible name as follows ? --- a/drivers/cpufreq/cpufreq-dt.c +++ b/drivers/cpufreq/cpufreq-dt.c @@ -470,10 +470,16 @@ static int dt_cpufreq_remove(struct platform_device *pdev) cpufreq_unregister_driver(&dt_cpufreq_driver); return 0; } +static const struct of_device_id dt_cpufreq_of_match[] = { + { .compatible = "***,***", }, + { } +}; +MODULE_DEVICE_TABLE(of, dt_cpufreq_of_match); static struct platform_driver dt_cpufreq_platdrv = { .driver = { .name = "cpufreq-dt", + .of_match_table = dt_cpufreq_of_match, }, --- a/arch/arm64/boot/dts/rockchip/rk3366.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3366.dtsi + cpufreq { + compatible = "***,***"; + } Does it create a DT node for a dummy device too ? 在 2016/3/24 14:43, Viresh Kumar 写道: > On 24-03-16, 11:01, Feng Xiao wrote: >> hi all, >> I found that it could match the cpufreq-dt driver succesfully only with >> the following changes. >> --- a/arch/arm64/boot/dts/rockchip/rk3366.dtsi >> +++ b/arch/arm64/boot/dts/rockchip/rk3366.dtsi >> @@ -139,6 +139,10 @@ >> }; >> }; >> >> + cpufreq-dt { //the node name must be cpufreq-dt >> + compatible = "rockchip,cpufreq"; // the compatible name is >> insignificant >> + }; >> + > Its not allowed to create a DT node for a dummy device and so we never > followed this way. > > I have just sent a patchset and cc'd you: > "[PATCH 0/3] cpufreq: dt: Create platform device from generic code" > > and so this patch shall get replaced now. > -- Finley