Skip to contentSkip to conversation

sysreset: syscon: remove POWER reset cause

PATCH In review Patrick Delaunay 2 participants 2 messages Apr 18, 2019 – Apr 27, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sysreset: syscon: remove POWER reset cause

The sysreset of 'POWER' type is a PMIC reset defined as 'remove and restore power'.
So normally only COLD/WARN is supported by sysreset_syscon.

This modification allows to use the function sysreset_walk(SYSRESET_POWER) when it is supported by PMIC driver (see example in stpmic1).

---

 drivers/sysreset/sysreset_syscon.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/sysreset/sysreset_syscon.c +3 -0
index 3fb39b9..1028160 100644
@@ -24,6 +24,9 @@ static int syscon_reboot_request(struct udevice *dev, enum sysreset_t type)
 {
 	struct syscon_reboot_priv *priv = dev_get_priv(dev);
 
+	if (type == SYSRESET_POWER)
+		return -EPROTONOSUPPORT;
+
 	regmap_write(priv->regmap, priv->offset, priv->mask);
 
 	return -EINPROGRESS;
Signature · 1 line
2.7.4
#1 lore raw
Quoted 8 lines · Patrick Delaunay

The sysreset of 'POWER' type is a PMIC reset defined as 'remove and restore power'.
So normally only COLD/WARN is supported by sysreset_syscon.

This modification allows to use the function sysreset_walk(SYSRESET_POWER) when it is supported by PMIC driver (see example in stpmic1).

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190427/6925dfde/attachment.sig>