From owner-freebsd-acpi@FreeBSD.ORG Sat Jan 26 18:01:50 2008 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D3BAD16A421 for ; Sat, 26 Jan 2008 18:01:50 +0000 (UTC) (envelope-from artur@ebasoft.com.pl) Received: from poczta.ebasoft.com.pl (ftp.ebasoft.com.pl [85.237.185.105]) by mx1.freebsd.org (Postfix) with ESMTP id 4CBE913C44B for ; Sat, 26 Jan 2008 18:01:50 +0000 (UTC) (envelope-from artur@ebasoft.com.pl) Received: from localhost (localhost [127.0.0.1]) by poczta.ebasoft.com.pl (Postfix) with ESMTP id 839021AF4C9 for ; Sat, 26 Jan 2008 18:37:34 +0100 (CET) X-Virus-Scanned: amavisd-new 2.4.4 (20061120) at ebasoft.com.pl Received: from poczta.ebasoft.com.pl ([127.0.0.1]) by localhost (ns.ebasoft.com.pl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id NZXvX0ZhF88U for ; Sat, 26 Jan 2008 18:37:29 +0100 (CET) Received: from [192.168.0.42] (unknown [192.168.0.42]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by poczta.ebasoft.com.pl (Postfix) with ESMTP id C533A1AF4C8 for ; Sat, 26 Jan 2008 18:37:29 +0100 (CET) From: Artur =?iso-8859-2?q?Ba=E6?= Organization: EBASoft To: freebsd-acpi@freebsd.org Date: Sat, 26 Jan 2008 18:37:26 +0100 User-Agent: KMail/1.9.7 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-2" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200801261837.26708.artur@ebasoft.com.pl> Subject: Need info about ACPI - implementing acer_acpi, amilo 1650g X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Jan 2008 18:01:51 -0000 Hello I need little help in implementing acpi suplementary driver for my Laptop . Abstract: I implement via acpi, a HotKey switch for enabling WiFi antena In linux community there is acerhk and acer_acpi module wich does this for= =20 linux. It works even on FujitsuSiemens Amilo1650G when on linux. So, i dumped DSDT , then corrected errors and I try to find namespace and=20 method in acpi which is responsible for enablig such radio antena. Digging in acerhk i found : #define EC_STATUS_REG 0x66 /* Status register of EC (R) */ #define EC_CNTL_REG 0x66 /* Controller command register of EC (W) */ #define EC_DATA_REG 0x62 /* EC data register (R/W) */ and in acer_acpi /* * Magic Number * Meaning is unknown - this number is required for writing to ACPI for AMW0 * (it's also used in acerhk when directly accessing the EC) */ #define ACER_AMW0_WRITE 0x9610 /* * Bit masks for the old AMW0 interface */ #define ACER_AMW0_WIRELESS_MASK 0x35 #define ACER_AMW0_BLUETOOTH_MASK 0x34 #define ACER_AMW0_MAILLED_MASK 0x31 /* * Acer ACPI method GUIDs */ #define AMW0_GUID1 "67C3371D-95A3-4C37-BB61-DD47B491DAAB" #define WMID_GUID1 "6AF4F258-B401-42fd-BE91-3D4AC2D7C0D3" #define WMID_GUID2 "95764E09-FB56-4e83-B31A-37761F60994A" I tryed to much such things in my DSTD since acer_acpi worked with linux on= my=20 laptop and i found in namespace \_SB.PCI0.LPC0.EC0 OperationRegion (ECO1, SystemIO, 0x62, 0x01) OperationRegion (ECO2, SystemIO, 0x66, 0x01) here is cut of my DSDT Scope (\_SB) { Device (AMW0) { Method (_WED, 1, NotSerialized) { Store (0xB0, DBGP) If (LEqual (Arg0, 0xB0)) { Store (WLID, B0ED) Return (B0ED) } } } Device (PCI0) { Device (LPC0) { Device (EC0) { Name (_HID, EisaId ("PNP0C09")) Name (_GPE, 0x03) Method (_STA, 0, NotSerialized) { Return (0x0F) } =09 Name (_CRS, ResourceTemplate () { IO (Decode16, 0x0062, // Range Minimum 0x0062, // Range Maximum 0x00, // Alignment 0x01, // Length ) IO (Decode16, 0x0066, // Range Minimum 0x0066, // Range Maximum 0x00, // Alignment 0x01, // Length ) }) OperationRegion (ECO1, SystemIO, 0x62, 0x01) Field (ECO1, ByteAcc, Lock, Preserve) { PX62, 8 } =09 OperationRegion (ECO2, SystemIO, 0x66, 0x01) Field (ECO2, ByteAcc, Lock, Preserve) { PX66, 8 } Method (_REG, 2, NotSerialized) { If (LEqual (Arg0, 0x03)) { Store (Arg1, ECON) TINI () } } Since i'm not weak in C/C++ i'm able to write such kld module with Your hel= p=20 and looking at other written by You in sys/acpi_module Questions: 1) Is this namespace and registers the ones which I need to switch on/off w= ifi=20 antena, did I found crrect ones ? 2) Could any one give me hints/help how to move forward since there are=20 registers and normaly there should be some method to call, is the Method=20 (_REG, 2, NotSerialized) the one that schould be called by me, or maybe i=20 should use AMW0 methods ? 3)the FreeBSD module acpi_fujitsu will not work since it has different OMEI= D,=20 =46ujitsuSiemens AMilo has got "FUJ ", "W37 " Any help will be apreciated. =2D-=20 Sincerelly Artur Ba=E6