devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Nuno Sá" <noname.nuno@gmail.com>
To: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>,
	Eliza Balas <eliza.balas@analog.com>
Cc: Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Derek Kiernan <derek.kiernan@amd.com>,
	Dragan Cvetic <dragan.cvetic@amd.com>,
	Arnd Bergmann <arnd@arndb.de>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-kernel@vger.kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH 2/2] drivers: misc: adi-axi-tdd: Add new TDD engine driver
Date: Thu, 27 Jul 2023 08:40:29 +0200	[thread overview]
Message-ID: <30b7dd4107285c33339e63478a100890de72d346.camel@gmail.com> (raw)
In-Reply-To: <0fc2ba5d-8357-6dfb-4aa4-26de6b497c13@linaro.org>

On Wed, 2023-07-26 at 20:39 +0200, Krzysztof Kozlowski wrote:
> On 26/07/2023 09:11, Eliza Balas wrote:
> > This patch introduces the driver for the new ADI TDD engine HDL.
> > The generic TDD controller is in essence a waveform generator
> > capable of addressing RF applications which require Time Division
> > Duplexing, as well as controlling other modules of general
> > applications through its dedicated 32 channel outputs.
> > 
> > The reason of creating the generic TDD controller was to reduce
> > the naming confusion around the existing repurposed TDD core
> > built for AD9361, as well as expanding its number of output
> > channels for systems which require more than six controlling signals.
> > 
> > Signed-off-by: Eliza Balas <eliza.balas@analog.com>
> > ---
> >  .../sysfs-bus-platform-drivers-adi-axi-tdd    | 158 ++++
> >  MAINTAINERS                                   |   2 +
> >  drivers/misc/Kconfig                          |  10 +
> >  drivers/misc/Makefile                         |   1 +
> >  drivers/misc/adi-axi-tdd.c                    | 753 ++++++++++++++++++
> >  5 files changed, 924 insertions(+)
> >  create mode 100644 Documentation/ABI/testing/sysfs-bus-platform-drivers-adi-axi-
> > tdd
> >  create mode 100644 drivers/misc/adi-axi-tdd.c
> > 
> > diff --git a/Documentation/ABI/testing/sysfs-bus-platform-drivers-adi-axi-tdd
> > b/Documentation/ABI/testing/sysfs-bus-platform-drivers-adi-axi-tdd
> > new file mode 100644
> > index 000000000000..eb5f3db7d0cb
> > --- /dev/null
> > +++ b/Documentation/ABI/testing/sysfs-bus-platform-drivers-adi-axi-tdd
> > @@ -0,0 +1,158 @@
> > +What:           /sys/bus/platform/drivers/adi-axi-tdd/*/burst_count
> > +Date:           July 2023
> > +KernelVersion:  6.5
> 
> We are in 6.5 now, so there is no way your driver will be in 6.5. Target
> 6.6 and use phb crystall ball for next release date (September).
> 
> ...
> 
> > +
> > +enum adi_axi_tdd_attribute_id {
> > +       ADI_TDD_ATTR_VERSION,
> > +       ADI_TDD_ATTR_CORE_ID,
> > +       ADI_TDD_ATTR_SCRATCH,
> > +       ADI_TDD_ATTR_MAGIC,
> > +
> 
> ...
> 
> > +
> > +static int adi_axi_tdd_probe(struct platform_device *pdev)
> > +{
> > +       unsigned int expected_version, version, data;
> > +       struct adi_axi_tdd_state *st;
> > +       struct clk *aclk;
> > +       int ret;
> > +
> > +       st = devm_kzalloc(&pdev->dev, sizeof(*st), GFP_KERNEL);
> > +       if (!st)
> > +               return -ENOMEM;
> > +
> > +       st->base = devm_platform_ioremap_resource(pdev, 0);
> > +       if (IS_ERR(st->base))
> > +               return PTR_ERR(st->base);
> > +
> > +       platform_set_drvdata(pdev, st);
> > +
> > +       aclk = devm_clk_get_enabled(&pdev->dev, "s_axi_aclk");
> > +       if (IS_ERR(aclk))
> > +               return PTR_ERR(aclk);
> > +
> > +       ret = devm_add_action_or_reset(&pdev->dev, adi_axi_tdd_clk_disable,
> > aclk);
> 
> Looks you have here double disable.
> 
> > +       if (ret)
> > +               return ret;
> > +
> > +       st->clk.clk = devm_clk_get(&pdev->dev, "intf_clk");
> > +       if (IS_ERR(st->clk.clk))
> > +               return PTR_ERR(st->clk.clk);
> > +
> > +       ret = clk_prepare_enable(st->clk.clk);
> > +       if (ret)
> > +               return ret;
> > +
> > +       ret = devm_add_action_or_reset(&pdev->dev, adi_axi_tdd_clk_disable, st-
> > >clk.clk);
> 
> Looks you have here double disable.
> 

Not in here but it should actually drop the action and use devm_clk_get_enabled()

- Nuno Sá



  reply	other threads:[~2023-07-27  6:41 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-26  7:11 [PATCH 1/2] Documentation: bindings: adi,axi-tdd.yaml: Add new TDD engine driver Eliza Balas
2023-07-26  7:11 ` [PATCH 2/2] drivers: misc: adi-axi-tdd: " Eliza Balas
2023-07-26 18:39   ` Krzysztof Kozlowski
2023-07-27  6:40     ` Nuno Sá [this message]
2023-07-26 18:35 ` [PATCH 1/2] Documentation: bindings: adi,axi-tdd.yaml: " Krzysztof Kozlowski
2023-07-27  9:05   ` Balas, Eliza
2023-07-27  9:26     ` Krzysztof Kozlowski
2023-07-27  9:46       ` Balas, Eliza
2023-07-27 11:40         ` Nuno Sá

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=30b7dd4107285c33339e63478a100890de72d346.camel@gmail.com \
    --to=noname.nuno@gmail.com \
    --cc=arnd@arndb.de \
    --cc=conor+dt@kernel.org \
    --cc=derek.kiernan@amd.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dragan.cvetic@amd.com \
    --cc=eliza.balas@analog.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh+dt@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;
as well as URLs for NNTP newsgroup(s).