From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lothar =?UTF-8?B?V2HDn21hbm4=?= Date: Wed, 21 Jun 2017 11:02:55 +0200 Subject: [U-Boot] [PATCH v8 02/10] reset: add reset_assert_all() In-Reply-To: <1498031424-15931-3-git-send-email-patrice.chotard@st.com> References: <1498031424-15931-1-git-send-email-patrice.chotard@st.com> <1498031424-15931-3-git-send-email-patrice.chotard@st.com> Message-ID: <20170621110255.6fa5ea04@karo-electronics.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: quoted-printable To: u-boot@lists.denx.de Hi, On Wed, 21 Jun 2017 09:50:16 +0200 patrice.chotard at st.com wrote: > From: Patrice Chotard >=20 > Add reset_assert_all() method which Request/Assert/Free an > array of resets signal that has been previously successfully > requested by reset_get_by_*() >=20 IMO this is a terrible API. The purpose of a request() function is to mark a resource as in-use, so that it cannot be deallocated or otherwise destroyed until it is explicitly freed by the user. It doesn't make any sense to request a resource, perform an action on it (enable/disable a clock, assert/deasser a reset line, ...) and free it right away. The caller of reset_assert_all() should make sure that all reset resources are requested before calling this function and keep them requested until after relinquish using them. The same holds for the clk_disable_all() in your other patch. Lothar Wa=C3=9Fmann