[meego-commits] 15493: Changes to devel:devices:n900/nokia-n900-configs

Carsten V. Munk no_reply at build.meego.com
Wed Mar 30 12:09:11 UTC 2011


Hi,
I have made the following changes to nokia-n900-configs in project devel:devices:n900. Please review and accept ASAP.

Thank You,
Carsten V. Munk

[This message was auto-generated]

---

Request #15493:

  submit:   home:cvm:branches:bug-14201/nokia-n900-configs(r14)(update) -> devel:devices:n900/nokia-n900-configs


Message:
    BMC#12714 - Texas Instruments OMAP3 SoC does not enter deeper power saving states  
Refactor init scripts into nokia-n900-setup init script.  
Followup to BMC#14201, need this for proper keyboard map handling. 

State:   new          2011-03-30T05:09:04 cvm
Comment: None



changes files:
--------------
--- nokia-n900-configs.changes
+++ nokia-n900-configs.changes
@@ -0,0 +1,5 @@
+* Wed Mar 30 2011 Carsten Munk <carsten at maemo.org> - 0.6.18
+- BMC#12714 - Texas Instruments OMAP3 SoC does not enter deeper power saving states
+- Refactor init scripts into nokia-n900-setup init script.
+- Followup to BMC#14201, need this for proper keyboard map handling.
+

old:
----
  nokia-n900-cmt-gpio.init
  nokia-n900-keypad.desktop
  nokia-n900-keys.init

new:
----
  nokia-n900-setup.init

spec files:
-----------
--- nokia-n900-configs.spec
+++ nokia-n900-configs.spec
@@ -7,22 +7,19 @@
 
 Name:       nokia-n900-configs
 Summary:    Provides configs for Nokia N900
-Version:    0.6.17
+Version:    0.6.18
 Release:    0
-Group:      System/Base
+Group:      System/Device Mode Adaptation
 License:    GPLv2
 ExclusiveArch:  %{arm}
 Source0:    nokia-n900-input-rules.conf
-Source1:    nokia-n900-keypad.desktop
-Source2:    nokia-n900-keys.map
-Source3:    nokia-n900-keys.init
-Source4:    nokia-n900-cmt-gpio.init
-Source5:    nokia-n900-force-backlight.desktop
-Source6:    n900-setbacklight.sh
-Source7:    pipelines.conf
+Source1:    nokia-n900-keys.map
+Source2:    nokia-n900-setup.init
+Source3:    nokia-n900-force-backlight.desktop
+Source4:    n900-setbacklight.sh
+Source5:    pipelines.conf
 Source100:  nokia-n900-configs.yaml
 Requires:   kbd
-Requires:   xorg-x11-xkb-utils
 Requires(post): /sbin/service
 Requires(post): /sbin/chkconfig
 Requires(postun): /sbin/service
@@ -55,28 +52,24 @@
 
 # >> install post
 install -D -m 644 %{SOURCE0} $RPM_BUILD_ROOT/etc/X11/xorg.conf.d/90-input-n900.conf
-install -D -m 644 %{SOURCE1} $RPM_BUILD_ROOT/etc/xdg/autostart/n900-keypad.desktop
-install -D -m 644 %{SOURCE2} $RPM_BUILD_ROOT/lib/kbd/keymaps/arm/qwerty/nokia-n900.map
-install -D -m 644 %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/nokia-n900-keys
-install -D -m 644 %{SOURCE4} $RPM_BUILD_ROOT/etc/rc.d/init.d/nokia-n900-cmt-gpio
-install -D -m 644 %{SOURCE5} $RPM_BUILD_ROOT/etc/xdg/autostart/n900-force-backlight.desktop
-install -D -m 755 %{SOURCE6} $RPM_BUILD_ROOT/usr/bin/n900-setbacklight.sh
-install -D -m 644 %{SOURCE7} $RPM_BUILD_ROOT/etc/camera/pipelines.conf
+install -D -m 644 %{SOURCE1} $RPM_BUILD_ROOT/lib/kbd/keymaps/arm/qwerty/nokia-n900.map
+install -D -m 644 %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/nokia-n900-setup
+install -D -m 644 %{SOURCE3} $RPM_BUILD_ROOT/etc/xdg/autostart/n900-force-backlight.desktop
+install -D -m 755 %{SOURCE4} $RPM_BUILD_ROOT/usr/bin/n900-setbacklight.sh
+install -D -m 644 %{SOURCE5} $RPM_BUILD_ROOT/etc/camera/pipelines.conf
 # << install post
 
 
 %preun
 # >> preun
 if [ "$1" -eq 0 ]; then
