hooks: Use the common power code to power off
Use the power method instead of hard-coding ykusb, so we can use this script from multiple places. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
# DEALINGS IN THE SOFTWARE.
|
||||
|
||||
# Designed for using SDwire uSD myx and ykush USB power control:
|
||||
# Designed for using SDwire uSD mux and ykush USB power control:
|
||||
# https://wiki.tizen.org/SDWire
|
||||
# https://www.yepkit.com/products/ykush
|
||||
|
||||
@@ -27,6 +27,6 @@
|
||||
# ykushcmd at https://github.com/Yepkit/ykush
|
||||
|
||||
# Power off
|
||||
ykushcmd -s ${ykush_serial} -d ${ykush_port}
|
||||
. poweroff.${power_impl}
|
||||
|
||||
. flash.sdwire_common_mount
|
||||
@@ -29,7 +29,7 @@
|
||||
mount_dir=/media/${mount_point}
|
||||
|
||||
# Power off
|
||||
ykushcmd -s ${ykush_serial} -d ${ykush_port}
|
||||
. poweroff.${power_impl}
|
||||
|
||||
# Switch over to get USB card access
|
||||
sd-mux-ctrl --device-serial ${sdwire_serial} --ts
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
console_dev=/dev/ttyusb_port2
|
||||
reset_impl=ykush
|
||||
flash_impl=sdwire_ykush_raw
|
||||
flash_impl=sdwire_poweroff_raw
|
||||
power_impl=ykush
|
||||
|
||||
flash_writer=sunxi_raw
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
console_dev=/dev/ttyusb_port1
|
||||
reset_impl=ykush
|
||||
flash_impl=sdwire_ykush_mount
|
||||
flash_impl=sdwire_poweroff_mount
|
||||
power_impl=ykush
|
||||
|
||||
flash_writer=rpi3_mount
|
||||
|
||||
Reference in New Issue
Block a user