linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Walleij <linus.walleij@linaro.org>
To: Sergey.Semin@baikalelectronics.ru
Cc: Hoan Tran <hoan@os.amperecomputing.com>,
	Bartosz Golaszewski <bgolaszewski@baylibre.com>,
	Serge Semin <fancer.lancer@gmail.com>,
	Alexey Malahov <Alexey.Malahov@baikalelectronics.ru>,
	Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
	Paul Burton <paulburton@kernel.org>,
	Ralf Baechle <ralf@linux-mips.org>,
	"open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 3/4] gpio: dwapb: Use optional-clocks interface for APB ref-clocks
Date: Thu, 12 Mar 2020 14:53:40 +0100	[thread overview]
Message-ID: <CACRpkdZxpa6z0zD+vgEV10NLG_CXOvYYr1BSwr_fEDfc_Pxf-w@mail.gmail.com> (raw)
In-Reply-To: <20200306132516.D45DC8030700@mail.baikalelectronics.ru>

Hi Sergey,

thanks for your patch!

On Fri, Mar 6, 2020 at 2:25 PM <Sergey.Semin@baikalelectronics.ru> wrote:

>         /* Optional bus clock */
> -       gpio->clk = devm_clk_get(&pdev->dev, "bus");
> -       if (!IS_ERR(gpio->clk)) {
> -               err = clk_prepare_enable(gpio->clk);
> -               if (err) {
> -                       dev_info(&pdev->dev, "Cannot enable clock\n");
> -                       return err;
> -               }
> +       gpio->clk = devm_clk_get_optional(&pdev->dev, "bus");
> +       if (IS_ERR(gpio->clk)) {
> +               dev_info(&pdev->dev, "Cannot get APB clock\n");

Turn this into dev_err() while you're at it.

> +       err = clk_prepare_enable(gpio->clk);
> +       if (err) {
> +               dev_info(&pdev->dev, "Cannot enable APB clock\n");

Also this.

With those changes:
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij

  reply	other threads:[~2020-03-12 13:53 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20200306132448.13917-1-Sergey.Semin@baikalelectronics.ru>
2020-03-06 13:24 ` [PATCH 1/4] dt-bindings: gpio: Replace DW APB GPIO legacy bindings with YAML-based one Sergey.Semin
2020-03-12 13:47   ` Rob Herring
2020-03-13 18:40     ` Sergey Semin
2020-03-13 18:53       ` Rob Herring
2020-03-06 13:24 ` [PATCH 2/4] dt-bindings: gpio: Add DW GPIO debounce clocks bindings Sergey.Semin
2020-03-12 21:44   ` Rob Herring
2020-03-06 13:24 ` [PATCH 3/4] gpio: dwapb: Use optional-clocks interface for APB ref-clocks Sergey.Semin
2020-03-12 13:53   ` Linus Walleij [this message]
2020-03-06 13:24 ` [PATCH 4/4] gpio: dwapb: Add debounce reference clock support Sergey.Semin
2020-03-12 13:55   ` Linus Walleij
2020-03-12 13:56     ` Linus Walleij
2020-03-10  0:23 ` [PATCH 0/4] gpio: dwapb: Fix reference clocks usage Sergey Semin

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=CACRpkdZxpa6z0zD+vgEV10NLG_CXOvYYr1BSwr_fEDfc_Pxf-w@mail.gmail.com \
    --to=linus.walleij@linaro.org \
    --cc=Alexey.Malahov@baikalelectronics.ru \
    --cc=Sergey.Semin@baikalelectronics.ru \
    --cc=bgolaszewski@baylibre.com \
    --cc=fancer.lancer@gmail.com \
    --cc=hoan@os.amperecomputing.com \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paulburton@kernel.org \
    --cc=ralf@linux-mips.org \
    --cc=tsbogend@alpha.franken.de \
    /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).