mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "qinjian[覃健]" <qinjian@cqplus1.com>
To: Stephen Boyd <sboyd@kernel.org>,
	"robh+dt@kernel.org" <robh+dt@kernel.org>
Cc: "mturquette@baylibre.com" <mturquette@baylibre.com>,
	"tglx@linutronix.de" <tglx@linutronix.de>,
	"maz@kernel.org" <maz@kernel.org>,
	"p.zabel@pengutronix.de" <p.zabel@pengutronix.de>,
	"linux@armlinux.org.uk" <linux@armlinux.org.uk>,
	"broonie@kernel.org" <broonie@kernel.org>,
	"arnd@arndb.de" <arnd@arndb.de>,
	"stefan.wahren@i2se.com" <stefan.wahren@i2se.com>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-clk@vger.kernel.org" <linux-clk@vger.kernel.org>,
	"Wells Lu 呂芳騰" <wells.lu@sunplus.com>
Subject: RE: [PATCH v7 06/10] clk: Add Sunplus SP7021 clock driver
Date: Fri, 7 Jan 2022 07:55:18 +0000	[thread overview]
Message-ID: <51a2cbddc978400086271fc735493566@cqplus1.com> (raw)
In-Reply-To: <20220106004249.90484C36AEB@smtp.kernel.org>

> > +
> > +CLK_OF_DECLARE_DRIVER(sp_clkc, "sunplus,sp7021-clkc", sp_clk_setup);
> 
> Why CLK_OF_DECLARE_DRIVER? There should be a comment but better would be
> to make a platform driver instead. If the platform driver can't be used,
> we need to know what other device driver is probing based on this clkc
> compatible string.

Dear Stephen,

Sorry, I don't understand your comment.
Did you mean, like below:

static int sp7021_clk_probe(struct platform_device *pdev)
{
	......
	sp_clk_data->num = CLK_MAX;
	return devm_of_clk_add_hw_provider(dev, of_clk_hw_onecell_get, sp_clk_data);
}

static const struct of_device_id sp7021_clk_dt_ids[] = {
	{ .compatible = "sunplus,sp7021-clkc", },
	{ }
};
MODULE_DEVICE_TABLE(of, sp7021_clk_dt_ids);

static struct platform_driver sp7021_clk_driver = {
	.probe  = sp7021_clk_probe,
	.driver = {
		.name = "sp7021-clk",
		.of_match_table = sp7021_clk_dt_ids,
	},
};
builtin_platform_driver(sp7021_clk_driver);


But, It's doesn't work. 
Most other clk drivers used CLK_OF_DECLARE_DRIVER or CLK_OF_DECLARE.
I just take these as the reference and it's working.

  reply	other threads:[~2022-01-07  8:02 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-22  7:05 [PATCH v7 00/10] Add Sunplus SP7021 SoC Support Qin Jian
2021-12-22  7:05 ` [PATCH v7 01/10] dt-bindings: vendor-prefixes: Add Sunplus Qin Jian
2022-01-10  0:56   ` Rob Herring
2021-12-22  7:05 ` [PATCH v7 02/10] dt-bindings: arm: sunplus: Add bindings for Sunplus SP7021 SoC boards Qin Jian
2021-12-22  7:05 ` [PATCH v7 03/10] dt-bindings: reset: Add bindings for SP7021 reset driver Qin Jian
2021-12-22  7:06 ` [PATCH v7 04/10] reset: Add Sunplus " Qin Jian
2021-12-22  7:06 ` [PATCH v7 05/10] dt-bindings: clock: Add bindings for SP7021 clock driver Qin Jian
2021-12-22 17:05   ` Rob Herring
2022-01-06  0:36   ` Stephen Boyd
2021-12-22  7:06 ` [PATCH v7 06/10] clk: Add Sunplus " Qin Jian
2022-01-06  0:42   ` Stephen Boyd
2022-01-07  7:55     ` qinjian[覃健] [this message]
     [not found]       ` <20220108004112.2AB34C36AE9@smtp.kernel.org>
2022-01-10  6:37         ` qinjian[覃健]
2021-12-22  7:06 ` [PATCH v7 07/10] dt-bindings: interrupt-controller: Add bindings for SP7021 interrupt controller Qin Jian
2021-12-22  7:06 ` [PATCH v7 08/10] irqchip: Add Sunplus SP7021 interrupt controller driver Qin Jian
2021-12-22  7:06 ` [PATCH v7 09/10] ARM: sunplus: Add initial support for Sunplus SP7021 SoC Qin Jian
2021-12-22  7:06 ` [PATCH v7 10/10] ARM: sp7021_defconfig: Add Sunplus SP7021 defconfig Qin Jian

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=51a2cbddc978400086271fc735493566@cqplus1.com \
    --to=qinjian@cqplus1.com \
    --cc=arnd@arndb.de \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=maz@kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=p.zabel@pengutronix.de \
    --cc=robh+dt@kernel.org \
    --cc=sboyd@kernel.org \
    --cc=stefan.wahren@i2se.com \
    --cc=tglx@linutronix.de \
    --cc=wells.lu@sunplus.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome