All of lore.kernel.org
 help / color / mirror / Atom feed
From: Finley Xiao <finley.xiao@rock-chips.com>
To: Viresh Kumar <viresh.kumar@linaro.org>, Feng Xiao <xf@rock-chips.com>
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
Subject: Re: [PATCH v2] cpufreq: rockchip: add driver
Date: Thu, 24 Mar 2016 23:09:28 +0800	[thread overview]
Message-ID: <56F40328.5090001@rock-chips.com> (raw)
In-Reply-To: <20160324064324.GG22062@vireshk-i7>

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



WARNING: multiple messages have this Message-ID (diff)
From: finley.xiao@rock-chips.com (Finley Xiao)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2] cpufreq: rockchip: add driver
Date: Thu, 24 Mar 2016 23:09:28 +0800	[thread overview]
Message-ID: <56F40328.5090001@rock-chips.com> (raw)
In-Reply-To: <20160324064324.GG22062@vireshk-i7>

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

  reply	other threads:[~2016-03-24 15:09 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-18 12:10 [PATCH] cpufreq: rockchip: add driver Feng Xiao
2016-03-18 12:10 ` Feng Xiao
2016-03-18 12:56 ` Heiko Stübner
2016-03-18 12:56   ` Heiko Stübner
2016-03-21  9:50   ` Viresh Kumar
2016-03-21  9:50     ` Viresh Kumar
2016-03-21  9:54     ` Heiko Stübner
2016-03-21  9:54       ` Heiko Stübner
2016-03-21  9:58       ` Viresh Kumar
2016-03-21  9:58         ` Viresh Kumar
2016-03-21 13:24         ` Feng Xiao
2016-03-21 13:24           ` Feng Xiao
2016-03-21 15:13           ` Viresh Kumar
2016-03-21 15:13             ` Viresh Kumar
2016-03-21 15:13           ` Heiko Stübner
2016-03-21 15:13             ` Heiko Stübner
2016-03-21 15:52             ` Heiko Stübner
2016-03-21 15:52               ` Heiko Stübner
2016-03-22  1:28               ` Feng Xiao
2016-03-22  1:28                 ` Feng Xiao
2016-03-22  1:28                 ` Feng Xiao
2016-03-22 11:57 ` [PATCH v1] " Feng Xiao
2016-03-22 11:57   ` Feng Xiao
2016-03-22 16:07   ` Heiko Stübner
2016-03-22 16:07     ` Heiko Stübner
2016-03-23  2:18   ` [PATCH v2] " Feng Xiao
2016-03-23  2:18     ` Feng Xiao
2016-03-23  4:40     ` Viresh Kumar
2016-03-23  4:40       ` Viresh Kumar
2016-03-24  3:01       ` Feng Xiao
2016-03-24  3:01         ` Feng Xiao
2016-03-24  3:01         ` Feng Xiao
2016-03-24  6:43         ` Viresh Kumar
2016-03-24  6:43           ` Viresh Kumar
2016-03-24 15:09           ` Finley Xiao [this message]
2016-03-24 15:09             ` Finley Xiao
2016-03-25  4:42             ` Viresh Kumar
2016-03-25  4:42               ` Viresh Kumar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56F40328.5090001@rock-chips.com \
    --to=finley.xiao@rock-chips.com \
    --cc=heiko@sntech.de \
    --cc=huangtao@rock-chips.com \
    --cc=jay.xu@rock-chips.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=linux@arm.linux.org.uk \
    --cc=rjw@rjwysocki.net \
    --cc=tim.chen@rock-chips.com \
    --cc=viresh.kumar@linaro.org \
    --cc=wxt@rock-chips.com \
    --cc=xf@rock-chips.com \
    --cc=xxx@rock-chips.com \
    --cc=zyw@rock-chips.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.