From: "Heiko Stübner" <heiko@sntech.de> To: Feng Xiao <xf@rock-chips.com> Cc: linux@arm.linux.org.uk, rjw@rjwysocki.net, viresh.kumar@linaro.org, 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 v1] cpufreq: rockchip: add driver Date: Tue, 22 Mar 2016 17:07:36 +0100 [thread overview] Message-ID: <1758347.rheI35MbRd@diego> (raw) In-Reply-To: <1458647848-48999-1-git-send-email-xf@rock-chips.com> Hi, Am Dienstag, 22. März 2016, 19:57:28 schrieb Feng Xiao: > This driver will directly use cpufreq-dt driver as backend. > > As there is not a generic devicetree board file(rockchip.c) > on ARM64 architecture, so remove platform_device_register_simple > in rockchip.c and add a new cpufreq driver to support Rockchip > SoCs. > > Signed-off-by: Feng Xiao <xf@rock-chips.com> some hints regarding the soc-selection below, otherwise this looks nice. Reviewed-by: Heiko Stuebner <heiko@sntech.de> [includes an Ack for the mach-rockchip change ;-) ] [...] > diff --git a/drivers/cpufreq/rockchip-cpufreq.c > b/drivers/cpufreq/rockchip-cpufreq.c new file mode 100644 > index 0000000..65c1de9 > --- /dev/null > +++ b/drivers/cpufreq/rockchip-cpufreq.c > @@ -0,0 +1,55 @@ > +/* > + * Rockchip Platforms CPUFreq Support > + * > + * Copyright (C) 2016 Fuzhou Rockchip Electronics Co., Ltd > + * > + * Feng Xiao <xf@rock-chips.com> > + * > + * This program is free software; you can redistribute it and/or modify > + * it under the terms of the GNU General Public License version 2 as > + * published by the Free Software Foundation. > + * > + * This program is distributed "as is" WITHOUT ANY WARRANTY of any > + * kind, whether express or implied; without even the implied warranty > + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > + * GNU General Public License for more details. > + */ > + > +#include <linux/err.h> > +#include <linux/init.h> > +#include <linux/kernel.h> > +#include <linux/module.h> > +#include <linux/of.h> > +#include <linux/platform_device.h> > + > +static const char * const rockchip_compat[] = { > + "rockchip,rk2928", + "rockchip,rk3036", > + "rockchip,rk3066a", > + "rockchip,rk3066b", > + "rockchip,rk3188", + "rockchip,rk3228", > + "rockchip,rk3288", > + "rockchip,rk3366", > + "rockchip,rk3368", > + "rockchip,rk3399", > +}; > + > +static int __init rockchip_cpufreq_driver_init(void) > +{ > + struct platform_device *pdev; > + int i; > + > + for (i = 0; i < ARRAY_SIZE(rockchip_compat); i++) { > + if (of_machine_is_compatible(rockchip_compat[i])) { > + pdev = platform_device_register_simple("cpufreq-dt", > + -1, NULL, 0); > + return PTR_ERR_OR_ZERO(pdev); > + } > + } > + > + return -ENODEV; > +} > +module_init(rockchip_cpufreq_driver_init); > + > +MODULE_AUTHOR("Feng Xiao <xf@rock-chips.com>"); > +MODULE_DESCRIPTION("Rockchip cpufreq driver"); > +MODULE_LICENSE("GPL v2");
WARNING: multiple messages have this Message-ID (diff)
From: heiko@sntech.de (Heiko Stübner) To: linux-arm-kernel@lists.infradead.org Subject: [PATCH v1] cpufreq: rockchip: add driver Date: Tue, 22 Mar 2016 17:07:36 +0100 [thread overview] Message-ID: <1758347.rheI35MbRd@diego> (raw) In-Reply-To: <1458647848-48999-1-git-send-email-xf@rock-chips.com> Hi, Am Dienstag, 22. M?rz 2016, 19:57:28 schrieb Feng Xiao: > This driver will directly use cpufreq-dt driver as backend. > > As there is not a generic devicetree board file(rockchip.c) > on ARM64 architecture, so remove platform_device_register_simple > in rockchip.c and add a new cpufreq driver to support Rockchip > SoCs. > > Signed-off-by: Feng Xiao <xf@rock-chips.com> some hints regarding the soc-selection below, otherwise this looks nice. Reviewed-by: Heiko Stuebner <heiko@sntech.de> [includes an Ack for the mach-rockchip change ;-) ] [...] > diff --git a/drivers/cpufreq/rockchip-cpufreq.c > b/drivers/cpufreq/rockchip-cpufreq.c new file mode 100644 > index 0000000..65c1de9 > --- /dev/null > +++ b/drivers/cpufreq/rockchip-cpufreq.c > @@ -0,0 +1,55 @@ > +/* > + * Rockchip Platforms CPUFreq Support > + * > + * Copyright (C) 2016 Fuzhou Rockchip Electronics Co., Ltd > + * > + * Feng Xiao <xf@rock-chips.com> > + * > + * This program is free software; you can redistribute it and/or modify > + * it under the terms of the GNU General Public License version 2 as > + * published by the Free Software Foundation. > + * > + * This program is distributed "as is" WITHOUT ANY WARRANTY of any > + * kind, whether express or implied; without even the implied warranty > + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > + * GNU General Public License for more details. > + */ > + > +#include <linux/err.h> > +#include <linux/init.h> > +#include <linux/kernel.h> > +#include <linux/module.h> > +#include <linux/of.h> > +#include <linux/platform_device.h> > + > +static const char * const rockchip_compat[] = { > + "rockchip,rk2928", + "rockchip,rk3036", > + "rockchip,rk3066a", > + "rockchip,rk3066b", > + "rockchip,rk3188", + "rockchip,rk3228", > + "rockchip,rk3288", > + "rockchip,rk3366", > + "rockchip,rk3368", > + "rockchip,rk3399", > +}; > + > +static int __init rockchip_cpufreq_driver_init(void) > +{ > + struct platform_device *pdev; > + int i; > + > + for (i = 0; i < ARRAY_SIZE(rockchip_compat); i++) { > + if (of_machine_is_compatible(rockchip_compat[i])) { > + pdev = platform_device_register_simple("cpufreq-dt", > + -1, NULL, 0); > + return PTR_ERR_OR_ZERO(pdev); > + } > + } > + > + return -ENODEV; > +} > +module_init(rockchip_cpufreq_driver_init); > + > +MODULE_AUTHOR("Feng Xiao <xf@rock-chips.com>"); > +MODULE_DESCRIPTION("Rockchip cpufreq driver"); > +MODULE_LICENSE("GPL v2");
next prev parent reply other threads:[~2016-03-22 16:07 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 [this message] 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 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=1758347.rheI35MbRd@diego \ --to=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: linkBe 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.