From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 698D2381B05 for ; Thu, 16 Jul 2026 17:25:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784222708; cv=none; b=cY4YNMjtuGKE4SdqspJTdNNqstRWrDK8ktmndvjD5vt9DgLeh8dKyqIpY9si7vkLW0zfVJerxLaCVQuzUZSC1yl+iMmeY72glnn7R2gIyl0K+24jGvHGHNAtvgK6RPkqENO4NCLOnCLsbvAixm18G89pA70cF75Y/4hdofWMTC4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784222708; c=relaxed/simple; bh=8jTa16KDl9pnTfYsoE4b9ji14RQkNnD3YdxX1i/Gbn0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=bQZrmXovS8PXehEvKolUN3iaD/Hfg9dE9Jt1ogLsdwygWj+z2xmREtOPMU8FoeSpcAAWBXzqJT+DOTk6SUahj/aWPPTA9vy6smheJG9KW3msD1VMFSXSj/s6o2ZK7kcahI2qDuQ0ukUNOPMqq/fRzsbuN1fEuCtaDcwZwxRM9eE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=A7O0U7f9; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b=gnszrhro; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="A7O0U7f9"; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b="gnszrhro" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1784222705; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=hAZ/QzyKvYYE5WgKPJAnrGrd1t34utw4apevYjNSjdc=; b=A7O0U7f9j8vsnzCBpF8Rk3ZFjiD2pQoKgY5DTLOjKuJRwk7Xwnr+Rt09m2TT3IiOXc712K eTGGMXztA4EKxbODJSE/lBhXx6WbTjbmd07LQT6kIQnOIvwbRd2CN50a8EKlwfunOuHie6 jV2Srkr4XmQ6JmbogkvNh8EA6dbhGFg= Received: from mail-qv1-f70.google.com (mail-qv1-f70.google.com [209.85.219.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-86-87qq0aIfPF6yRrnYbKsAGg-1; Thu, 16 Jul 2026 13:25:03 -0400 X-MC-Unique: 87qq0aIfPF6yRrnYbKsAGg-1 X-Mimecast-MFC-AGG-ID: 87qq0aIfPF6yRrnYbKsAGg_1784222703 Received: by mail-qv1-f70.google.com with SMTP id 6a1803df08f44-90749083cf8so6261776d6.0 for ; Thu, 16 Jul 2026 10:25:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1784222703; x=1784827503; darn=vger.kernel.org; h=user-agent:in-reply-to:content-disposition:content-type :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to:content-type; bh=hAZ/QzyKvYYE5WgKPJAnrGrd1t34utw4apevYjNSjdc=; b=gnszrhrohrLRFz5nSQqKi2e+tHCAmEkuty29ByNIvYWbKVIW4ZscOIOmZovzlaUwnB vQUwG36X4gA07xkhlnfsXlg6MKr18rPpjSlT38gW8gWq9jF9pI2TSFYg789UUgs24gio 8fjKxpyjoOUG74lDnia+hZzxBMKw4XFV8VdpH5vn3inuwnMnlIuH/ROUbeJA5ZHvncMq KqLt/3WoxaDon4A4zqA2tVOhB9/zDpsStxpAfEN8Js63mzYGtvzigMeMtZTAnWYsqUQX Hz7SYu+Vhzcu4dyYXgGWr++A4WgGXYoo5Y+wExYelkaYJG7fQcxhZZoAucHQ7xy1Z3h+ rpKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784222703; x=1784827503; h=user-agent:in-reply-to:content-disposition:content-type :mime-version:references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=hAZ/QzyKvYYE5WgKPJAnrGrd1t34utw4apevYjNSjdc=; b=jB34YGYxxzcvcgAQRgfSduufpzw17bOqLwIScwRU9aL9FHaNq8YtvM9MqKXreWUp8w YBhTX+7hadv9SLFbFDHdxqYBw9dqB3pLS51KLs5hjUy58a6a2ihaICpT7tNHCVURwnAl dx2Gn3/PqrykCNchuNw3qvOO+uOzto6A4kyVPFPQ57blGudiq51hKafTJ4/s+qnB83Ni tx9qgtfHwbBqjpmysk3OihdeSPWH9aqefScLcJFf5sz25tGUzbmW3SkviZVfi1+jz3k0 8QWZcXTDix80o8ewVqHeXMQG3+1FWLUIw88sj+Z9KngGm4y/bJTK7DQkAX6QXR6XljDB 0jdQ== X-Forwarded-Encrypted: i=1; AHgh+RoFiLjFHCzatMJPLOAv549Qw0ocztn6nhd208Uf/v1OKgmHtjE4W7R0OwF+U3wGVknY89y4mR8OJeUiTSs=@vger.kernel.org X-Gm-Message-State: AOJu0YwvRTRLDFS05AvhiBzHACYwVwvZNyasN49lkckJMKuqK9ZqcBU5 V0fSiI62zwBDrNzO3wg10fFkaXUGJ8Ya2A8ZFmgL6KxOGFXJ9Hdd6keVjzjeh/KMv5paqQkzZtv OyA+6UyA+l2/R4RpN2H8QxWYdlr8jsQDcSDcZw3BALQ6mcrRDI0UgLaotDQeMkeh3eA== X-Gm-Gg: AfdE7cm7sH+C3nbTx8P5ovxL2NDbzsloZC0IbpLRcDYsDGUpDBkWW8vBy53AwChQm4b GwrdRiqtzyS5nEwgBP9B9kscdm0AcUlwYo/1Qz0C8QeG0VVIyKW1Vu0yOlbIa20WB0BjxNXYu09 2rh/2samFjITAKZkDWO9VAyR2L27p6pwu/kqCDgz6/d2KqjcxX6jJntKKzbnJNZ/GkTNlbSmN8e NKm+FMTMubjfZ0iVNXQxBjIHShORUL/Xnnr0vaUh05wbuJfHadZZmHGOsNezJAKkV6I4hxp9OZI +UPyxTmbthvhXy7KYkZ3fVVuT4v50RgvbbENwypM60QWtUxSbu94gig6Y65eulIFMJBJBNBeLbe awTLGwk1BCMM9kMPSXtkmqsInIEyGN3PGuSM= X-Received: by 2002:a05:6214:4e07:b0:907:64a4:ca00 with SMTP id 6a1803df08f44-90764a4ccddmr59256306d6.10.1784222702937; Thu, 16 Jul 2026 10:25:02 -0700 (PDT) X-Received: by 2002:a05:6214:4e07:b0:907:64a4:ca00 with SMTP id 6a1803df08f44-90764a4ccddmr59255976d6.10.1784222702549; Thu, 16 Jul 2026 10:25:02 -0700 (PDT) Received: from redhat.com (c-73-183-53-213.hsd1.pa.comcast.net. [73.183.53.213]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-8ffd57baf98sm225839626d6.17.2026.07.16.10.25.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Jul 2026 10:25:01 -0700 (PDT) Date: Thu, 16 Jul 2026 13:24:59 -0400 From: Brian Masney To: Myeonghun Pak Cc: Michael Turquette , Stephen Boyd , linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, Ijae Kim Subject: Re: [PATCH v3 1/2] clk: palmas: Manage external-control prepare with devm Message-ID: References: <20260711141755.96842-1-mhun512@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260711141755.96842-1-mhun512@gmail.com> User-Agent: Mutt/2.4.0 (2026-06-19) 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 > Signed-off-by: Ijae Kim > Signed-off-by: Myeonghun Pak Reviewed-by: Brian Masney 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.