:: [maemo-leste] N900 off mode
Etusivu
Poista viesti
Vastaa
Lähettäjä: Merlijn Wajer
Päiväys:  
Vastaanottaja: Tony Lindgren
Kopio: linux-omap, maemo-leste
Aihe: [maemo-leste] N900 off mode
Hi,

I'm trying to figure out how I can try get my Nokia N900 to go into off
mode.

I have this script, based on what Tony provided to me for the Droid 4
some time ago. [1]

First, I run this:

# modprobe ledtrig-default-on
# echo default-on > /sys/class/leds/debug::sleep/trigger

And then run idle.sh, but I never see any of the LEDs go off. I don't
really know how to interpret /sys/kernel/debug/pm_debug/count - so any
help there would be appreciated.

BTW, the kernel is patched with SGX support, so that may have something
to do with it, but it seems to actually be idle, if I am reading
pm_debug/count correctly. [2]

Cheers,
Merlijn

[1]

# cat idle.sh
#!/bin/sh

export UART_IDLE_MS=5000
idle_uarts() {
        # Enable autosuspend
        uarts=$(find /sys/bus/platform/devices/*.serial/power/ -type d)
        for uart in ${uarts}; do
                echo -n ${UART_IDLE_MS} > ${uart}/autosuspend_delay_ms
                echo -n enabled > ${uart}/wakeup
                echo -n auto > ${uart}/control
        done


        # Configure wake-up from suspend
        uarts=$(find /sys/class/tty/tty[SO]*/power/ -type d 2>/dev/null)
        for uart in ${uarts}; do
                echo -n enabled > ${uart}/wakeup
        done
}


idle_uarts

mount -t debugfs debugfs /sys/kernel/debug
echo 1 > /sys/kernel/debug/pm_debug/enable_off_mode


[2] # cat /sys/kernel/debug/pm_debug/count
usbhost_pwrdm
(ON),OFF:0,RET:670,INA:0,ON:671,RET-LOGIC-OFF:0,RET-MEMBANK1-OFF:0
sgx_pwrdm (OFF),OFF:24,RET:0,INA:0,ON:24,RET-LOGIC-OFF:0,RET-MEMBANK1-OFF:0
core_pwrdm
(ON),OFF:0,RET:0,INA:0,ON:1,RET-LOGIC-OFF:0,RET-MEMBANK1-OFF:0,RET-MEMBANK2-OFF:0
per_pwrdm (ON),OFF:0,RET:0,INA:0,ON:1,RET-LOGIC-OFF:0,RET-MEMBANK1-OFF:0
dss_pwrdm (ON),OFF:0,RET:1,INA:0,ON:2,RET-LOGIC-OFF:0,RET-MEMBANK1-OFF:0
cam_pwrdm (ON),OFF:0,RET:1,INA:1,ON:3,RET-LOGIC-OFF:0,RET-MEMBANK1-OFF:0
neon_pwrdm (ON),OFF:0,RET:9,INA:662,ON:672,RET-LOGIC-OFF:0
mpu_pwrdm (ON),OFF:0,RET:8,INA:662,ON:671,RET-LOGIC-OFF:0,RET-MEMBANK1-OFF:0
iva2_pwrdm
(OFF),OFF:1,RET:1,INA:0,ON:2,RET-LOGIC-OFF:0,RET-MEMBANK1-OFF:0,RET-MEMBANK2-OFF:0,RET-MEMBANK3-OFF:0,RET-MEMBANK4-OFF:0
usbhost_clkdm->usbhost_pwrdm (2)
sgx_clkdm->sgx_pwrdm (0)
per_clkdm->per_pwrdm (19)
cam_clkdm->cam_pwrdm (1)
dss_clkdm->dss_pwrdm (1)
d2d_clkdm->core_pwrdm (0)
iva2_clkdm->iva2_pwrdm (0)
mpu_clkdm->mpu_pwrdm (0)
core_l4_clkdm->core_pwrdm (22)
core_l3_clkdm->core_pwrdm (2)
neon_clkdm->neon_pwrdm (0)