Comment 6 for bug 222324

Revision history for this message
captive (salvo-schifani) wrote : Re: Support for panasonic hotkeys missing in Hardy

googling around I found this page:
http://rclermont.blogspot.com/2007/10/panasonic-fn-keys-in-ubuntu.html

In the comments someone says that is possible to patch the module to make it work with 2.6.24 kernels.

I've been able to build a working pcc_acpi.ko from the source for my CF-74 and gutsy w/2.6.24 kernel (this should work for hardy 8.04) found here:

http://www.da-cha.jp/files/pcc-acpi-0.9.tar.bz2

and applying the following patch. The patch is the sum of two patches from the source rpm used in opensuse 10.3 basically the make things compatible with the 2.6.23 kernel. (it also works with .24 kernels)

*** pcc_acpi.c 2006-11-21 00:38:41.000000000 -0700
--- pcc_acpi.c.new 2008-05-10 12:58:14.000000000 -0600
***************
*** 168,174 ****
#define METHOD_HKEY_SQTY "SQTY"
#define METHOD_HKEY_SINF "SINF"
#define METHOD_HKEY_SSET "SSET"
- #define HKEY_HID "MAT0012,MAT0013,MAT0018,MAT0019"
#define HKEY_NOTIFY 0x80

/* for brightness control */
--- 168,173 ----
***************
*** 212,224 ****

static int acpi_pcc_hotkey_add(struct acpi_device *device);
static int acpi_pcc_hotkey_remove(struct acpi_device *device, int type);
! static int acpi_pcc_hotkey_resume(struct acpi_device *device, int state);

static struct acpi_driver acpi_pcc_driver = {
.name = ACPI_PCC_DRIVER_NAME,
.class = ACPI_PCC_CLASS,
! .ids = HKEY_HID,
.ops = {
.add = acpi_pcc_hotkey_add,
.remove = acpi_pcc_hotkey_remove,
--- 211,231 ----

static int acpi_pcc_hotkey_add(struct acpi_device *device);
static int acpi_pcc_hotkey_remove(struct acpi_device *device, int type);
! static int acpi_pcc_hotkey_resume(struct acpi_device *device);

+ static const struct acpi_device_id pcc_device_ids[] = {
+ {"MAT0012", 0},
+ {"MAT0013", 0},
+ {"MAT0018", 0},
+ {"MAT0019", 0},
+ {"", 0},
+ };
+ MODULE_DEVICE_TABLE(acpi, pcc_device_ids);

static struct acpi_driver acpi_pcc_driver = {
.name = ACPI_PCC_DRIVER_NAME,
.class = ACPI_PCC_CLASS,
! .ids = pcc_device_ids,
.ops = {
.add = acpi_pcc_hotkey_add,
.remove = acpi_pcc_hotkey_remove,
***************
*** 622,628 ****
case HKEY_NOTIFY:
if (acpi_pcc_hotkey_get_key(hotkey)) {
/* generate event like '"pcc HKEY 00000080 00000084"' when Fn+F4 pressed */
! acpi_bus_generate_event(hotkey->device, event, hotkey->status);
}
acpi_pcc_generete_keyinput(hotkey);
break;
--- 629,635 ----
case HKEY_NOTIFY:
if (acpi_pcc_hotkey_get_key(hotkey)) {
/* generate event like '"pcc HKEY 00000080 00000084"' when Fn+F4 pressed */
! acpi_bus_generate_proc_event(hotkey->device, event, hotkey->status);
}
acpi_pcc_generete_keyinput(hotkey);
break;
***************
*** 834,840 ****
module init
-------------------------------------------------------------------------- */

! static int acpi_pcc_hotkey_resume(struct acpi_device *device, int state)
{
struct acpi_hotkey *hotkey = acpi_driver_data(device);
acpi_status status = AE_OK;
--- 841,847 ----
module init
-------------------------------------------------------------------------- */

! static int acpi_pcc_hotkey_resume(struct acpi_device *device)
{
struct acpi_hotkey *hotkey = acpi_driver_data(device);
acpi_status status = AE_OK;