devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Boyd <sboyd-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
To: Paul Cercueil <paul-icTtO2rgO2OTuSrc4Mpeew@public.gmane.org>
Cc: Ralf Baechle <ralf-6z/3iImG2C8G8FEW9MqTrA@public.gmane.org>,
	Michael Turquette
	<mturquette-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>,
	Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Paul Burton <paul.burton-1AXoQHu6uovQT0dZR+AlfA@public.gmane.org>,
	Maarten ter Huurne
	<maarten-Ph2Y2OKCxY1M656bX5wj8A@public.gmane.org>,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-mips-6z/3iImG2C8G8FEW9MqTrA@public.gmane.org,
	linux-clk-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 04/15] clk: Add Ingenic jz4770 CGU driver
Date: Wed, 7 Jun 2017 13:59:43 -0700	[thread overview]
Message-ID: <20170607205943.GO20170@codeaurora.org> (raw)
In-Reply-To: <20170607200439.24450-5-paul-icTtO2rgO2OTuSrc4Mpeew@public.gmane.org>

On 06/07, Paul Cercueil wrote:
> Add support for the clocks provided by the CGU in the Ingenic JZ4770
> SoC.
> 
> Signed-off-by: Paul Cercueil <paul-icTtO2rgO2OTuSrc4Mpeew@public.gmane.org>
> Signed-off-by: Maarten ter Huurne <maarten-Ph2Y2OKCxY1M656bX5wj8A@public.gmane.org>

Signed-off chain looks odd. Sender should be last in the chain
and first is typically author.

WARNING: struct clk_ops should normally be const
#118: FILE: drivers/clk/ingenic/jz4770-cgu.c:84:
+struct clk_ops jz4770_uhc_phy_ops = {

WARNING: struct clk_ops should normally be const
#149: FILE: drivers/clk/ingenic/jz4770-cgu.c:115:
+struct clk_ops jz4770_otg_phy_ops = {

drivers/clk/ingenic/jz4770-cgu.c:84:16:
warning: symbol 'jz4770_uhc_phy_ops' was not declared. Should it
be static?
drivers/clk/ingenic/jz4770-cgu.c:115:16:
warning: symbol 'jz4770_otg_phy_ops' was not declared. Should it
be static?

> diff --git a/drivers/clk/ingenic/jz4770-cgu.c b/drivers/clk/ingenic/jz4770-cgu.c
> new file mode 100644
> index 000000000000..993db42df5fc
> --- /dev/null
> +++ b/drivers/clk/ingenic/jz4770-cgu.c
> @@ -0,0 +1,485 @@
> +/*
> + * JZ4770 SoC CGU driver
> + *
> + * Copyright 2017, Paul Cercueil <paul-icTtO2rgO2OTuSrc4Mpeew@public.gmane.org>
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License version 2 or later
> + * as published by the Free Software Foundation.
> + */
> +
> +#include <linux/bitops.h>
> +#include <linux/clk-provider.h>
> +#include <linux/delay.h>
> +#include <linux/of.h>
> +#include <linux/syscore_ops.h>
> +#include <dt-bindings/clock/jz4770-cgu.h>
> +#include "cgu.h"
> +
[..]
> +
> +static struct syscore_ops jz4770_cgu_pm_ops = {
> +	.suspend = jz4770_cgu_pm_suspend,
> +	.resume = jz4770_cgu_pm_resume,
> +};
> +#endif /* CONFIG_PM_SLEEP */
> +
> +static void __init jz4770_cgu_init(struct device_node *np)
> +{
> +	int retval;
> +
> +	cgu = ingenic_cgu_new(jz4770_cgu_clocks,
> +			      ARRAY_SIZE(jz4770_cgu_clocks), np);
> +	if (!cgu)
> +		pr_err("%s: failed to initialise CGU\n", __func__);
> +
> +	retval = ingenic_cgu_register_clocks(cgu);
> +	if (retval)
> +		pr_err("%s: failed to register CGU Clocks\n", __func__);
> +
> +#ifdef CONFIG_PM_SLEEP

if (IS_ENABLED(CONFIG_PM_SLEEP) instead?

> +	register_syscore_ops(&jz4770_cgu_pm_ops);
> +#endif
> +}
> +CLK_OF_DECLARE(jz4770_cgu, "ingenic,jz4770-cgu", jz4770_cgu_init);

Any reason this can't be a platform driver? Please add a comment
above CLK_OF_DECLARE describing what is preventing that.

> diff --git a/include/dt-bindings/clock/jz4770-cgu.h b/include/dt-bindings/clock/jz4770-cgu.h
> new file mode 100644
> index 000000000000..54b8b2ae4a73
> --- /dev/null
> +++ b/include/dt-bindings/clock/jz4770-cgu.h

Can you split this file off into a different patch? That way clk
tree can apply clk patches on top of a stable branch where this
file lives by itself.

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
--
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

  parent reply	other threads:[~2017-06-07 20:59 UTC|newest]

Thread overview: 92+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-07 20:04 [PATCH 00/15] Ingenic JZ4770 and GCW Zero patchset Paul Cercueil
2017-06-07 20:04 ` [PATCH 01/15] clk: ingenic: Fix recalc_rate for clocks with fixed divider Paul Cercueil
2017-06-20 15:18   ` [PATCH v2 01/17] clk: ingenic: Use const pointer to clk_ops in struct Paul Cercueil
2017-06-20 15:18     ` [PATCH v2 02/17] clk: ingenic: Fix recalc_rate for clocks with fixed divider Paul Cercueil
2017-06-20 15:18     ` [PATCH v2 03/17] clk: ingenic: support PLLs with no bypass bit Paul Cercueil
2017-06-20 15:18     ` [PATCH v2 04/17] clk: ingenic: Add code to enable/disable PLLs Paul Cercueil
2017-06-20 15:18     ` [PATCH v2 05/17] clk: Add Ingenic jz4770 CGU driver Paul Cercueil
2017-06-20 15:18     ` [PATCH v2 06/17] serial: core: Make uart_parse_options take const char* argument Paul Cercueil
2017-06-20 15:18     ` [PATCH v2 07/17] serial: 8250_ingenic: Add support for the JZ4770 SoC Paul Cercueil
2017-06-20 15:18     ` [PATCH v2 08/17] serial: 8250_ingenic: Parse earlycon options Paul Cercueil
2017-06-20 15:18     ` [PATCH v2 09/17] MIPS: Setup boot_command_line before plat_mem_setup Paul Cercueil
     [not found]     ` <20170620151855.19399-1-paul-icTtO2rgO2OTuSrc4Mpeew@public.gmane.org>
2017-06-20 15:18       ` [PATCH v2 10/17] MIPS: ingenic: Use common cmdline handling code Paul Cercueil
2017-06-20 15:18     ` [PATCH v2 11/17] MIPS: platform: add machtype IDs for more Ingenic SoCs Paul Cercueil
2017-06-20 15:18     ` [PATCH v2 12/17] MIPS: ingenic: Add machine info for supported boards Paul Cercueil
2017-06-20 15:18     ` [PATCH v2 13/17] MIPS: ingenic: Initial JZ4770 support Paul Cercueil
2017-06-20 15:18     ` [PATCH v2 14/17] MIPS: JZ4770: Work around config2 misreporting associativity Paul Cercueil
2017-06-20 15:18     ` [PATCH v2 15/17] MIPS: JZ4770: Workaround for corrupted DMA transfers Paul Cercueil
     [not found]       ` <20170620151855.19399-15-paul-icTtO2rgO2OTuSrc4Mpeew@public.gmane.org>
2017-06-22  7:21         ` Marcin Nowakowski
2017-06-26 13:32           ` Paul Cercueil
2017-06-20 15:18     ` [PATCH v2 16/17] devicetree/bindings: Add GCW vendor prefix Paul Cercueil
2017-06-20 15:18     ` [PATCH v2 17/17] MIPS: ingenic: Initial GCW Zero support Paul Cercueil
2017-06-21 21:50     ` [PATCH v2 01/17] clk: ingenic: Use const pointer to clk_ops in struct Stephen Boyd
2017-06-26 13:34       ` Paul Cercueil
2017-07-02 16:29   ` [PATCH v3 00/18] JZ4770 support Paul Cercueil
2017-07-02 16:29     ` [PATCH v3 01/18] clk: ingenic: Use const pointer to clk_ops in struct Paul Cercueil
2017-07-12 23:20       ` Stephen Boyd
     [not found]         ` <20170712232037.GR22780-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2017-07-13 10:07           ` [PATCH v3 01/18] clk: ingenic: Use const pointer to clk_ops in struct, Paul Cercueil
     [not found]             ` <ca4da3fa3067a7301f8fc1539e9e4362-icTtO2rgO2OTuSrc4Mpeew@public.gmane.org>
2017-07-13 11:49               ` [PATCH v3 01/18] clk: ingenic: Use const pointer to clk_ops in struct Ralf Baechle
     [not found]                 ` <20170713114916.GA17495-6z/3iImG2C8G8FEW9MqTrA@public.gmane.org>
2017-07-13 17:50                   ` Stephen Boyd
2017-12-28 13:56       ` [PATCH v4 00/15] Ingenic JZ4770 and GCW Zero support Paul Cercueil
2017-12-28 13:56         ` [PATCH v4 02/15] clk: ingenic: Fix recalc_rate for clocks with fixed divider Paul Cercueil
2017-12-28 18:36           ` Stephen Boyd
2017-12-28 13:56         ` [PATCH v4 03/15] clk: ingenic: support PLLs with no bypass bit Paul Cercueil
2017-12-28 18:36           ` Stephen Boyd
2017-12-28 13:56         ` [PATCH v4 04/15] clk: ingenic: Add code to enable/disable PLLs Paul Cercueil
2017-12-28 18:39           ` Stephen Boyd
2017-12-28 13:56         ` [PATCH v4 05/15] dt-bindings: clock: Add jz4770-cgu.h header Paul Cercueil
2017-12-28 18:36           ` Stephen Boyd
2017-12-28 13:56         ` [PATCH v4 06/15] clk: Add Ingenic jz4770 CGU driver Paul Cercueil
2017-12-28 18:38           ` Stephen Boyd
     [not found]           ` <20171228135634.30000-7-paul-icTtO2rgO2OTuSrc4Mpeew@public.gmane.org>
2017-12-29 12:55             ` Philippe Ombredanne
2017-12-29 15:02               ` Paul Cercueil
2017-12-28 13:56         ` [PATCH v4 07/15] MIPS: Setup boot_command_line before plat_mem_setup Paul Cercueil
2017-12-28 13:56         ` [PATCH v4 09/15] MIPS: platform: add machtype IDs for more Ingenic SoCs Paul Cercueil
2017-12-28 13:56         ` [PATCH v4 10/15] MIPS: ingenic: Add machine info for supported boards Paul Cercueil
2017-12-28 13:56         ` [PATCH v4 11/15] MIPS: ingenic: Initial JZ4770 support Paul Cercueil
2017-12-28 13:56         ` [PATCH v4 12/15] MIPS: JZ4770: Work around config2 misreporting associativity Paul Cercueil
2017-12-28 13:56         ` [PATCH v4 13/15] MIPS: JZ4770: Workaround for corrupted DMA transfers Paul Cercueil
2017-12-28 13:56         ` [PATCH v4 14/15] devicetree/bindings: Add GCW vendor prefix Paul Cercueil
     [not found]         ` <20171228135634.30000-1-paul-icTtO2rgO2OTuSrc4Mpeew@public.gmane.org>
2017-12-28 13:56           ` [PATCH v4 01/15] clk: ingenic: Use const pointer to clk_ops in struct Paul Cercueil
2017-12-28 13:56           ` [PATCH v4 08/15] MIPS: ingenic: Use common cmdline handling code Paul Cercueil
2017-12-28 13:56           ` [PATCH v4 15/15] MIPS: ingenic: Initial GCW Zero support Paul Cercueil
2017-07-02 16:30     ` [PATCH v3 02/18] clk: ingenic: Fix recalc_rate for clocks with fixed divider Paul Cercueil
2017-07-02 16:30     ` [PATCH v3 03/18] clk: ingenic: support PLLs with no bypass bit Paul Cercueil
2017-07-02 16:30     ` [PATCH v3 04/18] clk: ingenic: Add code to enable/disable PLLs Paul Cercueil
2017-07-02 16:30     ` [PATCH v3 05/18] dt-bindings: clock: Add jz4770-cgu.h header Paul Cercueil
2017-07-02 16:30     ` [PATCH v3 06/18] clk: Add Ingenic jz4770 CGU driver Paul Cercueil
2017-07-02 16:30     ` [PATCH v3 07/18] serial: core: Make uart_parse_options take const char* argument Paul Cercueil
2017-07-02 16:30     ` [PATCH v3 08/18] serial: 8250_ingenic: Add support for the JZ4770 SoC Paul Cercueil
2017-07-02 16:30     ` [PATCH v3 09/18] serial: 8250_ingenic: Parse earlycon options Paul Cercueil
2017-07-02 16:30     ` [PATCH v3 10/18] MIPS: Setup boot_command_line before plat_mem_setup Paul Cercueil
2017-07-02 16:30     ` [PATCH v3 11/18] MIPS: ingenic: Use common cmdline handling code Paul Cercueil
2017-07-02 16:30     ` [PATCH v3 12/18] MIPS: platform: add machtype IDs for more Ingenic SoCs Paul Cercueil
2017-07-02 16:30     ` [PATCH v3 13/18] MIPS: ingenic: Add machine info for supported boards Paul Cercueil
2017-07-02 16:30     ` [PATCH v3 14/18] MIPS: ingenic: Initial JZ4770 support Paul Cercueil
2017-07-02 16:30     ` [PATCH v3 15/18] MIPS: JZ4770: Work around config2 misreporting associativity Paul Cercueil
2017-07-02 16:30     ` [PATCH v3 16/18] MIPS: JZ4770: Workaround for corrupted DMA transfers Paul Cercueil
2017-07-02 16:30     ` [PATCH v3 17/18] devicetree/bindings: Add GCW vendor prefix Paul Cercueil
2017-07-02 16:30     ` [PATCH v3 18/18] MIPS: ingenic: Initial GCW Zero support Paul Cercueil
2017-06-07 20:04 ` [PATCH 02/15] clk: ingenic: support PLLs with no bypass bit Paul Cercueil
2017-06-07 20:04 ` [PATCH 03/15] clk: ingenic: Add code to enable/disable PLLs Paul Cercueil
2017-06-07 20:04 ` [PATCH 04/15] clk: Add Ingenic jz4770 CGU driver Paul Cercueil
     [not found]   ` <20170607200439.24450-5-paul-icTtO2rgO2OTuSrc4Mpeew@public.gmane.org>
2017-06-07 20:59     ` Stephen Boyd [this message]
2017-06-08  8:40       ` Maarten ter Huurne
2017-06-08 21:10       ` Paul Cercueil
2017-06-26 13:50       ` Paul Cercueil
2017-06-26 22:49         ` Stephen Boyd
2017-06-07 20:04 ` [PATCH 05/15] serial: 8250_ingenic: Add support for the JZ4770 SoC Paul Cercueil
     [not found]   ` <20170607200439.24450-6-paul-icTtO2rgO2OTuSrc4Mpeew@public.gmane.org>
2017-06-09 14:22     ` Rob Herring
2017-06-07 20:04 ` [PATCH 06/15] serial: 8250_ingenic: Parse earlycon options Paul Cercueil
2017-06-08  7:31   ` Marcin Nowakowski
2017-06-08 21:12     ` Paul Cercueil
2017-06-07 20:04 ` [PATCH 07/15] MIPS: Setup boot_command_line before plat_mem_setup Paul Cercueil
2017-06-07 20:04 ` [PATCH 08/15] MIPS: ingenic: Use common cmdline handling code Paul Cercueil
2017-06-07 20:04 ` [PATCH 09/15] MIPS: platform: add machtype IDs for more Ingenic SoCs Paul Cercueil
2017-06-07 20:04 ` [PATCH 10/15] MIPS: ingenic: Add machine info for supported boards Paul Cercueil
2017-06-07 20:04 ` [PATCH 11/15] MIPS: ingenic: Initial JZ4770 support Paul Cercueil
2017-06-07 20:04 ` [PATCH 12/15] MIPS: JZ4770: Work around config2 misreporting associativity Paul Cercueil
2017-06-07 20:04 ` [PATCH 13/15] MIPS: JZ4770: Workaround for corrupted DMA transfers Paul Cercueil
2017-06-07 20:04 ` [PATCH 14/15] devicetree/bindings: Add GCW vendor prefix Paul Cercueil
2017-06-09 14:24   ` Rob Herring
2017-06-07 20:04 ` [PATCH 15/15] MIPS: ingenic: Initial GCW Zero support Paul Cercueil

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=20170607205943.GO20170@codeaurora.org \
    --to=sboyd-sgv2jx0feol9jmxxk+q4oq@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-clk-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-mips-6z/3iImG2C8G8FEW9MqTrA@public.gmane.org \
    --cc=maarten-Ph2Y2OKCxY1M656bX5wj8A@public.gmane.org \
    --cc=mturquette-rdvid1DuHRBWk0Htik3J/w@public.gmane.org \
    --cc=paul-icTtO2rgO2OTuSrc4Mpeew@public.gmane.org \
    --cc=paul.burton-1AXoQHu6uovQT0dZR+AlfA@public.gmane.org \
    --cc=ralf-6z/3iImG2C8G8FEW9MqTrA@public.gmane.org \
    --cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@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).