All of lore.kernel.org
 help / color / mirror / Atom feed
From: Brian Masney <bmasney@redhat.com>
To: Myeonghun Pak <mhun512@gmail.com>
Cc: Michael Turquette <mturquette@baylibre.com>,
	Stephen Boyd <sboyd@kernel.org>,
	linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org,
	Ijae Kim <ae878000@gmail.com>
Subject: Re: [PATCH v3 1/2] clk: palmas: Manage external-control prepare with devm
Date: Thu, 16 Jul 2026 13:24:59 -0400	[thread overview]
Message-ID: <alkT6xm9jjzfUv5T@redhat.com> (raw)
In-Reply-To: <20260711141755.96842-1-mhun512@gmail.com>

On Sat, Jul 11, 2026 at 11:17:42PM +0900, Myeonghun Pak wrote:
> palmas_clks_init_configure() prepares the clock when an external control
> pin is configured. The current driver only drops that prepare reference
> when external control configuration fails.
> 
> If provider registration fails after that point, or if the driver is later
> removed, the prepare reference remains held.
> 
> Register a device-managed action after clk_prepare() succeeds. This
> balances the prepare reference on subsequent probe failure and driver
> removal.
> 
> Fixes: 942d1d674931 ("clk: Add driver for Palmas clk32kg and clk32kgaudio clocks")
> Co-developed-by: Ijae Kim <ae878000@gmail.com>
> Signed-off-by: Ijae Kim <ae878000@gmail.com>
> Signed-off-by: Myeonghun Pak <mhun512@gmail.com>

Reviewed-by: Brian Masney <bmasney@redhat.com>

I checked the other clk drivers and I don't see where any other drivers
call clk_unprepare() from a devm action, so I think this is fine in the
driver. If another driver needs this as well at some point, then it can
be split out into a common helper.

This is the first driver I've noticed with the external pin control.


      parent reply	other threads:[~2026-07-16 17:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-11 14:17 [PATCH v3 1/2] clk: palmas: Manage external-control prepare with devm Myeonghun Pak
2026-07-11 14:17 ` [PATCH v3 2/2] clk: palmas: Use devm_of_clk_add_hw_provider() Myeonghun Pak
2026-07-16 17:25   ` Brian Masney
2026-07-16 17:24 ` Brian Masney [this message]

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=alkT6xm9jjzfUv5T@redhat.com \
    --to=bmasney@redhat.com \
    --cc=ae878000@gmail.com \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mhun512@gmail.com \
    --cc=mturquette@baylibre.com \
    --cc=sboyd@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 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.