[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <56F40328.5090001@rock-chips.com>
Date: Thu, 24 Mar 2016 23:09:28 +0800
From: Finley Xiao <finley.xiao@...k-chips.com>
To: Viresh Kumar <viresh.kumar@...aro.org>,
Feng Xiao <xf@...k-chips.com>
Cc: linux@....linux.org.uk, heiko@...ech.de, rjw@...ysocki.net,
linux-arm-kernel@...ts.infradead.org,
linux-rockchip@...ts.infradead.org, linux-kernel@...r.kernel.org,
linux-pm@...r.kernel.org, wxt@...k-chips.com, zyw@...k-chips.com,
jay.xu@...k-chips.com, tim.chen@...k-chips.com, xxx@...k-chips.com,
huangtao@...k-chips.com
Subject: Re: [PATCH v2] cpufreq: rockchip: add driver
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
Powered by blists - more mailing lists