[RX51] Add support for physical events w/ acpid
This adds a way to handle physical events like keypad slide switch,
screen lock, camera lid, and others. This uses acpid from busybox (I was
wrong about the real acpid package), and anl acpi.map file to map events
to 'scripts'. The scripts are symlinked to /etc/acpi/handler.sh,
automatically by the new post-install script, where
they are handled based on which script was called. This allows for
easily adding whatever is necessary for #178.
If this PR is merged, I will create a new wiki page detailing how others
can use this framework on other devices.
There's an issue with Busybox's acpid, where it is unable to detect new
devices added after the daemon loads. This is the case on the N900,
where openrc starts acpid well before the kernel is done modprobing
drivers (e.g. gpio_keys), so it's necessary to restart the acpid daemon
after some time to 'load' the new devices.
2017-07-19 04:43:27 +00:00
|
|
|
# FORMAT: "<EV_XXX>" <type> "<input.h name>" <keycode> <value> <script under /etc/acpi>
|
|
|
|
# hint: "evtest /dev/input/eventX" is very helpful!
|
|
|
|
|
2024-03-31 23:32:01 +00:00
|
|
|
"EV_SW" 0x05 "SW_CAMERA_LENS_COVER" 9 0 CAM_LID_OPEN
|
|
|
|
"EV_SW" 0x05 "SW_CAMERA_LENS_COVER" 9 1 CAM_LID_CLOSE
|
[RX51] Add support for physical events w/ acpid
This adds a way to handle physical events like keypad slide switch,
screen lock, camera lid, and others. This uses acpid from busybox (I was
wrong about the real acpid package), and anl acpi.map file to map events
to 'scripts'. The scripts are symlinked to /etc/acpi/handler.sh,
automatically by the new post-install script, where
they are handled based on which script was called. This allows for
easily adding whatever is necessary for #178.
If this PR is merged, I will create a new wiki page detailing how others
can use this framework on other devices.
There's an issue with Busybox's acpid, where it is unable to detect new
devices added after the daemon loads. This is the case on the N900,
where openrc starts acpid well before the kernel is done modprobing
drivers (e.g. gpio_keys), so it's necessary to restart the acpid daemon
after some time to 'load' the new devices.
2017-07-19 04:43:27 +00:00
|
|
|
|
|
|
|
"EV_SW" 0x05 "SW_KEYPAD_SLIDE" 10 1 KP_SLIDE_OPEN
|
|
|
|
"EV_SW" 0x05 "SW_KEYPAD_SLIDE" 10 0 KP_SLIDE_CLOSE
|
|
|
|
|
|
|
|
"EV_KEY" 0x01 "KEY_SCREENLOCK" 152 0 SCRNLCK_UP
|
|
|
|
"EV_KEY" 0x01 "KEY_SCREENLOCK" 152 1 SCRNLCK_DWN
|
|
|
|
|
|
|
|
"EV_KEY" 0x01 "KEY_CAMERA" 212 0 CAM_BTN_UP
|
|
|
|
"EV_KEY" 0x01 "KEY_CAMERA" 212 1 CAM_BTN_DWN
|
|
|
|
|
|
|
|
"EV_KEY" 0x01 "KEY_CAMERA_FOCUS" 528 0 CAM_FOCUS_UP
|
|
|
|
"EV_KEY" 0x01 "KEY_CAMERA_FOCUS" 528 1 CAM_FOCUS_DWN
|
|
|
|
|
|
|
|
"EV_SW" 0x05 "SW_HEADPHONE_INSERT" 2 1 HEADPHONE_INSERT
|
2020-03-22 00:21:20 +00:00
|
|
|
"EV_SW" 0x05 "SW_HEADPHONE_INSERT" 2 0 HEADPHONE_REMOVE
|
[RX51] Add support for physical events w/ acpid
This adds a way to handle physical events like keypad slide switch,
screen lock, camera lid, and others. This uses acpid from busybox (I was
wrong about the real acpid package), and anl acpi.map file to map events
to 'scripts'. The scripts are symlinked to /etc/acpi/handler.sh,
automatically by the new post-install script, where
they are handled based on which script was called. This allows for
easily adding whatever is necessary for #178.
If this PR is merged, I will create a new wiki page detailing how others
can use this framework on other devices.
There's an issue with Busybox's acpid, where it is unable to detect new
devices added after the daemon loads. This is the case on the N900,
where openrc starts acpid well before the kernel is done modprobing
drivers (e.g. gpio_keys), so it's necessary to restart the acpid daemon
after some time to 'load' the new devices.
2017-07-19 04:43:27 +00:00
|
|
|
"EV_SW" 0x05 "SW_MICROPHONE_INSERT" 2 1 MICROPHONE_INSERT
|
2020-03-22 00:21:20 +00:00
|
|
|
"EV_SW" 0x05 "SW_MICROPHONE_INSERT" 2 0 MICROPHONE_REMOVE
|
[RX51] Add support for physical events w/ acpid
This adds a way to handle physical events like keypad slide switch,
screen lock, camera lid, and others. This uses acpid from busybox (I was
wrong about the real acpid package), and anl acpi.map file to map events
to 'scripts'. The scripts are symlinked to /etc/acpi/handler.sh,
automatically by the new post-install script, where
they are handled based on which script was called. This allows for
easily adding whatever is necessary for #178.
If this PR is merged, I will create a new wiki page detailing how others
can use this framework on other devices.
There's an issue with Busybox's acpid, where it is unable to detect new
devices added after the daemon loads. This is the case on the N900,
where openrc starts acpid well before the kernel is done modprobing
drivers (e.g. gpio_keys), so it's necessary to restart the acpid daemon
after some time to 'load' the new devices.
2017-07-19 04:43:27 +00:00
|
|
|
"EV_SW" 0x05 "SW_VIDEOOUT_INSERT" 2 1 VIDEOOUT_INSERT
|
2020-03-22 00:21:20 +00:00
|
|
|
"EV_SW" 0x05 "SW_VIDEOOUT_INSERT" 2 0 VIDEOOUT_REMOVE
|