device-nokia-n900: modernize acpid scripts (MR 4988)

1. Reduce keypad brightness. Full brightness is unnecessary
2. Correct the camera cover states. It is 1 when closed, i.e. covered [1]
3. Drop proximity sensor handling, in favor of supporting it in
   iio-sensor-proxy [2]
4. Drop power button handling. This is handled by the WM [3]
5. Drop handling for volume keys. These will be handled via WM later (when PA
   is integrated)
6. Drop duplicate KP_SLIDE_* entries in handler script

[1] https://elixir.bootlin.com/linux/v6.9-rc1/source/include/uapi/linux/input-event-codes.h#L917
[2] https://gitlab.freedesktop.org/hadess/iio-sensor-proxy/-/merge_requests/375
[3] 9bb205e18c/device/community/device-nokia-n900/i3wm/i3wm.conf (L67)
This commit is contained in:
Sicelo A. Mhlongo 2024-04-01 01:32:01 +02:00 committed by Stefan Hansson
parent beb5bebd3f
commit 27523989d9
No known key found for this signature in database
GPG key ID: 8A700086A9FE41FD
3 changed files with 6 additions and 41 deletions

View file

@ -2,7 +2,7 @@
# Maintainer: Sicelo <absicsz@gmail.com>
# Co-Maintainer: Danct12 <danct12@disroot.org>
pkgname=device-nokia-n900
pkgver=13
pkgver=14
pkgrel=0
pkgdesc="Nokia N900"
url="https://postmarketos.org"
@ -189,8 +189,8 @@ nonfree_firmware() {
sha512sums="
6b475c12eca8563be48c562a1cb4ad8ca6a05d70fc54b21288b2dd7435a80a6f53351aa870db96d5bbecf1b1c5cb00dfe35f5066e6d3fd0ad0369e66aeef5a21 10-initfs-keymap.files
4656d3b3ced0a86e2d6315c89322899f646a689e9cb64609aa8ad5a676b23d93706d8a37f3be6f6b12c6b1e8501b7d26ecafecf27322333850513a6805c61910 10-initfs-keymap.sh
b3612348af1465c6dc21ce30153fc7e2cce3ae7f9bf9ff34d5a560e173e174275c1701dd7c45337fa56caaadb252b9494bddf997a698d665d3a8c01cde6955c7 acpi.map
ac2f8a50280f7d5f8c5ce3ab50d00f1a4c8c1415890347542c684b6e24874a23d57a8f48c62451c46466996decc58276d737bdb892f8b284881d3760948b09bb acpi_handler.sh
2e6c324c2a0627fb37ee2feff249d6c828116a9c1a32d572481dddc12648c98b726eb3a475838398742f76a60e3f2249d7707502360473b8bf2e794bf22f57ce acpi.map
3c173374c5a256ecb26d90a003530daa1885546b7022e56ddcc7b3ae14e73dc027a957b9b03b8b73805ace32a56b32d124a9ce5e045ed8a08307cc346c9a1dac acpi_handler.sh
5b87071834313a389f83d29f86f6e3ea108d0921f17dc918be7a46de7e74c73a4418044ef600a0fbf72c8fad22b7730dcd5bfe3d6d01d76bf01556f8540f0b32 asound.state.headset
67acc17a33bc75113300393b4a5bba15319014032407e774d079abf310368e75f4f697dbb4856ba2d2d8ea184b056bb33561f42918de3ee91ab6a77df89a133c asound.state.speakers
3d55e34b95791636e44a5f41754f3d0de039dbba41f7a556d43a95c9e64afcfa930046b4b96b40020b6f196096ffba93514682927e32fa4488686fdd19c6da5a backlight-enable.sh

View file

@ -1,15 +1,12 @@
# FORMAT: "<EV_XXX>" <type> "<input.h name>" <keycode> <value> <script under /etc/acpi>
# hint: "evtest /dev/input/eventX" is very helpful!
"EV_SW" 0x05 "SW_CAMERA_LENS_COVER" 9 1 CAM_LID_OPEN
"EV_SW" 0x05 "SW_CAMERA_LENS_COVER" 9 0 CAM_LID_CLOSE
"EV_SW" 0x05 "SW_CAMERA_LENS_COVER" 9 0 CAM_LID_OPEN
"EV_SW" 0x05 "SW_CAMERA_LENS_COVER" 9 1 CAM_LID_CLOSE
"EV_SW" 0x05 "SW_KEYPAD_SLIDE" 10 1 KP_SLIDE_OPEN
"EV_SW" 0x05 "SW_KEYPAD_SLIDE" 10 0 KP_SLIDE_CLOSE
"EV_SW" 0x05 "SW_FRONT_PROXIMITY" 11 1 FRNT_PRXY_ON
"EV_SW" 0x05 "SW_FRONT_PROXIMITY" 11 0 FRNT_PRXY_OFF
"EV_KEY" 0x01 "KEY_SCREENLOCK" 152 0 SCRNLCK_UP
"EV_KEY" 0x01 "KEY_SCREENLOCK" 152 1 SCRNLCK_DWN
@ -19,15 +16,9 @@
"EV_KEY" 0x01 "KEY_CAMERA_FOCUS" 528 0 CAM_FOCUS_UP
"EV_KEY" 0x01 "KEY_CAMERA_FOCUS" 528 1 CAM_FOCUS_DWN
"EV_KEY" 0x01 "KEY_POWER" 116 0 PWR_BTN_UP
"EV_KEY" 0x01 "KEY_POWER" 116 1 PWR_BTN_DWN
"EV_SW" 0x05 "SW_HEADPHONE_INSERT" 2 1 HEADPHONE_INSERT
"EV_SW" 0x05 "SW_HEADPHONE_INSERT" 2 0 HEADPHONE_REMOVE
"EV_SW" 0x05 "SW_MICROPHONE_INSERT" 2 1 MICROPHONE_INSERT
"EV_SW" 0x05 "SW_MICROPHONE_INSERT" 2 0 MICROPHONE_REMOVE
"EV_SW" 0x05 "SW_VIDEOOUT_INSERT" 2 1 VIDEOOUT_INSERT
"EV_SW" 0x05 "SW_VIDEOOUT_INSERT" 2 0 VIDEOOUT_REMOVE
"EV_KEY" 0x01 "KEY_VOLUMEUP" 66 1 VOL_UP
"EV_KEY" 0x01 "KEY_VOLUMEDOWN" 65 1 VOL_DWN

View file

@ -10,7 +10,7 @@ function adjust_keypad_bl {
case $cmd in
KP_SLIDE_OPEN)
adjust_keypad_bl 255
adjust_keypad_bl 63
;;
KP_SLIDE_CLOSE)
adjust_keypad_bl 0
@ -33,18 +33,6 @@ case $cmd in
CAM_LID_OPEN)
echo "Not implemented yet"
;;
FRNT_PRXY_OFF)
echo "Not implemented yet"
;;
FRNT_PRXY_ON)
echo "Not implemented yet"
;;
KP_SLIDE_CLOSE)
echo "Not implemented yet"
;;
KP_SLIDE_OPEN)
echo "Not implemented yet"
;;
SCRNLCK_DWN)
echo "Not implemented yet"
;;
@ -63,28 +51,14 @@ case $cmd in
MICROPHONE_REMOVE)
echo "Not implemented yet"
;;
PWR_BTN_DWN)
echo "Not implemented yet"
;;
PWR_BTN_UP)
echo "Not implemented yet"
;;
VIDEOOUT_INSERT)
echo "Not implemented yet"
;;
VIDEOOUT_REMOVE)
echo "Not implemented yet"
;;
VOL_DWN)
echo "Not implemented yet"
;;
VOL_UP)
echo "Not implemented yet"
;;
*)
echo "Unknown event"
exit 1
;;
esac