From: "qinjian[覃健]" <qinjian@cqplus1.com>
To: Stephen Boyd <sboyd@kernel.org>
Cc: "krzysztof.kozlowski+dt@linaro.org"
<krzysztof.kozlowski+dt@linaro.org>,
"robh+dt@kernel.org" <robh+dt@kernel.org>,
"mturquette@baylibre.com" <mturquette@baylibre.com>,
"linux@armlinux.org.uk" <linux@armlinux.org.uk>,
"arnd@arndb.de" <arnd@arndb.de>,
"olof@lixom.net" <olof@lixom.net>,
"soc@kernel.org" <soc@kernel.org>,
"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>
Subject: RE: [PATCH v18 05/10] clk: Add Sunplus SP7021 clock driver
Date: Wed, 15 Jun 2022 02:25:22 +0000 [thread overview]
Message-ID: <aaf96491f1a94b5694003797853aa732@cqplus1.com> (raw)
In-Reply-To: <20220614192555.86436C3411B@smtp.kernel.org>
> > diff --git a/drivers/clk/clk-sp7021.c b/drivers/clk/clk-sp7021.c
> > new file mode 100644
> > index 000000000..0caef1bc7
> > --- /dev/null
> > +++ b/drivers/clk/clk-sp7021.c
> > @@ -0,0 +1,725 @@
> > +// SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
>
> This isn't a common license on driver files. Is it intended? Or
> copy/paste from DT?
Yes, I copy/paste from DT.
Did I need changed it to 'GPL-2.0-only'?
>
> > +/*
> > + * Copyright (C) Sunplus Technology Co., Ltd.
> > + * All rights reserved.
> > + */
> [...]
> > +
> > +static int sp7021_clk_probe(struct platform_device *pdev)
> > +{
> [...]
> > +
> > + /* gates */
> > + for (i = 0; i < ARRAY_SIZE(sp_clk_gates); i++) {
> > + char name[10];
> > + u32 j = sp_clk_gates[i].reg;
> > + struct clk_parent_data *pd = sp_clk_gates[i].ext_parent ? &pd_ext : &pd_sys;
> > +
> > + sprintf(name, "%02d_0x%02x", i, j);
> > + hws[i] = clk_hw_register_gate_parent_data(dev, name, pd, 0,
>
> This needs to be devm as well. Otherwise if the driver is unbound we'll
> leak these registered clks.
>
clk-provider.h:
struct clk_hw *__devm_clk_hw_register_gate(struct device *dev,
struct device_node *np, const char *name,
const char *parent_name, const struct clk_hw *parent_hw,
const struct clk_parent_data *parent_data,
unsigned long flags,
void __iomem *reg, u8 bit_idx,
u8 clk_gate_flags, spinlock_t *lock);
#define devm_clk_hw_register_gate(dev, name, parent_name, flags, reg, bit_idx,\
clk_gate_flags, lock) \
__devm_clk_hw_register_gate((dev), NULL, (name), (parent_name), NULL, \
NULL, (flags), (reg), (bit_idx), \
(clk_gate_flags), (lock))
Should I use __devm_clk_hw_register_gate() with parent_data
or
devm_clk_hw_register_gate() with parent_name?
next prev parent reply other threads:[~2022-06-15 2:33 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-14 8:30 [PATCH v18 00/10] Add Sunplus SP7021 SoC Support Qin Jian
2022-06-14 8:31 ` [PATCH v18 01/10] dt-bindings: arm: sunplus: Add bindings for Sunplus SP7021 SoC boards Qin Jian
2022-06-14 8:31 ` [PATCH v18 02/10] dt-bindings: reset: Add bindings for SP7021 reset driver Qin Jian
2022-06-14 8:31 ` [PATCH v18 03/10] reset: Add Sunplus " Qin Jian
2022-06-14 14:50 ` Randy Dunlap
2022-06-14 8:31 ` [PATCH v18 04/10] dt-bindings: clock: Add bindings for SP7021 clock driver Qin Jian
2022-06-14 8:31 ` [PATCH v18 05/10] clk: Add Sunplus " Qin Jian
2022-06-14 10:44 ` Arnd Bergmann
2022-06-15 3:43 ` qinjian[覃健]
[not found] ` <20220614192555.86436C3411B@smtp.kernel.org>
2022-06-15 2:25 ` qinjian[覃健] [this message]
2022-06-14 8:31 ` [PATCH v18 06/10] dt-bindings: interrupt-controller: Add bindings for SP7021 interrupt controller Qin Jian
2022-06-14 8:31 ` [PATCH v18 07/10] irqchip: Add Sunplus SP7021 interrupt controller driver Qin Jian
2022-06-14 8:31 ` [PATCH v18 08/10] ARM: sunplus: Add initial support for Sunplus SP7021 SoC Qin Jian
2022-06-14 14:51 ` Randy Dunlap
2022-06-14 8:31 ` [PATCH v18 09/10] ARM: sp7021_defconfig: Add Sunplus SP7021 defconfig Qin Jian
2022-06-14 8:31 ` [PATCH v18 10/10] ARM: dts: Add Sunplus SP7021-Demo-V3 board device tree Qin Jian
2022-06-14 10:42 ` Arnd Bergmann
2022-06-15 3:31 ` qinjian[覃健]
2022-06-15 14:02 ` Krzysztof Kozlowski
2022-06-19 14:12 ` Pavel Machek
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=aaf96491f1a94b5694003797853aa732@cqplus1.com \
--to=qinjian@cqplus1.com \
--cc=arnd@arndb.de \
--cc=devicetree@vger.kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.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=mturquette@baylibre.com \
--cc=olof@lixom.net \
--cc=robh+dt@kernel.org \
--cc=sboyd@kernel.org \
--cc=soc@kernel.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