* Generic hotkey driver for dock ejecting
@ 2005-08-26 15:25 Matthew Garrett
[not found] ` <20050826152548.GA12991-1xO5oi07KQx4cg9Nei1l7Q@public.gmane.org>
0 siblings, 1 reply; 5+ messages in thread
From: Matthew Garrett @ 2005-08-26 15:25 UTC (permalink / raw)
To: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
I'm playing with a Dell Latitude D610. By doing
echo "0:\\_SB.PCI0.PCIE.GDCK::\\SB_PCI0.PCIE.GDCK::0:0"
>/proc/hotkey/event_config
I can get an event when I push the eject request button on the dock. I
guess the appropriate thing to do in response to this is to call the
dock's eject method (the dock appears to be \_SB.PCI0.PCIE.GDCK, which
has _EJ0, _EJ3 and _EJ4 methods). How do I go about this?
--
Matthew Garrett | mjg59-1xO5oi07KQx4cg9Nei1l7Q@public.gmane.org
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Generic hotkey driver for dock ejecting
[not found] ` <20050826152548.GA12991-1xO5oi07KQx4cg9Nei1l7Q@public.gmane.org>
@ 2005-08-27 12:24 ` Pavel Machek
0 siblings, 0 replies; 5+ messages in thread
From: Pavel Machek @ 2005-08-27 12:24 UTC (permalink / raw)
To: Matthew Garrett; +Cc: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
Hi!
> I'm playing with a Dell Latitude D610. By doing
>
> echo "0:\_SB.PCI0.PCIE.GDCK::\SB_PCI0.PCIE.GDCK::0:0"
> >/proc/hotkey/event_config
>
> I can get an event when I push the eject request button on the dock. I
> guess the appropriate thing to do in response to this is to call the
> dock's eject method (the dock appears to be \_SB.PCI0.PCIE.GDCK, which
> has _EJ0, _EJ3 and _EJ4 methods). How do I go about this?
>
Well, I guess you need to hot-unplug devices in the dock and only then
call the eject methods.
BTW it would be nice to have some common infrastructure;
I have thinkpad with dock here, too...
--
64 bytes from 195.113.31.123: icmp_seq=28 ttl=51 time=448769.1 ms
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: Generic hotkey driver for dock ejecting
@ 2005-08-27 14:43 Yu, Luming
2005-08-27 23:55 ` Matthew Garrett
0 siblings, 1 reply; 5+ messages in thread
From: Yu, Luming @ 2005-08-27 14:43 UTC (permalink / raw)
To: Matthew Garrett, acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
>
>I'm playing with a Dell Latitude D610. By doing
>
>echo "0:\\_SB.PCI0.PCIE.GDCK::\\SB_PCI0.PCIE.GDCK::0:0"
>>/proc/hotkey/event_config
>
>I can get an event when I push the eject request button on the dock. I
>guess the appropriate thing to do in response to this is to call the
>dock's eject method (the dock appears to be \_SB.PCI0.PCIE.GDCK, which
>has _EJ0, _EJ3 and _EJ4 methods). How do I go about this?
>
>--
>Matthew Garrett | mjg59-1xO5oi07KQx4cg9Nei1l7Q@public.gmane.org
>
I think you need to find out the event number generated when pushing
button.
I call it external_event_num. And you need assign a interal_event_num
for it.
I want internal_event_num stand for common things.
Then register it by
echo
"0:\\_SB.PCI0.PCIE.GDCK::\\SB_PCI0.PCIE.GDCK:_EJxx:internal_event_num:ex
ternal_event_num" > event_config
You can invoke _Ejxx by
echo "internal_event_num:0:1:0" > /proc/acp/hotkey/action
Thanks,
Luming
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Generic hotkey driver for dock ejecting
2005-08-27 14:43 Generic hotkey driver for dock ejecting Yu, Luming
@ 2005-08-27 23:55 ` Matthew Garrett
[not found] ` <20050827235547.GA18990-1xO5oi07KQx4cg9Nei1l7Q@public.gmane.org>
0 siblings, 1 reply; 5+ messages in thread
From: Matthew Garrett @ 2005-08-27 23:55 UTC (permalink / raw)
To: Yu, Luming; +Cc: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
On Sat, Aug 27, 2005 at 10:43:14PM +0800, Yu, Luming wrote:
> I think you need to find out the event number generated when pushing
> button.
> I call it external_event_num. And you need assign a interal_event_num
> for it.
I'm sorry, but I'm not quite sure what you mean by the event number. Is
this one of the numbers generated by the event?
> You can invoke _Ejxx by
>
> echo "internal_event_num:0:1:0" > /proc/acp/hotkey/action
How do I pass an argument to the method? By the looks of it, when
undocking the _DCK method should be called, followed by an _EJx method.
Can I call multiple methods in response to a single event?
It might actually be nice to have an interface that allows userspace to
call arbitrary ACPI methods at any time, rather than simply in response
to hotkey events.
--
Matthew Garrett | mjg59-1xO5oi07KQx4cg9Nei1l7Q@public.gmane.org
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Generic hotkey driver for dock ejecting
[not found] ` <20050827235547.GA18990-1xO5oi07KQx4cg9Nei1l7Q@public.gmane.org>
@ 2005-08-28 4:37 ` Pavel Troller
0 siblings, 0 replies; 5+ messages in thread
From: Pavel Troller @ 2005-08-28 4:37 UTC (permalink / raw)
To: Matthew Garrett; +Cc: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
> It might actually be nice to have an interface that allows userspace to
> call arbitrary ACPI methods at any time, rather than simply in response
> to hotkey events.
>
Hi!
Such interface does exist! It's Alex Williamson's dev_acpi driver, which
loads as a kernel module, and an userspace utility.
I've written a small "acpicall" program based on his own utilities, allowing to
call any method without arguments or with a single integer. BTW, there is
a program called "acpiundock" in his package; did You Try it ? I didn't,
because I don't have nothing to dock/undock.
I think that the dev_acpi module is a hot candidate for inclusion to the
kernel tree, it exposes /dev/acpi character device, which interacts with the
ACPI subsystem by ioctls and read/write and allows really nice ACPI space
access.
It can be found at
http://free.linux.hp.com/~awilliam/acpi/dev_acpi/dev_acpi-20040803.tar.bz2 ;
I've sent him a patch which registers the driver with sysfs, thus automatically
creating the /dev/acpi node, but he didn't make a new release containing it yet,
I can send it if You want, as well as my experimental acpicall utility source.
With regards, Pavel Troller
> --
> Matthew Garrett | mjg59-1xO5oi07KQx4cg9Nei1l7Q@public.gmane.org
>
>
> -------------------------------------------------------
> SF.Net email is Sponsored by the Better Software Conference & EXPO
> September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
> Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
> Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
> _______________________________________________
> Acpi-devel mailing list
> Acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> https://lists.sourceforge.net/lists/listinfo/acpi-devel
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2005-08-28 4:37 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-27 14:43 Generic hotkey driver for dock ejecting Yu, Luming
2005-08-27 23:55 ` Matthew Garrett
[not found] ` <20050827235547.GA18990-1xO5oi07KQx4cg9Nei1l7Q@public.gmane.org>
2005-08-28 4:37 ` Pavel Troller
-- strict thread matches above, loose matches on Subject: below --
2005-08-26 15:25 Matthew Garrett
[not found] ` <20050826152548.GA12991-1xO5oi07KQx4cg9Nei1l7Q@public.gmane.org>
2005-08-27 12:24 ` Pavel Machek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox