From: xuejiancheng <xuejiancheng-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
To: Paul Bolle <pebolle-IWqWACnzNjzz+pZb47iToQ@public.gmane.org>
Cc: mturquette-rdvid1DuHRBWk0Htik3J/w@public.gmane.org,
sboyd-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org,
p.zabel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org,
robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
pawel.moll-5wv7dgnIgG8@public.gmane.org,
mark.rutland-5wv7dgnIgG8@public.gmane.org,
ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org,
galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org,
linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org,
khilman-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org,
arnd-r2nGTMty4D4@public.gmane.org,
olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org,
xuwei5-C8/M+/jPZTeaMJb+Lgu22Q@public.gmane.org,
haojian.zhuang-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org,
zhangfei.gao-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org,
bintian.wang-hv44wF8Li93QT0dZR+AlfA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-clk-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
yanhaifeng-C8/M+/jPZTeaMJb+Lgu22Q@public.gmane.org,
yanghongwei-C8/M+/jPZTeaMJb+Lgu22Q@public.gmane.org,
suwenping-C8/M+/jPZTeaMJb+Lgu22Q@public.gmane.org,
raojun-C8/M+/jPZTeaMJb+Lgu22Q@public.gmane.org,
ml.yang-C8/M+/jPZTeaMJb+Lgu22Q@public.gmane.org,
gaofei-C8/M+/jPZTeaMJb+Lgu22Q@public.gmane.org,
zhangzhenxing-C8/M+/jPZTeaMJb+Lgu22Q@public.gmane.org,
xuejiancheng-C8/M+/jPZTeaMJb+Lgu22Q@public.gmane.org,
lidongpo-C8/M+/jPZTeaMJb+Lgu22Q@public.gmane.org
Subject: Re: [PATCH v7 1/6] clk: hisilicon: add CRG driver for hi3519 soc
Date: Wed, 27 Jan 2016 11:28:14 +0800 [thread overview]
Message-ID: <56A8394E.2040207@huawei.com> (raw)
In-Reply-To: <1453771063.17181.56.camel-IWqWACnzNjzz+pZb47iToQ@public.gmane.org>
Hi Paul Bolle,
Thank you for your reply.
On 2016/1/26 9:17, Paul Bolle wrote:
> On ma, 2016-01-25 at 11:01 +0800, Jiancheng Xue wrote:
>> --- a/drivers/clk/hisilicon/Kconfig
>> +++ b/drivers/clk/hisilicon/Kconfig
>
>> +config COMMON_CLK_HI3519
>> + bool "Hi3519 Clock Driver"
>> + depends on ARCH_HISI
>> + default y
>> + help
>> + Build the clock driver for hi3519.
>
>> --- a/drivers/clk/hisilicon/Makefile
>> +++ b/drivers/clk/hisilicon/Makefile
>
>> +obj-$(CONFIG_COMMON_CLK_HI3519) += clk-hi3519.o
>
> If I parsed the above correctly clk-hi3519.o can only be built-in,
> right?
>
Yes. You are right.
But this clock driver should be able to be compiled as a module.
Even though it is preferred to be built-in.
I'll fix it in next version. Thank you.
Regards,
Jiancheng
>> --- /dev/null
>> +++ b/drivers/clk/hisilicon/clk-hi3519.c
>
>> +#include <linux/module.h>
>
> So is this include actually needed?
>
>> +static int hi3519_clk_probe(struct platform_device *pdev)
>> +{
>> + struct device_node *np = pdev->dev.of_node;
>> + struct hisi_clock_data *clk_data;
>> +
>> + clk_data = hisi_clk_init(np, HI3519_NR_CLKS);
>> + if (!clk_data)
>> + return -ENODEV;
>> +
>> + hisi_clk_register_fixed_rate(hi3519_fixed_rate_clks,
>> +
>> ARRAY_SIZE(hi3519_fixed_rate_clks),
>> + clk_data);
>> + hisi_clk_register_mux(hi3519_mux_clks,
>> ARRAY_SIZE(hi3519_mux_clks),
>> + clk_data);
>> + hisi_clk_register_gate(hi3519_gate_clks,
>> + ARRAY_SIZE(hi3519_gate_clks), clk_data);
>> +
>> + return hisi_reset_init(np);
>> +}
>
> (evolution 3.16.5 makes replying to code quite a challenge.)
>
>> +static const struct of_device_id hi3519_clk_match_table[] = {
>> + { .compatible = "hisilicon,hi3519-crg" },
>> + { }
>> +};
>> +MODULE_DEVICE_TABLE(of, hi3519_clk_match_table);
>
> Last time I checked MODULE_DEVICE_TABLE is preprocessed away for built
> -in code.
>
>> +static void __exit hi3519_clk_exit(void)
>> +{
>> + platform_driver_unregister(&hi3519_clk_driver);
>> +}
>> +module_exit(hi3519_clk_exit);
>
> Not needed for built-in only code.
>
>> +MODULE_DESCRIPTION("HiSilicon Hi3519 Clock Driver");
>
> Ditto.
>
>> --- a/drivers/clk/hisilicon/clk.c
>> +++ b/drivers/clk/hisilicon/clk.c
>
>> +EXPORT_SYMBOL(hisi_clk_init);
>
> What module uses this export?
>
>> +EXPORT_SYMBOL(hisi_clk_register_fixed_rate);
>
> Ditto.
>
>> +EXPORT_SYMBOL(hisi_clk_register_fixed_factor);
>
> Ditto.
>
>> +EXPORT_SYMBOL(hisi_clk_register_mux);
>
> Ditto.
>
>> +EXPORT_SYMBOL(hisi_clk_register_divider);
>
> Ditto.
>
>> +EXPORT_SYMBOL(hisi_clk_register_gate);
>
> Ditto.
>
>> +EXPORT_SYMBOL(hisi_clk_register_gate_sep);
>
> Ditto.
>
>> --- /dev/null
>> +++ b/drivers/clk/hisilicon/reset.c
>
>> +int hisi_reset_init(struct device_node *np)
>> +{
>> + [...]
>> +}
>> +EXPORT_SYMBOL(hisi_reset_init);
>
> Ditto.
>
>> --- /dev/null
>> +++ b/drivers/clk/hisilicon/reset.h
>
>> +#ifdef CONFIG_RESET_CONTROLLER
>> +int hisi_reset_init(struct device_node *np);
>> +#else
>> +static inline int hisi_reset_init(struct device_node *np)
>> +{
>> + return 0;
>> +}
>> +#endif
>
> Thanks,
>
>
> Paul Bolle
>
> .
>
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2016-01-27 3:28 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-25 3:01 [PATCH v7 0/6] ARM: hisi: Add initial support including clock driver for Hi3519 soc Jiancheng Xue
[not found] ` <1453690883-31220-1-git-send-email-xuejiancheng-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2016-01-25 3:01 ` [PATCH v7 1/6] clk: hisilicon: add CRG driver for hi3519 soc Jiancheng Xue
2016-01-26 1:17 ` Paul Bolle
[not found] ` <1453771063.17181.56.camel-IWqWACnzNjzz+pZb47iToQ@public.gmane.org>
2016-01-27 3:28 ` xuejiancheng [this message]
2016-01-25 3:01 ` [PATCH v7 2/6] ARM: hisi: add compatible string for Hi3519 soc Jiancheng Xue
2016-01-25 3:01 ` [PATCH v7 3/6] ARM: config: hisi: enable CONFIG_RESET_CONTROLLER Jiancheng Xue
2016-01-25 3:01 ` [PATCH v7 4/6] ARM: debug: add hi3519 debug uart Jiancheng Xue
2016-01-26 3:07 ` xuejiancheng
2016-01-25 3:01 ` [PATCH v7 5/6] ARM: dt-bindings: add device tree bindings for Hi3519 sysctrl Jiancheng Xue
2016-01-25 3:01 ` [PATCH v7 6/6] ARM: dts: add dts files for Hi3519 Jiancheng Xue
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=56A8394E.2040207@huawei.com \
--to=xuejiancheng-hv44wf8li93qt0dzr+alfa@public.gmane.org \
--cc=arnd-r2nGTMty4D4@public.gmane.org \
--cc=bintian.wang-hv44wF8Li93QT0dZR+AlfA@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
--cc=gaofei-C8/M+/jPZTeaMJb+Lgu22Q@public.gmane.org \
--cc=haojian.zhuang-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org \
--cc=khilman-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=lidongpo-C8/M+/jPZTeaMJb+Lgu22Q@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-clk-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org \
--cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
--cc=ml.yang-C8/M+/jPZTeaMJb+Lgu22Q@public.gmane.org \
--cc=mturquette-rdvid1DuHRBWk0Htik3J/w@public.gmane.org \
--cc=olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org \
--cc=p.zabel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org \
--cc=pawel.moll-5wv7dgnIgG8@public.gmane.org \
--cc=pebolle-IWqWACnzNjzz+pZb47iToQ@public.gmane.org \
--cc=raojun-C8/M+/jPZTeaMJb+Lgu22Q@public.gmane.org \
--cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=sboyd-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
--cc=suwenping-C8/M+/jPZTeaMJb+Lgu22Q@public.gmane.org \
--cc=xuejiancheng-C8/M+/jPZTeaMJb+Lgu22Q@public.gmane.org \
--cc=xuwei5-C8/M+/jPZTeaMJb+Lgu22Q@public.gmane.org \
--cc=yanghongwei-C8/M+/jPZTeaMJb+Lgu22Q@public.gmane.org \
--cc=yanhaifeng-C8/M+/jPZTeaMJb+Lgu22Q@public.gmane.org \
--cc=zhangfei.gao-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=zhangzhenxing-C8/M+/jPZTeaMJb+Lgu22Q@public.gmane.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).