From: Linus Walleij <linus.walleij@linaro.org> To: Jianqun Xu <jay.xu@rock-chips.com> Cc: heiko@sntech.de, brgl@bgdev.pl, andriy.shevchenko@linux.intel.com, robert.moore@intel.com, robh@kernel.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, lenb@kernel.org, rafael@kernel.org Subject: Re: [PATCH 15/20] gpio/rockchip: disable and put clocks when gpiolib register failed Date: Tue, 4 Oct 2022 09:16:19 +0200 [thread overview] Message-ID: <CACRpkdb0wysqkSST7Qv+yy8g53oTpYWvbSqxLk6EVMEABQW4iA@mail.gmail.com> (raw) In-Reply-To: <20220920103108.23074-16-jay.xu@rock-chips.com> On Tue, Sep 20, 2022 at 12:31 PM Jianqun Xu <jay.xu@rock-chips.com> wrote: > When gpiolib register failed, the clocks should be disabled and put. > > Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com> (...) > +err_put_clk: > + clk_put(bank->clk); > + clk_put(bank->db_clk); > + clk_disable_unprepare(bank->clk); > + clk_disable_unprepare(bank->db_clk); Always clk_disable_unprepare() before clk_put(). I think you can drop clk_put() if you switch to devres dev_clk_get() instead. Yours, Linus Walleij
WARNING: multiple messages have this Message-ID (diff)
From: Linus Walleij <linus.walleij@linaro.org> To: Jianqun Xu <jay.xu@rock-chips.com> Cc: heiko@sntech.de, brgl@bgdev.pl, andriy.shevchenko@linux.intel.com, robert.moore@intel.com, robh@kernel.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, lenb@kernel.org, rafael@kernel.org Subject: Re: [PATCH 15/20] gpio/rockchip: disable and put clocks when gpiolib register failed Date: Tue, 4 Oct 2022 09:16:19 +0200 [thread overview] Message-ID: <CACRpkdb0wysqkSST7Qv+yy8g53oTpYWvbSqxLk6EVMEABQW4iA@mail.gmail.com> (raw) In-Reply-To: <20220920103108.23074-16-jay.xu@rock-chips.com> On Tue, Sep 20, 2022 at 12:31 PM Jianqun Xu <jay.xu@rock-chips.com> wrote: > When gpiolib register failed, the clocks should be disabled and put. > > Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com> (...) > +err_put_clk: > + clk_put(bank->clk); > + clk_put(bank->db_clk); > + clk_disable_unprepare(bank->clk); > + clk_disable_unprepare(bank->db_clk); Always clk_disable_unprepare() before clk_put(). I think you can drop clk_put() if you switch to devres dev_clk_get() instead. Yours, Linus Walleij _______________________________________________ Linux-rockchip mailing list Linux-rockchip@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-rockchip
next prev parent reply other threads:[~2022-10-04 7:16 UTC|newest] Thread overview: 65+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-09-20 10:30 [PATCH 00/20] Rockchip pinctrl/GPIO support ACPI Jianqun Xu 2022-09-20 10:30 ` Jianqun Xu 2022-09-20 10:30 ` [PATCH 01/20] ACPI: utils: Add acpi_dev_uid_to_integer() helper to get _UID as integer Jianqun Xu 2022-09-20 10:30 ` Jianqun Xu 2022-09-20 10:30 ` [PATCH 02/20] pinctrl/rockchip: populate GPIO platform early Jianqun Xu 2022-09-20 10:30 ` Jianqun Xu 2022-09-20 10:30 ` [PATCH 03/20] pinctrl/rockchip: use fwnode instead of of_node Jianqun Xu 2022-09-20 10:30 ` Jianqun Xu 2022-09-20 10:30 ` [PATCH 04/20] pinctrl/rockchip: switch to use device_get_match_data Jianqun Xu 2022-09-20 10:30 ` Jianqun Xu 2022-10-04 7:13 ` Linus Walleij 2022-10-04 7:13 ` Linus Walleij 2022-09-20 10:30 ` [PATCH 05/20] pinctrl/rockchip: of_populate_platform for gpio only for of node Jianqun Xu 2022-09-20 10:30 ` Jianqun Xu 2022-09-20 10:30 ` [PATCH 06/20] pinctrl/rockchip: parse dt only if the fwnode is " Jianqun Xu 2022-09-20 10:30 ` Jianqun Xu 2022-09-20 10:30 ` [PATCH 07/20] pinctrl/rockchip: print a message if driver probed successfully Jianqun Xu 2022-09-20 10:30 ` Jianqun Xu 2022-09-20 10:30 ` [PATCH 08/20] gpiolib: make gpiochip_find_by_name to be common function Jianqun Xu 2022-09-20 10:30 ` Jianqun Xu 2022-09-20 10:30 ` [PATCH 09/20] gpio/rockchip: drop 'bank->name' from the driver Jianqun Xu 2022-09-20 10:30 ` Jianqun Xu 2022-09-20 10:30 ` [PATCH 10/20] gpio/rockchip: revert deferred output settings on probe Jianqun Xu 2022-09-20 10:30 ` Jianqun Xu 2022-09-20 10:30 ` [PATCH 11/20] gpio/rockchip: add of_node for gpiochip Jianqun Xu 2022-09-20 10:30 ` Jianqun Xu 2022-10-04 7:14 ` Linus Walleij 2022-10-04 7:14 ` Linus Walleij 2022-10-04 8:30 ` Andy Shevchenko 2022-10-04 8:30 ` Andy Shevchenko 2022-10-04 9:06 ` Linus Walleij 2022-10-04 9:06 ` Linus Walleij 2022-10-08 6:19 ` jay.xu 2022-10-08 18:21 ` Andy Shevchenko 2022-10-08 18:21 ` Andy Shevchenko 2022-09-20 10:31 ` [PATCH 12/20] gpio/rockchip: add return check for clock rate set Jianqun Xu 2022-09-20 10:31 ` Jianqun Xu 2022-09-30 9:17 ` Bartosz Golaszewski 2022-09-30 9:17 ` Bartosz Golaszewski 2022-09-30 9:28 ` Bartosz Golaszewski 2022-09-30 9:28 ` Bartosz Golaszewski 2022-09-20 10:31 ` [PATCH 13/20] gpio/rockchip: disable and put clocks when remove Jianqun Xu 2022-09-20 10:31 ` Jianqun Xu 2022-09-30 9:23 ` Bartosz Golaszewski 2022-09-30 9:23 ` Bartosz Golaszewski 2022-09-20 10:31 ` [PATCH 14/20] gpio/rockchip: switch to use irq_domain_create_linear Jianqun Xu 2022-09-20 10:31 ` Jianqun Xu 2022-09-20 10:31 ` [PATCH 15/20] gpio/rockchip: disable and put clocks when gpiolib register failed Jianqun Xu 2022-09-20 10:31 ` Jianqun Xu 2022-10-04 7:16 ` Linus Walleij [this message] 2022-10-04 7:16 ` Linus Walleij 2022-10-04 7:16 ` Linus Walleij 2022-10-04 7:16 ` Linus Walleij 2022-09-20 10:31 ` [PATCH 16/20] gpio/rockchip: try to get gpio id from uid when ACPI enabled Jianqun Xu 2022-09-20 10:31 ` Jianqun Xu 2022-09-20 10:31 ` [PATCH 17/20] gpio/rockchip: print device with fwnode name when probe successful Jianqun Xu 2022-09-20 10:31 ` Jianqun Xu 2022-09-30 9:21 ` Bartosz Golaszewski 2022-09-30 9:21 ` Bartosz Golaszewski 2022-09-20 10:31 ` [PATCH 18/20] gpio/rockchip: make use of device property Jianqun Xu 2022-09-20 10:31 ` Jianqun Xu 2022-09-20 10:31 ` [PATCH 19/20] gpio/rockchip: make GPIO module work well under ACPI enabled Jianqun Xu 2022-09-20 10:31 ` Jianqun Xu 2022-09-20 10:31 ` [PATCH 20/20] pinctrl/rockchip: find existed gpiochip by gpio label Jianqun Xu 2022-09-20 10:31 ` Jianqun Xu
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=CACRpkdb0wysqkSST7Qv+yy8g53oTpYWvbSqxLk6EVMEABQW4iA@mail.gmail.com \ --to=linus.walleij@linaro.org \ --cc=andriy.shevchenko@linux.intel.com \ --cc=brgl@bgdev.pl \ --cc=heiko@sntech.de \ --cc=jay.xu@rock-chips.com \ --cc=lenb@kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-rockchip@lists.infradead.org \ --cc=rafael@kernel.org \ --cc=robert.moore@intel.com \ --cc=robh@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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.