-[ -e /sbin/chkconfig ] && /sbin/chkconfig --del nokia-n900-keys
-[ -e /sbin/chkconfig ] && /sbin/chkconfig --del nokia-n900-cmt-gpio
+[ -e /sbin/chkconfig ] && /sbin/chkconfig --del nokia-n900-setup
 fi
 # << preun
 
 %post
 # >> post
-[ -e /sbin/chkconfig ] && /sbin/chkconfig --add nokia-n900-keys
-[ -e /sbin/chkconfig ] && /sbin/chkconfig --add nokia-n900-cmt-gpio
+[ -e /sbin/chkconfig ] && /sbin/chkconfig --add nokia-n900-setup
 # << post
 
 
@@ -87,10 +80,8 @@
 %defattr(644,root,root,-)
 # Input
 %config %{_sysconfdir}/X11/xorg.conf.d/90-input-n900.conf
-%config %{_sysconfdir}/xdg/autostart/n900-keypad.desktop
 /lib/kbd/keymaps/arm/qwerty/nokia-n900.map
-%attr(755,root,root) %{_sysconfdir}/rc.d/init.d/nokia-n900-keys
-%attr(755,root,root) %{_sysconfdir}/rc.d/init.d/nokia-n900-cmt-gpio
+%attr(755,root,root) %{_sysconfdir}/rc.d/init.d/nokia-n900-setup
 # Backlight
 %attr(755,root,root) %{_bindir}/n900-setbacklight.sh
 # Camera

other changes:
--------------

++++++ nokia-n900-configs.yaml
--- nokia-n900-configs.yaml
+++ nokia-n900-configs.yaml
@@ -1,25 +1,21 @@
 Name: nokia-n900-configs
 Summary: Provides configs for Nokia N900
-Version: 0.6.17
+Version: 0.6.18
 Release: 0
-Group: System/Base
+Group: System/Device Mode Adaptation
 License: GPLv2
 Sources:
     - nokia-n900-input-rules.conf
-    - nokia-n900-keypad.desktop
     - nokia-n900-keys.map
-    - nokia-n900-keys.init
-    - nokia-n900-cmt-gpio.init
+    - nokia-n900-setup.init
     - nokia-n900-force-backlight.desktop
     - n900-setbacklight.sh
     - pipelines.conf
 Description: Provides configs for Nokia N900 device.
 
 Requires:
-      # Required by nokia-n900-keys.init
+      # Required by nokia-n900-setup.init
     - kbd
-      # Required by nokia-n900-keypad.desktop
-    - xorg-x11-xkb-utils
 Configure: none
 Builder: none
 NoSetup: yes

++++++ nokia-n900-input-rules.conf
--- nokia-n900-input-rules.conf
+++ nokia-n900-input-rules.conf
@@ -1,22 +1,20 @@
-Section "ServerFlags"
-        Option		"AllowEmptyInput" "False"
-EndSection
-
 Section "InputClass"
-        Identifier	"Touchscreen"
-        MatchProduct	"TSC2005 touchscreen"
-        Option		"Calibration" "200 3910 3761 180"
-        Option		"SendCoreEvents" "On"
-        Driver		"evdev"
+        Identifier      "Touchscreen"
+        MatchProduct    "TSC2005 touchscreen"
+        Option          "Calibration" "200 3910 3761 180"
+        Option          "SendCoreEvents" "On"
+        Driver          "evdev"
 EndSection
 
 Section "InputClass"
