* hotkey/video framework [was: ibm-acpi-0.2]
[not found] ` <20040814211247.GS20883-AKoe11r2kkOzaBltdDZI6w@public.gmane.org>
@ 2004-08-15 14:41 ` Hiroshi Miura
[not found] ` <873c2obh0l.wl%miura-yiisDzvROlQdnm+yROfE0A@public.gmane.org>
0 siblings, 1 reply; 6+ messages in thread
From: Hiroshi Miura @ 2004-08-15 14:41 UTC (permalink / raw)
To: Borislav Deianov, Karol Kozimor, julien.lerouge-GANU6spQydw,
John Belmonte
Cc: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
letsnote-tech-eXqGM+LsbTTAqL8d+zIrHngSJqDPrsil
Hi,
'Fn key combination' is common on machines,
so I think we need some abstraction layer or framework on acpi core.
I wrote acpi driver for Panasonic Let's note laptops recentry.
It supports lcd brightness control and hotkey.
Toshiba and asus driver also support hotkey combination.
How do you think about hotkey framework?
Does anyone already work for it?
eg)
proc interface:
/proc/acpi/hotkey/keymap --- key num - event meaning map
/proc/acpi/hotkey/mask --- hotkey enable/disable mask.
/proc/acpi/event --- send hotkey event to acpid
/proc/acpi/video/lcd/brightness --- control lcd brightness
/proc/acpi/video/outdev --- control video output (lcd/crt)
/proc/acpi/ibm/* --- vendor specific devices conrol
Source tree:
drivers/acpi/video.c -- video/lcd abstraction driver.
drivers/acpi/hotkey.c -- hotkey abstraction driver.
drivers/acpi/oem/asus_acpi.c
drivers/acpi/oem/toshiba-acpi.c
drivers/acpi/oem/pcc-acpi.c
drivers/acpi/oem/ibm-acpi.c -- vendor specific drivers.
which implement hotkey, video, and lcd etc.
At Sat, 14 Aug 2004 14:12:47 -0700,
Borislav Deianov wrote:
>
> This is the second alpha release of my ACPI driver for IBM ThinkPad
> laptops. The features currently supported are:
>
> - Fn key combinations
> - Bluetooth enable and disable
> - limited docking and undocking
>
--
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
-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: hotkey/video framework [was: ibm-acpi-0.2]
[not found] ` <873c2obh0l.wl%miura-yiisDzvROlQdnm+yROfE0A@public.gmane.org>
@ 2004-08-17 7:23 ` Borislav Deianov
0 siblings, 0 replies; 6+ messages in thread
From: Borislav Deianov @ 2004-08-17 7:23 UTC (permalink / raw)
To: Hiroshi Miura
Cc: Karol Kozimor, julien.lerouge-GANU6spQydw, John Belmonte,
acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
letsnote-tech-eXqGM+LsbTTAqL8d+zIrHngSJqDPrsil
On Sun, Aug 15, 2004 at 11:41:30PM +0900, Hiroshi Miura wrote:
> Hi,
>
> 'Fn key combination' is common on machines,
> so I think we need some abstraction layer or framework on acpi core.
One possibility is to just agree on the proc file format and ACPI
events for the common features, then have each driver implement them
separately. This would probably be simpler than trying to come up with
some sort of a wrapper framework as the code involved is fairly simple
and there probably isn't much we can share. Then again, there might
be, I haven't looked.
I'd be up for something like this, although I'll be busy for a while
getting all the ThinkPad features to work.
Boris
-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: hotkey/video framework [was: ibm-acpi-0.2]
@ 2004-08-17 9:15 Yu, Luming
2004-08-17 21:55 ` Karol Kozimor
2004-08-17 23:55 ` Hiroshi Miura
0 siblings, 2 replies; 6+ messages in thread
From: Yu, Luming @ 2004-08-17 9:15 UTC (permalink / raw)
To: Borislav Deianov, Hiroshi Miura
Cc: Karol Kozimor, julien.lerouge-GANU6spQydw, John Belmonte,
acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
letsnote-tech-eXqGM+LsbTTAqL8d+zIrHngSJqDPrsil
>>
>> 'Fn key combination' is common on machines,
>> so I think we need some abstraction layer or framework on acpi core.
>
>One possibility is to just agree on the proc file format and ACPI
>events for the common features, then have each driver implement them
>separately. This would probably be simpler than trying to come up with
>some sort of a wrapper framework as the code involved is fairly simple
>and there probably isn't much we can share. Then again, there might
>be, I haven't looked.
>
I think the proposaled framework/abstraction layer is NOT just for
code sharing. We need to dynamically load the proper hotkey/video driver
.
Thanks,
Luming
-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: hotkey/video framework [was: ibm-acpi-0.2]
2004-08-17 9:15 hotkey/video framework [was: ibm-acpi-0.2] Yu, Luming
@ 2004-08-17 21:55 ` Karol Kozimor
2004-08-17 23:55 ` Hiroshi Miura
1 sibling, 0 replies; 6+ messages in thread
From: Karol Kozimor @ 2004-08-17 21:55 UTC (permalink / raw)
To: Yu, Luming
Cc: Borislav Deianov, Hiroshi Miura, julien.lerouge-GANU6spQydw,
John Belmonte, acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
letsnote-tech-eXqGM+LsbTTAqL8d+zIrHngSJqDPrsil
Thus wrote Yu, Luming:
> >One possibility is to just agree on the proc file format and ACPI
> >events for the common features, then have each driver implement them
> >separately. This would probably be simpler than trying to come up with
> >some sort of a wrapper framework as the code involved is fairly simple
> >and there probably isn't much we can share. Then again, there might
> >be, I haven't looked.
> I think the proposaled framework/abstraction layer is NOT just for
> code sharing. We need to dynamically load the proper hotkey/video driver
While binding all HIDs in one place should be fairly easy, I don't think I
see an advantage to that as opposed to a modrobe *_acpi solution,
especially now that the fix to acpi_bus_register_driver() is in place.
As for the video, if a certain API was agreed on, the generic driver could
provide an abstraction that vendor-specific drivers could bind on. What I'm
afraid of is that the components and AML code used are so diverse that the
management of such a layer becomes a nightmare.
Best regards,
--
Karol 'sziwan' Kozimor
sziwan-DETuoxkZsSqrDJvtcaxF/A@public.gmane.org
-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: hotkey/video framework [was: ibm-acpi-0.2]
2004-08-17 9:15 hotkey/video framework [was: ibm-acpi-0.2] Yu, Luming
2004-08-17 21:55 ` Karol Kozimor
@ 2004-08-17 23:55 ` Hiroshi Miura
[not found] ` <87acwt8gls.wl%miura-yiisDzvROlQdnm+yROfE0A@public.gmane.org>
1 sibling, 1 reply; 6+ messages in thread
From: Hiroshi Miura @ 2004-08-17 23:55 UTC (permalink / raw)
To: Yu, Luming
Cc: Borislav Deianov, Hiroshi Miura, Karol Kozimor,
julien.lerouge-GANU6spQydw, John Belmonte,
acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
Hi,
At Tue, 17 Aug 2004 17:15:17 +0800,
Yu, Luming wrote:
>
> >>
> >> 'Fn key combination' is common on machines,
> >> so I think we need some abstraction layer or framework on acpi core.
> >
> >One possibility is to just agree on the proc file format and ACPI
> >events for the common features,
I think it's good start.
> > then have each driver implement them
> >separately. This would probably be simpler than trying to come up with
> >some sort of a wrapper framework as the code involved is fairly simple
> >and there probably isn't much we can share. Then again, there might
> >be, I haven't looked.
> >
>
> I think the proposaled framework/abstraction layer is NOT just for
> code sharing. We need to dynamically load the proper hotkey/video driver
I have read three driver, asus, toshiba, and ibm.
These are differ each other.
asus: notify key event by 'Notify(event num)'
toshiba: polling some device/method for get key event.
ibm: notify key event by 'Notify(DEVICE_NOTIFY)' then get key by some method.
panasonic: same as ibm but device and method name is differ.
This means difficulties of sharing driver code.
Dynamic loading is nice propose.
with this code, i can determine which is that machine.
static struct acpi_table_header *dsdt_info;
status = acpi_get_table(ACPI_TABLE_DSDT, 1, &dsdt);
if (ACPI_FAILURE(status))
/* error */
dsdt_info = (struct acpi_table_header *) dsdt.pointer;
chek_which_oem_and_invoke_proper_driver (dsdt->oem_id);
Wrapper driver only need to know oem_ids and driver name mapping.
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
-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: hotkey/video framework [was: ibm-acpi-0.2]
[not found] ` <87acwt8gls.wl%miura-yiisDzvROlQdnm+yROfE0A@public.gmane.org>
@ 2004-08-18 4:59 ` Len Brown
0 siblings, 0 replies; 6+ messages in thread
From: Len Brown @ 2004-08-18 4:59 UTC (permalink / raw)
To: Hiroshi Miura
Cc: Luming Yu, Borislav Deianov, Karol Kozimor,
julien.lerouge-GANU6spQydw, John Belmonte, ACPI Developers
On Tue, 2004-08-17 at 19:55, Hiroshi Miura wrote:
> Hi,
>
> At Tue, 17 Aug 2004 17:15:17 +0800,
> Yu, Luming wrote:
> >
> > >>
> > >> 'Fn key combination' is common on machines,
> > >> so I think we need some abstraction layer or framework on acpi core.
> > >
> > >One possibility is to just agree on the proc file format and ACPI
> > >events for the common features,
>
> I think it's good start.
i agree.
> > > then have each driver implement them
> > >separately. This would probably be simpler than trying to come up with
> > >some sort of a wrapper framework as the code involved is fairly simple
> > >and there probably isn't much we can share. Then again, there might
> > >be, I haven't looked.
> > >
> >
> > I think the proposaled framework/abstraction layer is NOT just for
> > code sharing. We need to dynamically load the proper hotkey/video driver
>
> I have read three driver, asus, toshiba, and ibm.
> These are differ each other.
>
> asus: notify key event by 'Notify(event num)'
> toshiba: polling some device/method for get key event.
> ibm: notify key event by 'Notify(DEVICE_NOTIFY)' then get key by some method.
> panasonic: same as ibm but device and method name is differ.
>
> This means difficulties of sharing driver code.
Lots of tinkering has been done in this space.
here's the top google hit:
http://www.tuxmobil.org/Mobile-Guide.db/mobile-guide-p2c1s8-ext-keys.html
I'm confident that the platforms will all have different methods to
actually grab the hotkey events, because ACPI doesn't standardize that
part. Some will not use ACPI at all to get the hotkey events, but for
those that do, I want to make sure that the ACPI interfaces are standard
and sufficient to support somebody building a platform specific driver.
More important is the stuff that the event handlers call for sending
events to user space, or video control within the kernel -- this should
be shared and not duplicated.
> Dynamic loading is nice propose.
> with this code, i can determine which is that machine.
>
> static struct acpi_table_header *dsdt_info;
> status = acpi_get_table(ACPI_TABLE_DSDT, 1, &dsdt);
> if (ACPI_FAILURE(status))
> /* error */
>
> dsdt_info = (struct acpi_table_header *) dsdt.pointer;
> chek_which_oem_and_invoke_proper_driver (dsdt->oem_id);
>
> Wrapper driver only need to know oem_ids and driver name mapping.
Your panasonic driver looked like it got it right by using
acpi_bus_register_driver() and a HID. I don't understand
why mess that up by looking at table headers?
-Len
-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2004-08-18 4:59 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-08-17 9:15 hotkey/video framework [was: ibm-acpi-0.2] Yu, Luming
2004-08-17 21:55 ` Karol Kozimor
2004-08-17 23:55 ` Hiroshi Miura
[not found] ` <87acwt8gls.wl%miura-yiisDzvROlQdnm+yROfE0A@public.gmane.org>
2004-08-18 4:59 ` Len Brown
-- strict thread matches above, loose matches on Subject: below --
2004-08-10 8:08 ibm-acpi-0.1 Borislav Deianov
2004-08-14 21:12 ` ibm-acpi-0.2 Borislav Deianov
[not found] ` <20040814211247.GS20883-AKoe11r2kkOzaBltdDZI6w@public.gmane.org>
2004-08-15 14:41 ` hotkey/video framework [was: ibm-acpi-0.2] Hiroshi Miura
[not found] ` <873c2obh0l.wl%miura-yiisDzvROlQdnm+yROfE0A@public.gmane.org>
2004-08-17 7:23 ` Borislav Deianov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox