* generic hotkey driver
@ 2004-09-01 10:32 Yu, Luming
2004-09-03 11:16 ` Hiroshi Miura
2004-09-04 8:45 ` John Belmonte
0 siblings, 2 replies; 9+ messages in thread
From: Yu, Luming @ 2004-09-01 10:32 UTC (permalink / raw)
To: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f; +Cc: Brown, Len
I'm thinking if we need a generic hotkey driver that is configurable
to any specific machine.
There already have two specific hotkey driver: asus_acpi.c and
toshiba_acpi.c. And there
are two upcoming driver : ibm_acpi.c and panasonic_acpi.c. I don't know
how many
hotkey driver will be invented in the future. But I know it will mess up
the code structure.
So, I'm considering a generic hotkey driver that will export
configurable interface to
accommodate the difference.
a. Configure interface:
1. register mapping of event number to internal hotkey number.
2. register expected acpi_handle which is needed to install
notify handler, which will generate event for acpid.
3. register the AML methods that should be executed , with
respect to the hotkey get pressed.
b. Expose interface:
1. Expose the event action interface through /proc/acpi/action,
the interface will receive argument which
will be passed into AML method, as well as AML method
should be executed.
c. Use interface:
1. When user space acpid get a event, it can call related AML
methods related to this hotkey.
Thanks,
Luming
-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_idP47&alloc_id\x10808&op=click
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: generic hotkey driver
2004-09-01 10:32 Yu, Luming
@ 2004-09-03 11:16 ` Hiroshi Miura
2004-09-04 8:45 ` John Belmonte
1 sibling, 0 replies; 9+ messages in thread
From: Hiroshi Miura @ 2004-09-03 11:16 UTC (permalink / raw)
To: Yu, Luming; +Cc: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f, Brown, Len
Hi,
I think hotkey drivers are so differ that it is enough to decide
event format. ie) 'ibm KEY 00001 00001' or 'hotkey/pcc HKEY 000003 000001'
Lcd brightness control is defined in ACPI spec apendix.
I'm starting implement that.
I want to make generic lcd driver that is configurable for each extra drivers.
Bluetooth, dock, and other device settings are not common.
So these may be implement in each extra drivers. eg) ibm_acpi.c has these functions.
At Wed, 1 Sep 2004 18:32:53 +0800,
Yu, Luming wrote:
>
> I'm thinking if we need a generic hotkey driver that is configurable
> to any specific machine.
> There already have two specific hotkey driver: asus_acpi.c and
> toshiba_acpi.c. And there
> are two upcoming driver : ibm_acpi.c and panasonic_acpi.c. I don't know
> how many
> hotkey driver will be invented in the future. But I know it will mess up
> the code structure.
> So, I'm considering a generic hotkey driver that will export
> configurable interface to
> accommodate the difference.
>
> a. Configure interface:
> 1. register mapping of event number to internal hotkey number.
> 2. register expected acpi_handle which is needed to install
> notify handler, which will generate event for acpid.
> 3. register the AML methods that should be executed , with
> respect to the hotkey get pressed.
> b. Expose interface:
> 1. Expose the event action interface through /proc/acpi/action,
> the interface will receive argument which
> will be passed into AML method, as well as AML method
> should be executed.
> c. Use interface:
> 1. When user space acpid get a event, it can call related AML
> methods related to this hotkey.
--
Hiroshi Miura --- http://www.da-cha.org/ --- miura-yiisDzvROlQdnm+yROfE0A@public.gmane.org
NTTDATA Corp. OpenSource Software Center. --- miurahr-3MafRgGXt7BL9jVzuh4AOg@public.gmane.org
NTTDATA Intellilink Corp. OpenSource Engineering Dev. -- miurahr-w0OK63jvRlAuJ+9fw/WgBHgSJqDPrsil@public.gmane.org
Key fingerprint = 9117 9407 5684 FBF1 4063 15B4 401D D077 04AB 8617
-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: generic hotkey driver
2004-09-01 10:32 Yu, Luming
2004-09-03 11:16 ` Hiroshi Miura
@ 2004-09-04 8:45 ` John Belmonte
1 sibling, 0 replies; 9+ messages in thread
From: John Belmonte @ 2004-09-04 8:45 UTC (permalink / raw)
To: Yu, Luming; +Cc: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
Yu, Luming wrote:
> a. Configure interface:
> 1. register mapping of event number to internal hotkey number.
> 2. register expected acpi_handle which is needed to install
> notify handler, which will generate event for acpid.
> 3. register the AML methods that should be executed , with
> respect to the hotkey get pressed.
As far as I know, there is no hotkey event available in Toshiba's case.
The only way to monitor the keys is by polling.
-John
--
http://giftfile.org/ :: giftfile project
-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: generic hotkey driver
@ 2004-09-07 7:54 Yu, Luming
2004-09-07 13:13 ` John Belmonte
0 siblings, 1 reply; 9+ messages in thread
From: Yu, Luming @ 2004-09-07 7:54 UTC (permalink / raw)
To: John Belmonte; +Cc: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
>Yu, Luming wrote:
>> a. Configure interface:
>> 1. register mapping of event number to internal hotkey number.
>> 2. register expected acpi_handle which is needed to install
>> notify handler, which will generate event for acpid.
>> 3. register the AML methods that should be executed , with
>> respect to the hotkey get pressed.
>
>As far as I know, there is no hotkey event available in
>Toshiba's case.
> The only way to monitor the keys is by polling.
Hmm. It's not efficient way for hotkey.
I'm curious what's the polling frequency.
I guess I can slightly modify the configure interface to
add a polling register interface. To keep other parts of
interfaces unchanged, just need to generate corresponding
pseudo event for each active event found by polling.
Does it make sense?
Thanks,
Luming
-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_idP47&alloc_id\x10808&op=click
^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: generic hotkey driver
@ 2004-09-07 8:14 Yu, Luming
2004-09-07 8:49 ` Karol Kozimor
2004-09-14 20:42 ` Pavel Machek
0 siblings, 2 replies; 9+ messages in thread
From: Yu, Luming @ 2004-09-07 8:14 UTC (permalink / raw)
To: Hiroshi Miura; +Cc: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f, Brown, Len
>
>I think hotkey drivers are so differ that it is enough to decide
>event format. ie) 'ibm KEY 00001 00001' or 'hotkey/pcc HKEY
>000003 000001'
>
We don't need to care about the format of event. Since it is
configurable,
we just need to understand the internal meaning. So maybe we
need to define the internal event number, which stands for a
special purpose. such as:
001 turn off display
002 inc brightness
003 dec brightness
004 s3
......
>Lcd brightness control is defined in ACPI spec apendix.
>I'm starting implement that.
>
Be careful, there has a video extension driver
filed at http://bugzilla.kernel.org/show_bug.cgi?id=1944
>I want to make generic lcd driver that is configurable for
>each extra drivers.
>
>Bluetooth, dock, and other device settings are not common.
>So these may be implement in each extra drivers. eg)
>ibm_acpi.c has these functions.
>
But , it is still meaningful to standardize the event format.
Thanks,
Luming
-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_idP47&alloc_id\x10808&op=click
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: generic hotkey driver
2004-09-07 8:14 generic hotkey driver Yu, Luming
@ 2004-09-07 8:49 ` Karol Kozimor
2004-09-14 20:42 ` Pavel Machek
1 sibling, 0 replies; 9+ messages in thread
From: Karol Kozimor @ 2004-09-07 8:49 UTC (permalink / raw)
To: Yu, Luming
Cc: Hiroshi Miura, acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
Brown, Len
Thus wrote Yu, Luming:
> We don't need to care about the format of event. Since it is
> configurable,
> we just need to understand the internal meaning. So maybe we
> need to define the internal event number, which stands for a
> special purpose. such as:
>
> 001 turn off display
> 002 inc brightness
> 003 dec brightness
> 004 s3
> ......
Hmm, ASUS laptops support some 16 distinct events, I don't see your
solution maintainable.
> >Lcd brightness control is defined in ACPI spec apendix.
> >I'm starting implement that.
> Be careful, there has a video extension driver
> filed at http://bugzilla.kernel.org/show_bug.cgi?id=1944
Sadly, most OEMs don't give a damn about the spec and implement this in
their own way.
> >Bluetooth, dock, and other device settings are not common.
> >So these may be implement in each extra drivers. eg)
> >ibm_acpi.c has these functions.
> But , it is still meaningful to standardize the event format.
Sure, but what can be done apart from agreeing on the name of the first
field?
Best regards,
--
Karol 'sziwan' Kozimor
sziwan-DETuoxkZsSqrDJvtcaxF/A@public.gmane.org
-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: generic hotkey driver
2004-09-07 7:54 Yu, Luming
@ 2004-09-07 13:13 ` John Belmonte
0 siblings, 0 replies; 9+ messages in thread
From: John Belmonte @ 2004-09-07 13:13 UTC (permalink / raw)
To: Yu, Luming; +Cc: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
Yu, Luming wrote:
>>> a. Configure interface:
>>> 1. register mapping of event number to internal hotkey number.
>>> 2. register expected acpi_handle which is needed to install
>>>notify handler, which will generate event for acpid.
>>> 3. register the AML methods that should be executed , with
>>>respect to the hotkey get pressed.
>>
>>As far as I know, there is no hotkey event available in
>>Toshiba's case.
>> The only way to monitor the keys is by polling.
>
> Hmm. It's not efficient way for hotkey.
> I'm curious what's the polling frequency.
I don't poll within the kernel-- I leave that issue to userspace. The
hotkeys are queued, and I've found a period of .2s to be more than adequate.
> I guess I can slightly modify the configure interface to
> add a polling register interface. To keep other parts of
> interfaces unchanged, just need to generate corresponding
> pseudo event for each active event found by polling.
>
> Does it make sense?
If you want to provide hotkey events to userspace, I guess there is no
other choice.
-John
--
http://giftfile.org/ :: giftfile project
-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: generic hotkey driver
@ 2004-09-08 15:42 Yu, Luming
0 siblings, 0 replies; 9+ messages in thread
From: Yu, Luming @ 2004-09-08 15:42 UTC (permalink / raw)
To: Karol Kozimor
Cc: Hiroshi Miura, acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
Brown, Len
>> We don't need to care about the format of event. Since it is
>> configurable,
>> we just need to understand the internal meaning. So maybe we
>> need to define the internal event number, which stands for a
>> special purpose. such as:
>>
>> 001 turn off display
>> 002 inc brightness
>> 003 dec brightness
>> 004 s3
>> ......
>
>Hmm, ASUS laptops support some 16 distinct events, I don't see your
>solution maintainable.
>
Hmm, I will maintain a table internally, which will keep the mapping
between
the raw event value with the standard internal event num. If the raw
event value
cannot be mapped to any known standard event num, then the user can
treat
it as extended event. The entry could be:
struct raw_value_2_event {
int raw_event_number;
int standard_event;
int raw_event_flags;
ACTION_LIST *AML_METHOD;
}
The user or init script can input the mapping against the actual laptop
through
the interface:
/proc/acpi/hotkey/config/raw_event_mapping
To register expected acpi_handle which is needed to install
notify handler, which will generate event through /proc/acpi/event for
acpid.
we can input AML pathname on which driver will generate event
when get notified in AML method, like Notify( VGA, 0x80), through
/proc/acpi/hotkey/config/bus_notify
To register polling methods which will generate pseudo event, we can
input the expected AML methods pathname through
/proc/acpi/hotkey/config/pulling_method
Each successful pull will generate a event through /proc/acpi/event to
notify user land to get pulling data from /proc/acpi/hotkey/pulling_data
And the userland daemon will interpret the actual meaning of the raw
data.
To register the AML methods that should be executed , with
respect to the hotkey get pressed. we can input AML pathname through
/proc/acpi/hotkey/config/event_action.
When userland daemon received a event, the daemon just need to feed
/proc/acpi/hotkey/action_argument with the proper argument string.
A "" means no argument is need for the method.
This is just a rough idea.
Thanks,
Luming
-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_idP47&alloc_id\x10808&op=click
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: generic hotkey driver
2004-09-07 8:14 generic hotkey driver Yu, Luming
2004-09-07 8:49 ` Karol Kozimor
@ 2004-09-14 20:42 ` Pavel Machek
1 sibling, 0 replies; 9+ messages in thread
From: Pavel Machek @ 2004-09-14 20:42 UTC (permalink / raw)
To: Yu, Luming
Cc: Hiroshi Miura, acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
Brown, Len
Hi!
> >I think hotkey drivers are so differ that it is enough to decide
> >event format. ie) 'ibm KEY 00001 00001' or 'hotkey/pcc HKEY
> >000003 000001'
> >
>
> We don't need to care about the format of event. Since it is
> configurable,
> we just need to understand the internal meaning. So maybe we
> need to define the internal event number, which stands for a
> special purpose. such as:
>
> 001 turn off display
> 002 inc brightness
> 003 dec brightness
> 004 s3
> ......
>
If those are keys, you should just treat them as keys... That is hook
it into input subsystem.
Pavel
--
People were complaining that M$ turns users into beta-testers...
...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!
-------------------------------------------------------
This SF.Net email is sponsored by: thawte's Crypto Challenge Vl
Crack the code and win a Sony DCRHC40 MiniDV Digital Handycam
Camcorder. More prizes in the weekly Lunch Hour Challenge.
Sign up NOW http://ad.doubleclick.net/clk;10740251;10262165;m
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2004-09-14 20:42 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-07 8:14 generic hotkey driver Yu, Luming
2004-09-07 8:49 ` Karol Kozimor
2004-09-14 20:42 ` Pavel Machek
-- strict thread matches above, loose matches on Subject: below --
2004-09-08 15:42 Yu, Luming
2004-09-07 7:54 Yu, Luming
2004-09-07 13:13 ` John Belmonte
2004-09-01 10:32 Yu, Luming
2004-09-03 11:16 ` Hiroshi Miura
2004-09-04 8:45 ` John Belmonte
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox