Skip to contentSkip to conversation

power: twl4030: Add CONFIG_CMD_POWEROFF support

PATCH In review Adam Ford 3 participants 6 messages Apr 24, 2017 – May 10, 2017

lore
Share & tools
lore

Adam Ford

author
#0 lore raw

PATCH 1/1 power: twl4030: Add CONFIG_CMD_POWEROFF support

With the addition of twl4030_power_off(), let's allow the 'poweroff' command to run this function when CONFIG_CMD_POWEROFF is enabled.

Tested on a DM3730 with twl4030 PMIC.

drivers/power/twl4030.c +9 -0
index 8866bf1..ab98d68 100644
@@ -171,3 +171,12 @@ void twl4030_power_mmc_init(int dev_index)
 		mdelay(100);	/* ramp-up delay from Linux code */
 	}
 }
+
+#ifdef CONFIG_CMD_POWEROFF
+int do_poweroff(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+{
+	twl4030_power_off();
+
+	return 0;
+}
+#endif
Signature · 1 line
2.7.4
#1 lore raw

PATCH 1/1 power: twl4030: Add CONFIG_CMD_POWEROFF support

drivers/power/twl4030.c

Quoted 9 lines · Adam Ford

With the addition of twl4030_power_off(), let's allow the 'poweroff' command to run this function when CONFIG_CMD_POWEROFF is enabled.

Tested on a DM3730 with twl4030 PMIC.

drivers/power/twl4030.c +0 -0
index 8866bf1..ab98d68 100644

... any chance you've got moving TWL4030 stuff to Kconfig on your TODO list? :)

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170425/afd02882/attachment.sig>
author
#2 lore raw

PATCH 1/1 power: twl4030: Add CONFIG_CMD_POWEROFF support

Quoted 9 lines · Tom Rini
Quoted 7 lines · Adam Ford

With the addition of twl4030_power_off(), let's allow the 'poweroff' command to run this function when CONFIG_CMD_POWEROFF is enabled.

Tested on a DM3730 with twl4030 PMIC.

Quoted 8 lines

drivers/power/twl4030.c

Quoted 2 lines
drivers/power/twl4030.c +0 -0
index 8866bf1..ab98d68 100644

... any chance you've got moving TWL4030 stuff to Kconfig on your TODO list? :)

I will try to work something in in the next few days

adam

Quoted 2 lines

--
Tom

author
#3 lore raw

PATCH 1/1 power: twl4030: Add CONFIG_CMD_POWEROFF support

Quoted 15 lines · Adam Ford
Quoted 14 lines · Tom Rini

drivers/power/twl4030.c

Quoted 9 lines · Adam Ford

With the addition of twl4030_power_off(), let's allow the 'poweroff' command to run this function when CONFIG_CMD_POWEROFF is enabled.

Tested on a DM3730 with twl4030 PMIC.

drivers/power/twl4030.c +0 -0
index 8866bf1..ab98d68 100644
Quoted 5 lines
Quoted 3 lines

... any chance you've got moving TWL4030 stuff to Kconfig on your TODO list? :)

I will try to work something in in the next few days

I just posted a new 2-patch thread for the CONFIG_TWL4030_POWER.

Quoted 4 lines

adam

Quoted 2 lines

--
Tom

#4 lore raw

PATCH 1/1 power: twl4030: Add CONFIG_CMD_POWEROFF support

In reply to Adam Ford

Hi Adam

Quoted 6 lines · Adam Ford

With the addition of twl4030_power_off(), let's allow the 'poweroff' command to run this function when CONFIG_CMD_POWEROFF is enabled.

Tested on a DM3730 with twl4030 PMIC.

Quoted 19 lines
drivers/power/twl4030.c +9 -0
index 8866bf1..ab98d68 100644
@@ -171,3 +171,12 @@ void twl4030_power_mmc_init(int dev_index)
 		mdelay(100);	/* ramp-up delay from Linux code */
 	}
 }
+
+#ifdef CONFIG_CMD_POWEROFF
+int do_poweroff(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+{
+	twl4030_power_off();
+
+	return 0;
+}
+#endif
#5 lore raw
In reply to Adam Ford

drivers/power/twl4030.c

Quoted 11 lines · Adam Ford

With the addition of twl4030_power_off(), let's allow the 'poweroff' command to run this function when CONFIG_CMD_POWEROFF is enabled.

Tested on a DM3730 with twl4030 PMIC.

drivers/power/twl4030.c +0 -0
index 8866bf1..ab98d68 100644

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: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170510/05a5379c/attachment.sig>