-        Identifier	"Keyboard"
-        MatchProduct	"omap_twl4030keypad|gpio-keys"
-        Option		"XkbModel" "nokiarx51"
-        Option		"XkbLayout" "us"
-        Option		"XkbOptions" "grp:ctrl_shift_toggle"
-        Driver		"evdev"
+        Identifier      "Keyboard"
+        MatchProduct    "TWL4030 Keypad|gpio-keys"
+        Option          "XkbModel" "nokiarx51"
+        Option          "CoreKeyboard" "On"
+        Option          "XkbLayout" "us"
+        Option          "XkbOptions" "grp:ctrl_shift_toggle"
+        Option          "XkbVariant" ",qwerty"
+        Driver          "evdev"
 EndSection
 
 Section "InputClass"
@@ -24,4 +22,3 @@
     MatchProduct   "Accelerometer"
     Option         "Ignore" "on"
 EndSection
-

++++++ nokia-n900-setup.init (new)
--- nokia-n900-setup.init
+++ nokia-n900-setup.init
+#!/bin/sh
+
+# Set up GPIO lines for N900 modem and other N900 setup items
+# Author: Kai Vehmanen, Marko Saukko, Kalle Jokiniemi.
+
+### BEGIN INIT INFO
+# Provides:             nokia-n900-cmt-gpio
+# Default-Start:        2 3 4 5
+# Default-Stop:         0 1 6
+# Short-Description:    Nokia N900 keys
+### END INIT INFO
+
+setup_gpio()
+{
+	# set up the GPIO's for N900 modem:
+	echo 70 >/sys/class/gpio/export
+	echo low >/sys/class/gpio/gpio70/direction
+	echo 0 >/sys/class/gpio/gpio70/value
+	echo 73 >/sys/class/gpio/export
+	echo high >/sys/class/gpio/gpio73/direction
+	echo 0 >/sys/class/gpio/gpio73/value
+	echo 74 >/sys/class/gpio/export
+	echo low >/sys/class/gpio/gpio74/direction
+	echo 75 >/sys/class/gpio/export
+	echo low >/sys/class/gpio/gpio75/direction
+	echo 157 >/sys/class/gpio/export
+	echo low >/sys/class/gpio/gpio157/direction
+	echo 0 >/sys/class/gpio/gpio157/value
+	# create symlinks for ofono N900 plugin
+	mkdir -p /dev/cmt
+	ln -nsf /sys/class/gpio/gpio70 /dev/cmt/cmt_apeslpx
+	ln -nsf /sys/class/gpio/gpio74 /dev/cmt/cmt_en
+	ln -nsf /sys/class/gpio/gpio73 /dev/cmt/cmt_rst_rq
+	ln -nsf /sys/class/gpio/gpio75 /dev/cmt/cmt_rst
+	ln -nsf /sys/class/gpio/gpio157 /dev/cmt/cmt_bsi
+
+}
+
+setup_keymap()
+{
+	/bin/loadkeys /lib/kbd/keymaps/arm/qwerty/nokia-n900.map
+}
+
+function setup_pm
+{
+       if [ $1 -ne 0 ]; then
+               UART_SLEEP=15
+       else
+               UART_SLEEP=0
+       fi
+
+       echo $UART_SLEEP > /sys/class/tty/ttyO0/device/sleep_timeout
+       echo $UART_SLEEP > /sys/class/tty/ttyO1/device/sleep_timeout
+       echo $UART_SLEEP > /sys/class/tty/ttyO2/device/sleep_timeout
+
+       echo $1 > /sys/kernel/debug/pm_debug/sleep_while_idle
+}
+
+
+case "$1" in
+  start)
+        echo "Setting up GPIO lines for N900 modem"
+        setup_gpio
+        echo "Setting up PM"
+        setup_pm 1
+        echo "Setting up keymap"
+        setup_keymap || echo ".. failed"
+        ;;
+  stop)
+        setup_pm 0
+        ;;
+  *)
+        echo "Usage: $0 {start|stop}"
+        exit 1
+esac
+
+exit 0

++++++ deleted files:
--- nokia-n900-cmt-gpio.init
--- nokia-n900-keypad.desktop
--- nokia-n900-keys.init




More information about the MeeGo-commits mailing list