From: Jim Quinlan <james.quinlan@broadcom.com>
To: Philipp Zabel <p.zabel@pengutronix.de>,
Hans de Goede <hdegoede@redhat.com>, Jens Axboe <axboe@kernel.dk>,
bcm-kernel-feedback-list@broadcom.com,
james.quinlan@broadcom.com
Cc: Florian Fainelli <f.fainelli@gmail.com>,
linux-arm-kernel@lists.infradead.org (moderated list:BROADCOM
BCM7XXX ARM ARCHITECTURE),
linux-kernel@vger.kernel.org (open list)
Subject: [PATCH v2 1/2] reset: brcmstb rescal: implement {de}assert() instead of reset()
Date: Fri, 6 Nov 2020 14:17:42 -0500 [thread overview]
Message-ID: <20201106191743.40457-2-james.quinlan@broadcom.com> (raw)
In-Reply-To: <20201106191743.40457-1-james.quinlan@broadcom.com>
[-- Attachment #1: Type: text/plain, Size: 1803 bytes --]
Before, only control_reset() was implemented. However, the reset core only
invokes control_reset() once in its lifetime. Because we need it to invoke
control_reset() again after resume out of S2 or S3, we have switched to
putting the reset functionality into the control_deassert() method and
having an empty control_assert() method.
Signed-off-by: Jim Quinlan <james.quinlan@broadcom.com>
---
drivers/reset/reset-brcmstb-rescal.c | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/drivers/reset/reset-brcmstb-rescal.c b/drivers/reset/reset-brcmstb-rescal.c
index b6f074d6a65f..1f54ae4f91fe 100644
--- a/drivers/reset/reset-brcmstb-rescal.c
+++ b/drivers/reset/reset-brcmstb-rescal.c
@@ -20,8 +20,8 @@ struct brcm_rescal_reset {
struct reset_controller_dev rcdev;
};
-static int brcm_rescal_reset_set(struct reset_controller_dev *rcdev,
- unsigned long id)
+static int brcm_rescal_reset_deassert(struct reset_controller_dev *rcdev,
+ unsigned long id)
{
struct brcm_rescal_reset *data =
container_of(rcdev, struct brcm_rescal_reset, rcdev);
@@ -52,6 +52,12 @@ static int brcm_rescal_reset_set(struct reset_controller_dev *rcdev,
return 0;
}
+static int brcm_rescal_reset_assert(struct reset_controller_dev *rcdev,
+ unsigned long id)
+{
+ return 0;
+}
+
static int brcm_rescal_reset_xlate(struct reset_controller_dev *rcdev,
const struct of_phandle_args *reset_spec)
{
@@ -60,7 +66,8 @@ static int brcm_rescal_reset_xlate(struct reset_controller_dev *rcdev,
}
static const struct reset_control_ops brcm_rescal_reset_ops = {
- .reset = brcm_rescal_reset_set,
+ .deassert = brcm_rescal_reset_deassert,
+ .assert = brcm_rescal_reset_assert,
};
static int brcm_rescal_reset_probe(struct platform_device *pdev)
--
2.17.1
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4167 bytes --]
next prev parent reply other threads:[~2020-11-06 19:17 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-06 19:17 [PATCH v2 0/2] ata: ahci_brcm: Fix use of BCM7216 reset controller Jim Quinlan
2020-11-06 19:17 ` Jim Quinlan [this message]
2020-11-09 10:05 ` [PATCH v2 1/2] reset: brcmstb rescal: implement {de}assert() instead of reset() Philipp Zabel
2020-11-09 16:21 ` Jim Quinlan
2020-11-09 17:25 ` Philipp Zabel
2020-11-12 17:28 ` Amjad Ouled-Ameur
2020-11-06 19:17 ` [PATCH v2 2/2] ata: ahci_brcm: Fix use of BCM7216 reset controller Jim Quinlan
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=20201106191743.40457-2-james.quinlan@broadcom.com \
--to=james.quinlan@broadcom.com \
--cc=axboe@kernel.dk \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=f.fainelli@gmail.com \
--cc=hdegoede@redhat.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=p.zabel@pengutronix.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®