From: Bastien Nocera <hadess@hadess.net>
To: "Joseph P. Garcia" <jpgarcia@execpc.com>
Cc: linuxppc-dev@lists.linuxppc.org
Subject: Re: userspace button controls
Date: Sun, 29 Jul 2001 04:48:14 +0100 [thread overview]
Message-ID: <3B63877E.9060001@hadess.net> (raw)
In-Reply-To: 20010724015531.516c9985.jpgarcia@execpc.com
Hi Joseph,
Well, the buttons_patch doesn't work on the ibook2:
brightness down: "keyboard: unknown scancode e0 3a"
for the following, same message, different scancode:
brightness up: e0 39
mute: e0 26
volume down: e0 25
volume up: e0 1e
power: e0 5e
and for the eject button:
eject: Unhandled button code 0b
I hope you can help me make the modifications to make it work on this
ibook, I'll be on IRC tomorrow.
Cheers
Joseph P. Garcia wrote:
>attached is a tar.gz of a few files I've created as a solution to powerbook buttons.
>
>- buttons.patch: brings all 5 adb-buttons to userspace via NIL's events via the keyboard. New keys added to input.h. With proper support, the user could see these keypresses, and use them. This also does not use the pmac_backlight.c file, in exchange for a new framebuffer ioctl, existant in chipsfb, atyfb, and aty128fb. The only interdependancy is between chipsfb/atyfb and via-pmu for backlight control for lombard and earlier. The pmu's backlight ioctl was removed. So sound controls are in the mixer (unchanged), backlight controls are in the fb rather than pmu, and the adbbuttons are simple keys, accessed via /dev/input/event? and, with some help, common console/X keycodes. syslog logs an error with there is no keycode. I changed that to a DEBUG message rather than a WARNING message.
>
>- adbhid_sleep.patch: checks before an adbhid is deregistered post sleep. The existing code causes an open event device to dangle open (safely i think), but the program doesn't notice it. This checks to see if the device has changed, or no longer exists before it deregisters it. This works for me, but might be unsafe. I couldn't find a cleaner solution that still allows for reprobing.
>
>- input_sec.patch: Fix permissions for input devices created via devfs, which are default readable by anyone, including the keyboard's event dev. (submitted to maintainer)
>
>- misc.patch: one fix (missing non-fatal include in checks.c), and a slightly cleaner non-TAU temp coding. (irrelevant to button operations)
>
>- keyevd.c: a quick daemon that listens to the buttons and acts on them. Simple compile builds a forking daemon that uses the mute button to switch between muting speaker and line out. Key repeat is too quick tho. Mostly a quick hack, not too clean. This needs input event support.
>
>I've only tested this on my powerbook, which is a aty->pmu based backlight system. I used BenH's prexisting backlight interfaces. A better ioctl might be nessesary (still 0x0-0xf range), but pmu, aty, and aty128 now could change to fit a standard ioctl rather than a function API.
>When I find the time, I should redo the keyevd so it isn't as messy.
>
>Thanks for your time and consideration.
>
>--
>Joseph P. Garcia
>http://www.execpc.com/~jpgarcia
>
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
next prev parent reply other threads:[~2001-07-29 3:48 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-07-24 6:55 userspace button controls Joseph P. Garcia
2001-07-24 9:40 ` Franz Sirl
2001-07-24 15:36 ` Michael Schmitz
2001-07-24 16:21 ` Joseph P. Garcia
2001-07-24 17:40 ` Michael Schmitz
2001-07-24 18:18 ` Joseph P. Garcia
2001-07-24 17:31 ` Bastien Nocera
2001-07-29 3:48 ` Bastien Nocera [this message]
2001-07-29 6:09 ` Joseph P. Garcia
2001-07-29 16:49 ` Bastien Nocera
2001-07-29 22:27 ` Bastien Nocera
2001-07-29 22:45 ` Clock problem Ethan Blanton
2001-07-29 22:51 ` Bastien Nocera
2001-07-30 16:16 ` Martin Costabel
2001-07-31 2:04 ` David Schleef
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3B63877E.9060001@hadess.net \
--to=hadess@hadess.net \
--cc=jpgarcia@execpc.com \
--cc=linuxppc-dev@lists.linuxppc.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).