From: "Lothar Waßmann" <LW@KARO-electronics.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v8 02/10] reset: add reset_assert_all()
Date: Wed, 21 Jun 2017 11:02:55 +0200 [thread overview]
Message-ID: <20170621110255.6fa5ea04@karo-electronics.de> (raw)
In-Reply-To: <1498031424-15931-3-git-send-email-patrice.chotard@st.com>
Hi,
On Wed, 21 Jun 2017 09:50:16 +0200 patrice.chotard at st.com wrote:
> From: Patrice Chotard <patrice.chotard@st.com>
>
> Add reset_assert_all() method which Request/Assert/Free an
> array of resets signal that has been previously successfully
> requested by reset_get_by_*()
>
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ßmann
next prev parent reply other threads:[~2017-06-21 9:02 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-21 7:50 [U-Boot] [PATCH v8 00/10] usb: Extend ehci and ohci generic drivers patrice.chotard at st.com
2017-06-21 7:50 ` [U-Boot] [PATCH v8 01/10] reset: add reset_request() patrice.chotard at st.com
2017-06-21 7:50 ` [U-Boot] [PATCH v8 02/10] reset: add reset_assert_all() patrice.chotard at st.com
2017-06-21 9:02 ` Lothar Waßmann [this message]
2017-06-21 11:18 ` Patrice CHOTARD
2017-06-21 7:50 ` [U-Boot] [PATCH v8 03/10] clk: add clk_disable_all() patrice.chotard at st.com
2017-06-21 7:50 ` [U-Boot] [PATCH v8 04/10] dm: core: add ofnode_count_phandle_with_args() patrice.chotard at st.com
2017-06-21 7:50 ` [U-Boot] [PATCH v8 05/10] usb: host: ehci-generic: replace printf() by error() patrice.chotard at st.com
2017-06-21 7:50 ` [U-Boot] [PATCH v8 06/10] usb: host: ehci-generic: add error path and .remove callback patrice.chotard at st.com
2017-06-21 7:50 ` [U-Boot] [PATCH v8 07/10] usb: host: ehci-generic: add generic PHY support patrice.chotard at st.com
2017-06-21 7:50 ` [U-Boot] [PATCH v8 08/10] usb: host: ohci-generic: add CLOCK support patrice.chotard at st.com
2017-07-06 4:48 ` Simon Glass
2017-07-06 7:09 ` Patrice CHOTARD
2017-06-21 7:50 ` [U-Boot] [PATCH v8 09/10] usb: host: ohci-generic: add RESET support patrice.chotard at st.com
2017-06-21 7:50 ` [U-Boot] [PATCH v8 10/10] usb: host: ohci-generic: add generic PHY support patrice.chotard at st.com
2017-06-21 8:35 ` [U-Boot] [PATCH v8 00/10] usb: Extend ehci and ohci generic drivers Patrice CHOTARD
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=20170621110255.6fa5ea04@karo-electronics.de \
--to=lw@karo-electronics.de \
--cc=u-boot@lists.denx.de \
/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.