Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 31 Jan 2006 13:02:55 -0800
From:      Nate Lawson <nate@root.org>
To:        Anish Mistry <mistry.7@osu.edu>
Cc:        freebsd-acpi@freebsd.org
Subject:   Re: ACPI method calling questions
Message-ID:  <43DFD07F.9020901@root.org>
In-Reply-To: <200601290324.24151.mistry.7@osu.edu>
References:  <200601290324.24151.mistry.7@osu.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
Anish Mistry wrote:
> 	If I has a ACPI device method like:
>             Method (FUNC, 4, Serialized)
>             {
>                 Store (0x80000000, Local0)
>                 If (LEqual (Arg0, 0x1001))
>                 {
>                     Store (S001 (Arg1, Arg2, Arg3), Local0)
>                 }
>                 Else
>                 {
>                     If (LEqual (Arg0, 0x1002))
>                     {
>                         Store (S002 (Arg1, Arg2, Arg3), Local0)
>                     }
>                     Else
>                     {
>                         If (LEqual (Arg0, 0x1004))
>                         {
>                             Store (S004 (Arg1, Arg2, Arg3), Local0)
>                         }
>                     }
>                 }
> 
>                 Return (Local0)
>             }
> How would I go about calling it from my driver?  Like for a single 
> argument set method I'd just do acpi_SetInteger.
> 
> Thanks,
> 

See the implementation of acpi_SetInteger().   You have to create an 
package of integer objects and then call AcpiEvaluateObject().

-- 
Nate



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?43DFD07F.9020901>