Commit b78f64e1 authored by spiiroin's avatar spiiroin

[cleanup] Remove tests scripts that are not needed or do not work. Fixes MER#1289

fakealarm:
  Not needed, timedclient-qt5 can be used to create real alarms.

inhibit:
  Does not work, mcetool can be used for setting inhibit modes.

fakecharger:
  Uses bme specific legacy dbus interface, nowadays battery/charing
  information is obtained from statefs.

ledtest:
  Not needed, mcetool supports wider range of led control options.

mcetorture:
  Assumes legacy Nokia hw, does not work and is not needed.

sendtests:
  Uses D-Bus methods that are (no longer) supported by mce.

verifybacklight:
  Assumes legacy Nokia hw, does not work and is not needed.

verifyled:
  Assumes legacy Nokia hw, does not work and is not needed.
parent 5cd5c7f0
.TH MCETORTURE 8 "Jan 20, 2011" "Nokia"
.SH NAME
mcetorture \- torture test for MCE
.SH SYNOPSIS
.B mcetorture
[\fIOPTION\fP]... [\fITEST\fP]...
.SH DESCRIPTION
.B mcetorture
is a used to stresstest the mode control daemon, MCE.
.SH OPTIONS
.TP
.B \-\-no\-leakcheck
Disable leak\(hychecking
.TP
.B \-\-no\-logging
Disable error\-logging
.TP
.B \-\-no\-abort
Do not abort on error
.TP
.B \-S, \-\-session
Use the session bus instead of the system bus for \%D\(hyBus communication
.TP
.B \-\-one\-shot
Run the tests once, then exit
.TP
.B \-\-verbose
Display extra information when running tests
.TP
.B \-\-help
Display help for the command
.TP
.B \-\-version
Display version and author information
.SH TESTS
Valid tests are:
.BR blank ,
.BR mceinfo ,
.BR unblank ,
.BR dim ,
.BR radiostates ,
.BR cabcmode ,
.BR callstate ,
.BR tklock ,
.BR alarm ,
.BR battery ,
.BR charger ,
.BR led ,
.BR homeshort ,
.BR homelong ,
.BR powershort ,
.BR powerdouble ,
.BR powerlong ,
.BR gpio-keyslide ,
.BR touchscreen ,
.BR powershort-dbus ,
.BR powerdouble-dbus ,
.BR powerlong-dbus ,
.BR gconf\-brightness ,
.BR gconf\-timeouts ,
.BR gconf\-led ,
.BR dbus\-errors
.SH SEE ALSO
.BR mce (8) ,
.BR mcetool (8)
.SH HISTORY
Nov 22 2010: Updated for new functionality.
.br
Oct 27 2010: Updated for removed functionality.
.br
Jul 2 2010: Updated for removed functionality.
.br
Jun 13 2010: Updated for new functionality.
.br
Jun 3 2010: Updated for removed functionality.
.br
May 13 2010: Updated for new and removed functionality.
.br
Jan 7 2009: Updated for new and removed functionality.
.br
Oct 19 2007: Updated for new functionality.
.br
Oct 19 2007: Use escape\(hycodes for hyphens.
.br
Sep 5 2007: Updated for new functionality.
.br
Apr 12 2007: Initial version of this manual page.
.SH AUTHOR
mcetorture and its manual page is written by
David Weinehall <\fIdavid.weinehall@nokia.com\fP>
.SH REPORTING BUGS
Report bugs to
<\fIdavid.weinehall@nokia.com\fP>.
.SH COPYRIGHT
Copyright \(co 2007\(hy2011 Nokia Corporation. All rights reserved.
#! /bin/sh
program=fakealarm
version=1.0.2
DBUS_PATH=/com/nokia/voland/signal
DBUS_INTERFACE=com.nokia.voland.signal
DBUS_SEND=dbus-send
DBUS_SEND_FLAGS='--system --type=signal'
usage()
{
printf "Usage: %s [OPTION]... [STATE]\n" $program
printf "Test MCE by emulating alarm UI state signals\n\n"
printf " --help display this help and exit\n"
printf " --version output version information and exit\n\n"
printf "Valid states are:\n\n"
printf " on-screen\n"
printf " not-ringing\n"
printf " not-on-screen\n"
}
error()
{
usage
exit 1
}
version()
{
printf "%s %s\n" $program $version
}
alarm_dialog_on_screen()
{
# Signal that the alarm dialog is on screen and alarm is ringing
$DBUS_SEND $DBUS_SEND_FLAGS $DBUS_PATH $DBUS_INTERFACE.visual_reminders_status uint32:0
}
alarm_dialog_not_ringing()
{
# Signal that the alarm dialog is on screen, but alarm is not ringing
$DBUS_SEND $DBUS_SEND_FLAGS $DBUS_PATH $DBUS_INTERFACE.visual_reminders_status uint32:2
}
alarm_dialog_not_on_screen()
{
# Signal that the alarm dialog is not on screen
$DBUS_SEND $DBUS_SEND_FLAGS $DBUS_PATH $DBUS_INTERFACE.visual_reminders_status uint32:1
}
[ $# -eq 0 ] && error
# setup command line options
while ! [ $# -eq 0 ]; do
case $1 in
on-screen)
alarm_dialog_on_screen
;;
not-ringing)
alarm_dialog_not_ringing
;;
not-on-screen)
alarm_dialog_not_on_screen
;;
--help)
usage
exit 0
;;
--version)
version
exit 0
;;
*)
usage
exit 1
;;
esac
shift
done
#! /bin/sh
program=fakecharger
version=1.2.0
DBUS_PATH=/com/nokia/bme/signal
DBUS_INTERFACE=com.nokia.bme.signal
DBUS_SEND=dbus-send
DBUS_SEND_FLAGS='--system --type=signal'
usage()
{
printf "Usage: %s [OPTION]... [TEST]...\n" $program
printf "Test MCE and Battery status-bar applet by emulating\n"
printf "charger plugging events\n\n"
printf " --help display this help and exit\n"
printf " --version output version information and exit\n\n"
printf "Valid tests are:\n\n"
printf " charger_charging_on\n"
printf " charger_charging_off\n"
printf " charger_connected\n"
printf " charger_disconnected\n"
printf " battery_full\n"
printf " battery_ok\n"
printf " battery_low\n"
printf " battery_empty\n"
printf " battery_state_changed CURRENT_BARS MAX_BARS PERCENTAGE\n"
}
error()
{
usage
exit 1
}
version()
{
printf "%s %s\n" $program $version
}
charger_charging_on()
{
# Fake that charging started
$DBUS_SEND $DBUS_SEND_FLAGS $DBUS_PATH $DBUS_INTERFACE.charger_charging_on
}
charger_charging_off()
{
# Fake that charging stopped
$DBUS_SEND $DBUS_SEND_FLAGS $DBUS_PATH $DBUS_INTERFACE.charger_charging_off
}
charger_connected()
{
# Fake that charger was connected
$DBUS_SEND $DBUS_SEND_FLAGS $DBUS_PATH $DBUS_INTERFACE.charger_connected
}
charger_disconnected()
{
# Fake that charger was disconnected
$DBUS_SEND $DBUS_SEND_FLAGS $DBUS_PATH $DBUS_INTERFACE.charger_disconnected
}
battery_full()
{
# Fake that the battery is full
$DBUS_SEND $DBUS_SEND_FLAGS $DBUS_PATH $DBUS_INTERFACE.battery_full
}
battery_ok()
{
# Fake that the battery is ok
$DBUS_SEND $DBUS_SEND_FLAGS $DBUS_PATH $DBUS_INTERFACE.battery_ok
}
battery_low()
{
# Fake that the battery is low
$DBUS_SEND $DBUS_SEND_FLAGS $DBUS_PATH $DBUS_INTERFACE.battery_low
}
battery_empty()
{
# Fake that the battery is empty
$DBUS_SEND $DBUS_SEND_FLAGS $DBUS_PATH $DBUS_INTERFACE.battery_empty
}
battery_state_changed()
{
# Fake that the number of battery bars changed
$DBUS_SEND $DBUS_SEND_FLAGS $DBUS_PATH $DBUS_INTERFACE.battery_state_changed uint32:$1 uint32:$2 uint32:$3
}
[ $# -eq 0 ] && error
# setup command line options
while ! [ $# -eq 0 ]; do
case $1 in
charger_charging_on)
eval ${1}
;;
charger_charging_off)
eval ${1}
;;
charger_connected)
eval ${1}
;;
charger_disconnected)
eval ${1}
;;
battery_full)
eval ${1}
;;
battery_ok)
eval ${1}
;;
battery_low)
eval ${1}
;;
battery_empty)
eval ${1}
;;
battery_state_changed)
eval ${1} ${2} ${3} ${4}
shift
shift
;;
--help)
usage
exit 0
;;
--version)
version
exit 0
;;
*)
usage
exit 1
;;
esac
shift
done
#! /bin/sh
program=inhibit
version=1.0.0
GCONFTOOL=gconftool-2
GCONF_DISPLAY_BLANKING_INHIBIT_MODE_PATH=/system/osso/dsm/display/inhibit_blank_mode
usage()
{
printf "Usage: %s [OPTION]... [MODE]...\n" $program
printf "Get/set display dimming and blanking inhibit mode\n\n"
printf " --help display this help and exit\n"
printf " --version output version information and exit\n\n"
printf "Valid modes are:\n\n"
printf " no-inhibit\n"
printf " stay-on-with-charger\n"
printf " stay-dim-with-charger\n"
printf " stay-on\n"
printf " stay-dim\n"
}
version()
{
printf "%s %s\n" $program $version
}
gconf_unset_key()
{
$GCONFTOOL --unset $1
}
gconf_set()
{
keytype=$($GCONFTOOL --get-type $1 2> /dev/null)
# If the key is not set, accept any keytype
if [ x"$keytype" = x"" ]; then
keytype=$2
fi
if [ x"$keytype" != x"$2" ]; then
abort "Got type $keytype for GConf key $1, expected $2"
fi
$GCONFTOOL --set --type=$2 $1 $3
sleep 1
}
gconf_set_int()
{
gconf_set $1 int $2
}
gconf_get()
{
keytype=$($GCONFTOOL --get-type $2 2> /dev/null)
status=0
# if the key is not set, don't bother reading it
if [ x"$keytype" = x"" ]; then
status=42
retval=0
return
fi
if [ x"$keytype" != x"$1" ]; then
abort "Got type $keytype for GConf key $2, expected $1"
fi
retval=$($GCONFTOOL --get $2 2> /dev/null)
}
gconf_get_int()
{
gconf_get int $1
# This looks stupid; it's just to allow altering
# of the return value
tmp=$retval
retval=$tmp
}
status()
{
# Get current value
gconf_get_int $GCONF_DISPLAY_BLANKING_INHIBIT_MODE_PATH
case $retval in
0)
mode="no inhibit"
;;
1)
mode="inhibit blank+dim if charger is connected"
;;
2)
mode="inhibit blank if charger is connected"
;;
3)
mode="inhibit blank unconditionally"
;;
4)
mode="inhibit dim unconditionally"
;;
*)
mode="invalid"
;;
esac
printf "Inhibit mode: %s\n" "$mode"
}
[ $# -eq 0 ] && ( status; exit 0 )
# setup command line options
while ! [ $# -eq 0 ]; do
case $1 in
no-inhibit)
# do not inhibit blanking or dimming
gconf_set_int $GCONF_DISPLAY_BLANKING_INHIBIT_MODE_PATH 0
;;
stay-on-with-charger)
# if charger is connected, inhibit blanking and dimming
gconf_set_int $GCONF_DISPLAY_BLANKING_INHIBIT_MODE_PATH 1
;;
stay-dim-with-charger)
# if charger is connected, inhibit blanking, but not dimming
gconf_set_int $GCONF_DISPLAY_BLANKING_INHIBIT_MODE_PATH 2
;;
stay-on)
# inhibit blanking and dimming
gconf_set_int $GCONF_DISPLAY_BLANKING_INHIBIT_MODE_PATH 3
;;
stay-dim)
# inhibit blanking, but not dimming
gconf_set_int $GCONF_DISPLAY_BLANKING_INHIBIT_MODE_PATH 4
;;
--help)
usage
exit 0
;;
--version)
version
exit 0
;;
*)
usage
exit 1
;;
esac
shift
done
#! /bin/sh
DBUS_PATH=/com/nokia/mce/request
DBUS_DEST=com.nokia.mce
DBUS_INTERFACE=$DBUS_DEST.request
DBUS_SEND=dbus-send
DBUS_SEND_FLAGS_REPLY='--system --type=method_call --print-reply'
DBUS_SEND_FLAGS='--system --type=method_call'
# dbus-send --system --type=method_call --print-reply --dest=com.nokia.mce /com/nokia/mce/request com.nokia.mce.request.
echo Enabling led
$DBUS_SEND $DBUS_SEND_FLAGS --dest=$DBUS_DEST $DBUS_PATH $DBUS_INTERFACE.req_led_enable
echo Activating poweron led pattern # priority 1
$DBUS_SEND $DBUS_SEND_FLAGS --dest=$DBUS_DEST $DBUS_PATH $DBUS_INTERFACE.req_led_pattern_activate string:PatternPowerOn
# sleep for 10 seconds
sleep 10
echo Activating error led pattern # priority 0
$DBUS_SEND $DBUS_SEND_FLAGS --dest=$DBUS_DEST $DBUS_PATH $DBUS_INTERFACE.req_led_pattern_activate string:PatternError
# sleep for 10 seconds
sleep 10
echo Activating poweroff led pattern # priority 2 -- should not make a difference
$DBUS_SEND $DBUS_SEND_FLAGS --dest=$DBUS_DEST $DBUS_PATH $DBUS_INTERFACE.req_led_pattern_activate string:PatternPowerOff
# sleep for 10 seconds
sleep 10
echo Deactivating error led pattern # should cause poweron to be visible
$DBUS_SEND $DBUS_SEND_FLAGS --dest=$DBUS_DEST $DBUS_PATH $DBUS_INTERFACE.req_led_pattern_deactivate string:PatternError
# sleep for 10 seconds
sleep 10
echo Deactivating poweron led pattern # should cause poweroff to be visible
$DBUS_SEND $DBUS_SEND_FLAGS --dest=$DBUS_DEST $DBUS_PATH $DBUS_INTERFACE.req_led_pattern_deactivate string:PatternPowerOn
# sleep for 10 seconds
sleep 10
echo Deactivating poweroff led pattern
$DBUS_SEND $DBUS_SEND_FLAGS --dest=$DBUS_DEST $DBUS_PATH $DBUS_INTERFACE.req_led_pattern_deactivate string:PatternPowerOff
# sleep for 10 seconds
sleep 10
echo Disabling led
$DBUS_SEND $DBUS_SEND_FLAGS --dest=$DBUS_DEST $DBUS_PATH $DBUS_INTERFACE.req_led_disable
This diff is collapsed.
#! /bin/sh
DBUS_PATH=/com/nokia/mce/request
DBUS_DEST=com.nokia.mce
DBUS_INTERFACE=com.nokia.mce.request
DBUS_SEND=dbus-send
DBUS_SEND_FLAGS_REPLY='--system --type=method_call --print-reply'
DBUS_SEND_FLAGS='--system --type=method_call'
# set device mode to normal
$DBUS_SEND $DBUS_SEND_FLAGS --dest=$DBUS_DEST $DBUS_PATH $DBUS_INTERFACE.req_device_mode_change string:normal
# should return normal
$DBUS_SEND $DBUS_SEND_FLAGS_REPLY --dest=$DBUS_DEST $DBUS_PATH $DBUS_INTERFACE.get_device_mode
# set device mode to flight
$DBUS_SEND $DBUS_SEND_FLAGS --dest=$DBUS_DEST $DBUS_PATH $DBUS_INTERFACE.req_device_mode_change string:flight
# should return flight
$DBUS_SEND $DBUS_SEND_FLAGS_REPLY --dest=$DBUS_DEST $DBUS_PATH $DBUS_INTERFACE.get_device_mode
# set device mode to offline
$DBUS_SEND $DBUS_SEND_FLAGS --dest=$DBUS_DEST $DBUS_PATH $DBUS_INTERFACE.req_device_mode_change string:offline
# should return flight (since offline and flight are equivalent for now)
$DBUS_SEND $DBUS_SEND_FLAGS_REPLY --dest=$DBUS_DEST $DBUS_PATH $DBUS_INTERFACE.get_device_mode
#! /bin/sh
# Verify that the kernel LED support works
program=verifybacklight
version=1.16
engine=lysti
enable=disable
LED_PATH_LYSTI_DIRECT=/sys/class/leds/lp5523
LED_PATH_LYSTI_DIRECT_CHANNEL0_BRIGHTNESS=$LED_PATH_LYSTI_DIRECT:channel0/brightness
LED_PATH_LYSTI_DIRECT_CHANNEL1_BRIGHTNESS=$LED_PATH_LYSTI_DIRECT:channel1/brightness
LED_PATH_LYSTI_DIRECT_CHANNEL2_BRIGHTNESS=$LED_PATH_LYSTI_DIRECT:channel2/brightness
LED_PATH_LYSTI_DIRECT_CHANNEL3_BRIGHTNESS=$LED_PATH_LYSTI_DIRECT:channel3/brightness
LED_PATH_LYSTI_DIRECT_CHANNEL4_BRIGHTNESS=$LED_PATH_LYSTI_DIRECT:channel4/brightness
LED_PATH_LYSTI_DIRECT_CHANNEL5_BRIGHTNESS=$LED_PATH_LYSTI_DIRECT:channel5/brightness
LED_PATH_LYSTI_DIRECT_CHANNEL0_CURRENT=$LED_PATH_LYSTI_DIRECT:channel0/led_current
LED_PATH_LYSTI_DIRECT_CHANNEL1_CURRENT=$LED_PATH_LYSTI_DIRECT:channel1/led_current
LED_PATH_LYSTI_DIRECT_CHANNEL2_CURRENT=$LED_PATH_LYSTI_DIRECT:channel2/led_current
LED_PATH_LYSTI_DIRECT_CHANNEL3_CURRENT=$LED_PATH_LYSTI_DIRECT:channel3/led_current
LED_PATH_LYSTI_DIRECT_CHANNEL4_CURRENT=$LED_PATH_LYSTI_DIRECT:channel4/led_current
LED_PATH_LYSTI_DIRECT_CHANNEL5_CURRENT=$LED_PATH_LYSTI_DIRECT:channel5/led_current
LED_PATH_LYSTI_ENGINE=/sys/class/i2c-adapter/i2c-2/2-0032
LED_PATH_LYSTI_ENGINE3_MODE=$LED_PATH_LYSTI_ENGINE/engine3_mode
LED_PATH_LYSTI_ENGINE3_LOAD=$LED_PATH_LYSTI_ENGINE/engine3_load
LED_PATH_LYSTI_ENGINE3_LEDS=$LED_PATH_LYSTI_ENGINE/engine3_leds
RX51_LYSTI_MASK_BACKLIGHT=111100011
RM680_LYSTI_MASK_BACKLIGHT=111111000
# Default to RM-680
LYSTI_MASK_BACKLIGHT=$RM680_LYSTI_MASK_BACKLIGHT
LYSTI_MODE_DISABLED=disabled
LYSTI_MODE_DIRECT=direct
LYSTI_MODE_LOAD=load
LYSTI_MODE_RUN=run
LYSTI_TEST_PATTERN=9d80407f00000000
BACKLIGHT_LED_CURRENT=50
BACKLIGHT_LED_BRIGHTNESS=127
usage()
{
printf "Usage: %s [OPTION]... [MODEL] [ENGINE] [COMMAND]\n" "$program"
printf "Test functionality of the keyboard backlight;\n"
printf "if no command is passed, an attempt to disable the \n"
printf "backlight of the default LED controller ($engine)\n"
printf "\n"
printf " --enable-pm-debug enable use of backlight for "
printf "PM debuging\n"
printf " --disable-pm-debug disable use of backlight for "
printf "PM debuging\n"
printf " --help display this help and exit\n"
printf " --version output version information and exit\n"
printf "\n"
printf "Valid commands are:\n"
printf " enable enable the LED backlight engine\n"
printf " disable disable the LED backlight engine\n"
printf " enable-direct enable the LED backlight\n"
printf " disable-direct disable the LED backlight\n"
printf "\n"
printf "Valid models are:\n"
printf " rm680 (*)\n"
printf " rx51\n"
printf "\n"
printf "Valid engines are:\n"
printf " lysti (*)\n"
printf "\n"
printf "(*) Default value\n"
}
version()
{
printf "%s %s\n" "$program" "$version"
}
lysti_disable()
{
# disable engine 3
printf $LYSTI_MODE_DISABLED > $LED_PATH_LYSTI_ENGINE3_MODE
# set brightness to 0
printf 0 > $LED_PATH_LYSTI_DIRECT_CHANNEL0_BRIGHTNESS
printf 0 > $LED_PATH_LYSTI_DIRECT_CHANNEL1_BRIGHTNESS
printf 0 > $LED_PATH_LYSTI_DIRECT_CHANNEL2_BRIGHTNESS
printf 0 > $LED_PATH_LYSTI_DIRECT_CHANNEL3_BRIGHTNESS
printf 0 > $LED_PATH_LYSTI_DIRECT_CHANNEL4_BRIGHTNESS
printf 0 > $LED_PATH_LYSTI_DIRECT_CHANNEL5_BRIGHTNESS
# set led current to 0
printf 0 > $LED_PATH_LYSTI_DIRECT_CHANNEL0_CURRENT
printf 0 > $LED_PATH_LYSTI_DIRECT_CHANNEL1_CURRENT
printf 0 > $LED_PATH_LYSTI_DIRECT_CHANNEL2_CURRENT
printf 0 > $LED_PATH_LYSTI_DIRECT_CHANNEL3_CURRENT
printf 0 > $LED_PATH_LYSTI_DIRECT_CHANNEL4_CURRENT
printf 0 > $LED_PATH_LYSTI_DIRECT_CHANNEL5_CURRENT
}
lysti_enable_direct()
{
lysti_disable
# set led current
printf $BACKLIGHT_LED_CURRENT > $LED_PATH_LYSTI_DIRECT_CHANNEL0_CURRENT
printf $BACKLIGHT_LED_CURRENT > $LED_PATH_LYSTI_DIRECT_CHANNEL1_CURRENT
printf $BACKLIGHT_LED_CURRENT > $LED_PATH_LYSTI_DIRECT_CHANNEL2_CURRENT
printf $BACKLIGHT_LED_CURRENT > $LED_PATH_LYSTI_DIRECT_CHANNEL3_CURRENT
printf $BACKLIGHT_LED_CURRENT > $LED_PATH_LYSTI_DIRECT_CHANNEL4_CURRENT
printf $BACKLIGHT_LED_CURRENT > $LED_PATH_LYSTI_DIRECT_CHANNEL5_CURRENT
# set brightness
printf $BACKLIGHT_LED_BRIGHTNESS > $LED_PATH_LYSTI_DIRECT_CHANNEL0_BRIGHTNESS
printf $BACKLIGHT_LED_BRIGHTNESS > $LED_PATH_LYSTI_DIRECT_CHANNEL1_BRIGHTNESS
printf $BACKLIGHT_LED_BRIGHTNESS > $LED_PATH_LYSTI_DIRECT_CHANNEL2_BRIGHTNESS
printf $BACKLIGHT_LED_BRIGHTNESS > $LED_PATH_LYSTI_DIRECT_CHANNEL3_BRIGHTNESS
printf $BACKLIGHT_LED_BRIGHTNESS > $LED_PATH_LYSTI_DIRECT_CHANNEL4_BRIGHTNESS
printf $BACKLIGHT_LED_BRIGHTNESS > $LED_PATH_LYSTI_DIRECT_CHANNEL5_BRIGHTNESS
}
lysti_enable()
{
lysti_disable
# set led current
printf $BACKLIGHT_LED_CURRENT > $LED_PATH_LYSTI_DIRECT_CHANNEL0_CURRENT
printf $BACKLIGHT_LED_CURRENT > $LED_PATH_LYSTI_DIRECT_CHANNEL1_CURRENT
printf $BACKLIGHT_LED_CURRENT > $LED_PATH_LYSTI_DIRECT_CHANNEL2_CURRENT
printf $BACKLIGHT_LED_CURRENT > $LED_PATH_LYSTI_DIRECT_CHANNEL3_CURRENT
printf $BACKLIGHT_LED_CURRENT > $LED_PATH_LYSTI_DIRECT_CHANNEL4_CURRENT
printf $BACKLIGHT_LED_CURRENT > $LED_PATH_LYSTI_DIRECT_CHANNEL5_CURRENT
# set engine 3 to load
printf $LYSTI_MODE_LOAD > $LED_PATH_LYSTI_ENGINE3_MODE
# set engine 3 to control the backlight leds
printf $LYSTI_MASK_BACKLIGHT > $LED_PATH_LYSTI_ENGINE3_LEDS
# load test pattern to engine 3
printf $LYSTI_TEST_PATTERN > $LED_PATH_LYSTI_ENGINE3_LOAD
# enable engine 3
printf $LYSTI_MODE_RUN > $LED_PATH_LYSTI_ENGINE3_MODE
}
# setup command line options
while ! [ $# -eq 0 ]; do
case $1 in
rx51)
LYSTI_MASK_BACKLIGHT=$RX51_LYSTI_MASK_BACKLIGHT
;;
rm680)
LYSTI_MASK_BACKLIGHT=$RM680_LYSTI_MASK_BACKLIGHT
;;
lysti)
engine=${1}
;;
enable|disable)
enable=${1}
;;
enable-direct)
enable=enable_direct
;;
--disable-pm-debug)
# Old interface
[ -f /sys/devices/platform/gpio-switch/sleep_ind/state ] && printf inactive > /sys/devices/platform/gpio-switch/sleep_ind/state
# New interface
if [ -f /sys/class/gpio/export ]; then
echo 92 > /sys/class/gpio/export
# This doesn't seem to be used anymore
# echo out > /sys/class/gpio/gpio92/direction
echo 0 > /sys/class/gpio/gpio92/value
# This seems to reset the value back to 1
# echo 92 > /sys/class/gpio/unexport
fi
;;
--enable-pm-debug)
# Old interface
[ -f /sys/devices/platform/gpio-switch/sleep_ind/state ] && printf active > /sys/devices/platform/gpio-switch/sleep_ind/state
# New interface
if [ -f /sys/class/gpio/export ]; then
echo 92 > /sys/class/gpio/export
# This doesn't seem to be used anymore
# echo out > /sys/class/gpio/gpio92/direction
echo 1 > /sys/class/gpio/gpio92/value
echo 92 > /sys/class/gpio/unexport
fi
;;
--help)
usage
exit 0
;;
--version)
version
exit 0
;;
*)
usage
exit 1
;;
esac
shift
done