From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6AA15C00140 for ; Wed, 10 Aug 2022 15:16:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232923AbiHJPQc (ORCPT ); Wed, 10 Aug 2022 11:16:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59254 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232102AbiHJPQa (ORCPT ); Wed, 10 Aug 2022 11:16:30 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0C91C60523 for ; Wed, 10 Aug 2022 08:16:28 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 73B8F60C21 for ; Wed, 10 Aug 2022 15:16:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C5594C433D6; Wed, 10 Aug 2022 15:16:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1660144587; bh=GM01A3vPn4SxbCncDoqhIanwmfKrvFK0yJfID6wv9/0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=MZJAGKppH3GVnFiDRHrWIpYX8tBuSzAHVkVPohIPo4Z+L1VvCtGHTJbd33cnC44ID kPhl3ddcOsVc1HKGaG934XejXHzhQnhPCaSTkLJgN3mtZxqh0Xk+OFVb08TNOUwyNt VtcTJg6pVRXXAjwEWVuDTu3AgpMAJ3VrZAqfNzBfFaOGkunfVe7kXWN4cSD7xN6HRy gFLoaETFr0mtytXIWQq3V0sm5z6A5HOVGfWPA+GKIaLJs2RTQ9siBAWJ9En+i5GYc9 R6Zqw/5cOPYBQd7nm/64Yl/qWl9lf30JVFuJ3bQFXrw2RsmrOEw+/AGqkm2mhDmb8n Nck270E/EoJHg== Date: Wed, 10 Aug 2022 16:16:23 +0100 From: Mark Brown To: Matti Vaittinen Cc: matti.vaittinen@fi.rohmeurope.com, Liam Girdwood , linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH 2/7] regulator: Add devm helpers for get and enable Message-ID: References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="+tMecClWfAgfuSlW" Content-Disposition: inline In-Reply-To: X-Cookie: First pull up, then pull down. Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --+tMecClWfAgfuSlW Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Aug 10, 2022 at 03:19:05PM +0300, Matti Vaittinen wrote: > In order to tackle the issue the suggested API does not return handle to = the > regulators - it really just provides the "get'n enable, then forget" > solution. The consumers who use the suggested API to "devm get'n enable" > will have had time manually controlling the regulator afterwards as they > will not get the handle. I would almost claim that the pattern we nowadays > see (devm_get, enable, add_action_or_reset(disable())) is more error prone > as users seem to in many case be storing the regulator handle w/o any > comment about the automated disable at detach. Hrm, right - that does help with that case. However we do need a bulk=20 version since that's an obvious problem case. --+tMecClWfAgfuSlW Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmLzy8YACgkQJNaLcl1U h9DSPgf/aMwuVB03tEyJWgsMUoa/+AzXF+i+5ryTdmp8FB5hhK81JwSjAsSbtknL eYh7L7XcgXOm3pwbnCLKC8nF7hJ+gqwfZHfnVnFF2EL+h8QZwBdXcAPN1HgCvJP+ J20/iIgxfKl+Qxb/Mk7jJBbv+u1hDzsEnCNHS8Xw5Y3hs/o+BuitSBASCnO+e4sm HjmE8o5N/0HpSxLA9EGsX8w+iTwLNbyvjouAX/TqKPe3h5vYa9TOnS2s0z4tOleS wuzwsEIEM/I1UjFtVDGNMit3yBBW1JOkJXo0E/ZrOR35/oNiS4YvCvDJ6BPQYisZ UfeW5Y6Rzpib21/7etsbrxkD1pqGlg== =aNEN -----END PGP SIGNATURE----- --+tMecClWfAgfuSlW--