\hypertarget{acpi__dock_8c_source}{}\doxysection{acpi\+\_\+dock.\+c}
\label{acpi__dock_8c_source}\index{dev/acpica/acpi\_dock.c@{dev/acpica/acpi\_dock.c}}
\mbox{\hyperlink{acpi__dock_8c}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00001}00001 \textcolor{comment}{/*-\/}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00002}00002 \textcolor{comment}{ * Copyright (c) 2005-\/2006 Mitsuru IWASAKI <iwasaki@FreeBSD.org>}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00003}00003 \textcolor{comment}{ * All rights reserved.}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00004}00004 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00005}00005 \textcolor{comment}{ * Redistribution and use in source and binary forms, with or without}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00006}00006 \textcolor{comment}{ * modification, are permitted provided that the following conditions}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00007}00007 \textcolor{comment}{ * are met:}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00008}00008 \textcolor{comment}{ * 1. Redistributions of source code must retain the above copyright}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00009}00009 \textcolor{comment}{ *    notice, this list of conditions and the following disclaimer.}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00010}00010 \textcolor{comment}{ * 2. Redistributions in binary form must reproduce the above copyright}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00011}00011 \textcolor{comment}{ *    notice, this list of conditions and the following disclaimer in the}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00012}00012 \textcolor{comment}{ *    documentation and/or other materials provided with the distribution.}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00013}00013 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00014}00014 \textcolor{comment}{ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00015}00015 \textcolor{comment}{ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00016}00016 \textcolor{comment}{ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00017}00017 \textcolor{comment}{ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00018}00018 \textcolor{comment}{ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00019}00019 \textcolor{comment}{ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00020}00020 \textcolor{comment}{ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00021}00021 \textcolor{comment}{ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00022}00022 \textcolor{comment}{ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00023}00023 \textcolor{comment}{ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00024}00024 \textcolor{comment}{ * SUCH DAMAGE.}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00025}00025 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00026}00026 \textcolor{comment}{ * \$FreeBSD\$}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00027}00027 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00028}00028 }
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00029}00029 \textcolor{preprocessor}{\#include "{}opt\_acpi.h"{}}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00030}00030 \textcolor{preprocessor}{\#include <sys/param.h>}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00031}00031 \textcolor{preprocessor}{\#include <sys/bus.h>}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00032}00032 \textcolor{preprocessor}{\#include <sys/kernel.h>}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00033}00033 \textcolor{preprocessor}{\#include <sys/module.h>}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00034}00034 }
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00035}00035 \textcolor{preprocessor}{\#include <contrib/dev/acpica/include/acpi.h>}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00036}00036 \textcolor{preprocessor}{\#include <contrib/dev/acpica/include/accommon.h>}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00037}00037 }
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00038}00038 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{acpivar_8h}{dev/acpica/acpivar.h}}>}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00039}00039 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{acpiio_8h}{dev/acpica/acpiio.h}}>}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00040}00040 }
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00041}00041 \textcolor{comment}{/* Hooks for the ACPI CA debugging infrastructure */}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00042}\mbox{\hyperlink{acpi__dock_8c_ac76d546e6c738c61838d855c815bfbcc}{00042}} \textcolor{preprocessor}{\#define \_COMPONENT      ACPI\_DOCK}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00043}00043 ACPI\_MODULE\_NAME(\textcolor{stringliteral}{"{}DOCK"{}})}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00044}00044 }
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00045}00045 \textcolor{comment}{/* For Docking status */}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00046}\mbox{\hyperlink{acpi__dock_8c_a1ee224bea521a0a46ca351e4f82993ca}{00046}} \textcolor{preprocessor}{\#define ACPI\_DOCK\_STATUS\_UNKNOWN        -\/1}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00047}\mbox{\hyperlink{acpi__dock_8c_a4e59f920d9b861b75ac91701c031155f}{00047}} \textcolor{preprocessor}{\#define ACPI\_DOCK\_STATUS\_UNDOCKED       0}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00048}\mbox{\hyperlink{acpi__dock_8c_a6c4f3f6d26d323d97b7ca8b2dc269dc5}{00048}} \textcolor{preprocessor}{\#define ACPI\_DOCK\_STATUS\_DOCKED         1}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00049}00049 }
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00050}\mbox{\hyperlink{acpi__dock_8c_af8ebe374e0135cfeaba4dbd71b549d79}{00050}} \textcolor{preprocessor}{\#define ACPI\_DOCK\_UNLOCK                0 }\textcolor{comment}{/* Allow device to be ejected */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00051}\mbox{\hyperlink{acpi__dock_8c_a2a0101220efb9c6b0fe164be0d9a9f57}{00051}} \textcolor{preprocessor}{\#define ACPI\_DOCK\_LOCK                  1 }\textcolor{comment}{/* Prevent dev from being removed */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00052}00052 }
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00053}\mbox{\hyperlink{acpi__dock_8c_a277bd67e3b74d7846eb37f3e4aecef11}{00053}} \textcolor{preprocessor}{\#define ACPI\_DOCK\_ISOLATE               0 }\textcolor{comment}{/* Isolate from dock connector */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00054}\mbox{\hyperlink{acpi__dock_8c_ab666c0e6433aedfe9ce4a20246c378ff}{00054}} \textcolor{preprocessor}{\#define ACPI\_DOCK\_CONNECT               1 }\textcolor{comment}{/* Connect to dock */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00055}00055 }
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00056}\mbox{\hyperlink{structacpi__dock__softc}{00056}} \textcolor{keyword}{struct }\mbox{\hyperlink{structacpi__dock__softc}{acpi\_dock\_softc}} \{}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00057}\mbox{\hyperlink{structacpi__dock__softc_aa3022457dbea076374eaa19c532e1359}{00057}}         \textcolor{keywordtype}{int}             \mbox{\hyperlink{structacpi__dock__softc_aa3022457dbea076374eaa19c532e1359}{\_sta}};}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00058}\mbox{\hyperlink{structacpi__dock__softc_a7599363a1947e002244fe2561ab5c040}{00058}}         \textcolor{keywordtype}{int}             \mbox{\hyperlink{structacpi__dock__softc_a7599363a1947e002244fe2561ab5c040}{\_bdn}};}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00059}\mbox{\hyperlink{structacpi__dock__softc_ae89aa5f5de1d73a3e6f61ce90dda6761}{00059}}         \textcolor{keywordtype}{int}             \mbox{\hyperlink{structacpi__dock__softc_ae89aa5f5de1d73a3e6f61ce90dda6761}{\_uid}};}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00060}\mbox{\hyperlink{structacpi__dock__softc_aad9f1c3a1931ae5883054b57309a2696}{00060}}         \textcolor{keywordtype}{int}             \mbox{\hyperlink{structacpi__dock__softc_aad9f1c3a1931ae5883054b57309a2696}{status}};}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00061}\mbox{\hyperlink{structacpi__dock__softc_a566085343ef1ca582d39e979f112120e}{00061}}         \textcolor{keyword}{struct }sysctl\_ctx\_list  *\mbox{\hyperlink{structacpi__dock__softc_a566085343ef1ca582d39e979f112120e}{sysctl\_ctx}};}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00062}\mbox{\hyperlink{structacpi__dock__softc_a615e1cb6351a9aa2b3e48f6e2427fdb7}{00062}}         \textcolor{keyword}{struct }sysctl\_oid       *\mbox{\hyperlink{structacpi__dock__softc_a615e1cb6351a9aa2b3e48f6e2427fdb7}{sysctl\_tree}};}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00063}00063 \};}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00064}00064 }
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00065}\mbox{\hyperlink{acpi__dock_8c_ae44d1cb89814b747876d63498bb7f295}{00065}} \mbox{\hyperlink{acpi__dock_8c_ae44d1cb89814b747876d63498bb7f295}{ACPI\_SERIAL\_DECL}}(dock, \textcolor{stringliteral}{"{}ACPI Docking Station"{}});}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00066}00066 }
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00067}\mbox{\hyperlink{acpi__dock_8c_a6eab5b84fde0d5a438a3bd57abf3761a}{00067}} \textcolor{keyword}{static} \textcolor{keywordtype}{char} *\mbox{\hyperlink{acpi__dock_8c_a6eab5b84fde0d5a438a3bd57abf3761a}{acpi\_dock\_pnp\_ids}}[] = \{\textcolor{stringliteral}{"{}PNP0C15"{}}, NULL\};}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00068}00068 }
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00069}00069 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00070}00070 \textcolor{comment}{ * Utility functions}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00071}00071 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00072}00072 }
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00073}00073 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00074}\mbox{\hyperlink{acpi__dock_8c_a97eed599a92e28a8e6f31fe01a81ab66}{00074}} \mbox{\hyperlink{acpi__dock_8c_a97eed599a92e28a8e6f31fe01a81ab66}{acpi\_dock\_get\_info}}(device\_t \mbox{\hyperlink{acpi__bus__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}})}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00075}00075 \{}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00076}00076         \textcolor{keyword}{struct }\mbox{\hyperlink{structacpi__dock__softc}{acpi\_dock\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00077}00077         ACPI\_HANDLE     h;}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00078}00078 }
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00079}00079         sc = device\_get\_softc(\mbox{\hyperlink{acpi__bus__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}});}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00080}00080         h = acpi\_get\_handle(\mbox{\hyperlink{acpi__bus__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}});}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00081}00081 }
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00082}00082         \textcolor{keywordflow}{if} (ACPI\_FAILURE(\mbox{\hyperlink{acpi_8c_a11e4043d67ac9e080d87768b4a7a4262}{acpi\_GetInteger}}(h, \textcolor{stringliteral}{"{}\_STA"{}}, \&sc-\/>\mbox{\hyperlink{structacpi__dock__softc_aa3022457dbea076374eaa19c532e1359}{\_sta}})))}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00083}00083                 sc-\/>\mbox{\hyperlink{structacpi__dock__softc_aa3022457dbea076374eaa19c532e1359}{\_sta}} = \mbox{\hyperlink{acpi__dock_8c_a1ee224bea521a0a46ca351e4f82993ca}{ACPI\_DOCK\_STATUS\_UNKNOWN}};}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00084}00084         \textcolor{keywordflow}{if} (ACPI\_FAILURE(\mbox{\hyperlink{acpi_8c_a11e4043d67ac9e080d87768b4a7a4262}{acpi\_GetInteger}}(h, \textcolor{stringliteral}{"{}\_BDN"{}}, \&sc-\/>\mbox{\hyperlink{structacpi__dock__softc_a7599363a1947e002244fe2561ab5c040}{\_bdn}})))}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00085}00085                 sc-\/>\mbox{\hyperlink{structacpi__dock__softc_a7599363a1947e002244fe2561ab5c040}{\_bdn}} = \mbox{\hyperlink{acpi__dock_8c_a1ee224bea521a0a46ca351e4f82993ca}{ACPI\_DOCK\_STATUS\_UNKNOWN}};}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00086}00086         \textcolor{keywordflow}{if} (ACPI\_FAILURE(\mbox{\hyperlink{acpi_8c_a11e4043d67ac9e080d87768b4a7a4262}{acpi\_GetInteger}}(h, \textcolor{stringliteral}{"{}\_UID"{}}, \&sc-\/>\mbox{\hyperlink{structacpi__dock__softc_ae89aa5f5de1d73a3e6f61ce90dda6761}{\_uid}})))}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00087}00087                 sc-\/>\mbox{\hyperlink{structacpi__dock__softc_ae89aa5f5de1d73a3e6f61ce90dda6761}{\_uid}} = \mbox{\hyperlink{acpi__dock_8c_a1ee224bea521a0a46ca351e4f82993ca}{ACPI\_DOCK\_STATUS\_UNKNOWN}};}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00088}00088         \mbox{\hyperlink{acpivar_8h_abc8518069380334353a11c61577e5196}{ACPI\_VPRINT}}(\mbox{\hyperlink{acpi__bus__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}}, \mbox{\hyperlink{acpivar_8h_a089f3e499f9f37b4b702fa96a6bca97c}{acpi\_device\_get\_parent\_softc}}(\mbox{\hyperlink{acpi__bus__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}}),}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00089}00089                     \textcolor{stringliteral}{"{}\_STA: \%04x, \_BDN: \%04x, \_UID: \%04x\(\backslash\)n"{}}, sc-\/>\mbox{\hyperlink{structacpi__dock__softc_aa3022457dbea076374eaa19c532e1359}{\_sta}},}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00090}00090                     sc-\/>\mbox{\hyperlink{structacpi__dock__softc_a7599363a1947e002244fe2561ab5c040}{\_bdn}}, sc-\/>\mbox{\hyperlink{structacpi__dock__softc_ae89aa5f5de1d73a3e6f61ce90dda6761}{\_uid}});}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00091}00091 \}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00092}00092 }
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00093}00093 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00094}\mbox{\hyperlink{acpi__dock_8c_abe8fd105ba3f567e37c065120fb8d1df}{00094}} \mbox{\hyperlink{acpi__dock_8c_abe8fd105ba3f567e37c065120fb8d1df}{acpi\_dock\_execute\_dck}}(device\_t \mbox{\hyperlink{acpi__bus__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}}, \textcolor{keywordtype}{int} dock)}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00095}00095 \{}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00096}00096         ACPI\_HANDLE     h;}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00097}00097         ACPI\_OBJECT     argobj;}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00098}00098         ACPI\_OBJECT\_LIST args;}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00099}00099         ACPI\_BUFFER     buf;}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00100}00100         ACPI\_OBJECT     retobj;}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00101}00101         ACPI\_STATUS     \mbox{\hyperlink{structacpi__dock__softc_aad9f1c3a1931ae5883054b57309a2696}{status}};}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00102}00102 }
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00103}00103         h = acpi\_get\_handle(\mbox{\hyperlink{acpi__bus__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}});}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00104}00104 }
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00105}00105         argobj.Type = ACPI\_TYPE\_INTEGER;}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00106}00106         argobj.Integer.Value = dock;}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00107}00107         args.Count = 1;}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00108}00108         args.Pointer = \&argobj;}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00109}00109         buf.Pointer = \&retobj;}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00110}00110         buf.Length = \textcolor{keyword}{sizeof}(retobj);}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00111}00111         \mbox{\hyperlink{structacpi__dock__softc_aad9f1c3a1931ae5883054b57309a2696}{status}} = AcpiEvaluateObject(h, \textcolor{stringliteral}{"{}\_DCK"{}}, \&args, \&buf);}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00112}00112 }
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00113}00113         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00114}00114 \textcolor{comment}{         * When \_DCK is called with 0, OSPM will ignore the return value.}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00115}00115 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00116}00116         \textcolor{keywordflow}{if} (dock == \mbox{\hyperlink{acpi__dock_8c_a277bd67e3b74d7846eb37f3e4aecef11}{ACPI\_DOCK\_ISOLATE}})}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00117}00117                 \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00118}00118 }
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00119}00119         \textcolor{comment}{/* If \_DCK returned 1, the request succeeded. */}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00120}00120         \textcolor{keywordflow}{if} (ACPI\_SUCCESS(\mbox{\hyperlink{structacpi__dock__softc_aad9f1c3a1931ae5883054b57309a2696}{status}}) \&\& retobj.Type == ACPI\_TYPE\_INTEGER \&\&}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00121}00121             retobj.Integer.Value == 1)}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00122}00122                 \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00123}00123 }
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00124}00124         \textcolor{keywordflow}{return} (-\/1);}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00125}00125 \}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00126}00126 }
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00127}00127 \textcolor{comment}{/* Lock devices while docked to prevent surprise removal. */}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00128}00128 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00129}\mbox{\hyperlink{acpi__dock_8c_a91355739936ca57104fb7eb8416e12a9}{00129}} \mbox{\hyperlink{acpi__dock_8c_a91355739936ca57104fb7eb8416e12a9}{acpi\_dock\_execute\_lck}}(device\_t \mbox{\hyperlink{acpi__bus__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}}, \textcolor{keywordtype}{int} lock)}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00130}00130 \{}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00131}00131         ACPI\_HANDLE     h;}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00132}00132 }
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00133}00133         h = acpi\_get\_handle(\mbox{\hyperlink{acpi__bus__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}});}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00134}00134         \mbox{\hyperlink{acpi_8c_a3f29954f0ad424198580784af8713922}{acpi\_SetInteger}}(h, \textcolor{stringliteral}{"{}\_LCK"{}}, lock);}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00135}00135 \}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00136}00136 }
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00137}00137 \textcolor{comment}{/* Eject a device (i.e., motorized). */}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00138}00138 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00139}\mbox{\hyperlink{acpi__dock_8c_a26e483e3dcfc911b91ac7da59a187ad0}{00139}} \mbox{\hyperlink{acpi__dock_8c_a26e483e3dcfc911b91ac7da59a187ad0}{acpi\_dock\_execute\_ejx}}(device\_t \mbox{\hyperlink{acpi__bus__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}}, \textcolor{keywordtype}{int} eject, \textcolor{keywordtype}{int} state)}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00140}00140 \{}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00141}00141         ACPI\_HANDLE     h;}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00142}00142         ACPI\_STATUS     \mbox{\hyperlink{structacpi__dock__softc_aad9f1c3a1931ae5883054b57309a2696}{status}};}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00143}00143         \textcolor{keywordtype}{char}            ejx[5];}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00144}00144 }
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00145}00145         h = acpi\_get\_handle(\mbox{\hyperlink{acpi__bus__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}});}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00146}00146         snprintf(ejx, \textcolor{keyword}{sizeof}(ejx), \textcolor{stringliteral}{"{}\_EJ\%d"{}}, state);}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00147}00147         \mbox{\hyperlink{structacpi__dock__softc_aad9f1c3a1931ae5883054b57309a2696}{status}} = \mbox{\hyperlink{acpi_8c_a3f29954f0ad424198580784af8713922}{acpi\_SetInteger}}(h, ejx, eject);}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00148}00148         \textcolor{keywordflow}{if} (ACPI\_SUCCESS(\mbox{\hyperlink{structacpi__dock__softc_aad9f1c3a1931ae5883054b57309a2696}{status}}))}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00149}00149                 \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00150}00150 }
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00151}00151         \textcolor{keywordflow}{return} (-\/1);}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00152}00152 \}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00153}00153 }
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00154}00154 \textcolor{comment}{/* Find dependent devices.  When their parent is removed, so are they. */}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00155}00155 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00156}\mbox{\hyperlink{acpi__dock_8c_a084e070139fc8ddb199ad5a9ae8ae9d5}{00156}} \mbox{\hyperlink{acpi__dock_8c_a084e070139fc8ddb199ad5a9ae8ae9d5}{acpi\_dock\_is\_ejd\_device}}(ACPI\_HANDLE dock\_handle, ACPI\_HANDLE handle)}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00157}00157 \{}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00158}00158         \textcolor{keywordtype}{int}             \mbox{\hyperlink{acpi__if_8m_a1db86e1959dba043cb76c92be76f53c2}{ret}};}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00159}00159         ACPI\_STATUS     ret\_status;}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00160}00160         ACPI\_BUFFER     ejd\_buffer;}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00161}00161         ACPI\_OBJECT     *obj;}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00162}00162 }
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00163}00163         \mbox{\hyperlink{acpi__if_8m_a1db86e1959dba043cb76c92be76f53c2}{ret}} = 0;}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00164}00164 }
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00165}00165         ejd\_buffer.Pointer = NULL;}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00166}00166         ejd\_buffer.Length = ACPI\_ALLOCATE\_BUFFER;}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00167}00167         ret\_status = AcpiEvaluateObject(handle, \textcolor{stringliteral}{"{}\_EJD"{}}, NULL, \&ejd\_buffer);}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00168}00168         \textcolor{keywordflow}{if} (ACPI\_FAILURE(ret\_status))}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00169}00169                 \textcolor{keywordflow}{goto} out;}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00170}00170 }
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00171}00171         obj = (ACPI\_OBJECT *)ejd\_buffer.Pointer;}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00172}00172         if (dock\_handle == \mbox{\hyperlink{acpi__package_8c_ac9f77e80847f67b0b4f13bde406b3470}{acpi\_GetReference}}(NULL, obj))}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00173}00173                 \mbox{\hyperlink{acpi__if_8m_a1db86e1959dba043cb76c92be76f53c2}{ret}} = 1;}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00174}00174 }
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00175}00175 out:}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00176}00176         \textcolor{keywordflow}{if} (ejd\_buffer.Pointer != NULL)}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00177}00177                 \mbox{\hyperlink{OsdMemory_8c_aa3baac772ec8f5df4a49d97e39bfb307}{AcpiOsFree}}(ejd\_buffer.Pointer);}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00178}00178 }
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00179}00179         \textcolor{keywordflow}{return} (\mbox{\hyperlink{acpi__if_8m_a1db86e1959dba043cb76c92be76f53c2}{ret}});}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00180}00180 \}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00181}00181 }
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00182}00182 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00183}00183 \textcolor{comment}{ * Docking functions}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00184}00184 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00185}00185 }
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00186}00186 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00187}\mbox{\hyperlink{acpi__dock_8c_ad03d7ff5fbb8e605697ca9b71b1e7bdc}{00187}} \mbox{\hyperlink{acpi__dock_8c_ad03d7ff5fbb8e605697ca9b71b1e7bdc}{acpi\_dock\_attach\_later}}(\textcolor{keywordtype}{void} *context)}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00188}00188 \{}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00189}00189         device\_t        \mbox{\hyperlink{acpi__bus__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}};}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00190}00190 }
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00191}00191         \mbox{\hyperlink{acpi__bus__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}} = (device\_t)context;}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00192}00192 }
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00193}00193         \textcolor{keywordflow}{if} (!device\_is\_enabled(\mbox{\hyperlink{acpi__bus__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}}))}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00194}00194                 device\_enable(\mbox{\hyperlink{acpi__bus__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}});}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00195}00195 }
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00196}00196         bus\_topo\_lock();}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00197}00197         device\_probe\_and\_attach(\mbox{\hyperlink{acpi__bus__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}});}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00198}00198         bus\_topo\_unlock();}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00199}00199 \}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00200}00200 }
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00201}00201 \textcolor{keyword}{static} ACPI\_STATUS}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00202}\mbox{\hyperlink{acpi__dock_8c_aad8c5196c0903f2f3f1080cbb0c4811f}{00202}} \mbox{\hyperlink{acpi__dock_8c_aad8c5196c0903f2f3f1080cbb0c4811f}{acpi\_dock\_insert\_child}}(ACPI\_HANDLE handle, UINT32 level, \textcolor{keywordtype}{void} *context,}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00203}00203     \textcolor{keywordtype}{void} **\mbox{\hyperlink{structacpi__dock__softc_aad9f1c3a1931ae5883054b57309a2696}{status}})}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00204}00204 \{}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00205}00205         device\_t        dock\_dev, \mbox{\hyperlink{acpi__bus__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}};}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00206}00206         ACPI\_HANDLE     dock\_handle;}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00207}00207 }
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00208}00208         dock\_dev = (device\_t)context;}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00209}00209         dock\_handle = acpi\_get\_handle(dock\_dev);}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00210}00210 }
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00211}00211         \textcolor{keywordflow}{if} (!\mbox{\hyperlink{acpi__dock_8c_a084e070139fc8ddb199ad5a9ae8ae9d5}{acpi\_dock\_is\_ejd\_device}}(dock\_handle, handle))}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00212}00212                 \textcolor{keywordflow}{goto} out;}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00213}00213 }
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00214}00214         \mbox{\hyperlink{acpivar_8h_abc8518069380334353a11c61577e5196}{ACPI\_VPRINT}}(dock\_dev, \mbox{\hyperlink{acpivar_8h_a089f3e499f9f37b4b702fa96a6bca97c}{acpi\_device\_get\_parent\_softc}}(dock\_dev),}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00215}00215                     \textcolor{stringliteral}{"{}inserting device for \%s\(\backslash\)n"{}}, \mbox{\hyperlink{acpi_8c_a06c3bc79994c8a4f6835c134dd3d50f2}{acpi\_name}}(handle));}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00216}00216 }
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00217}00217 \textcolor{preprocessor}{\#if 0}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00218}00218         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00219}00219 \textcolor{comment}{         * If the system boot up w/o Docking, the devices under the dock}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00220}00220 \textcolor{comment}{         * still un-\/initialized, also control methods such as \_INI, \_STA}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00221}00221 \textcolor{comment}{         * are not executed.}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00222}00222 \textcolor{comment}{         * Normal devices are initialized at booting by calling}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00223}00223 \textcolor{comment}{         * AcpiInitializeObjects(), however the devices under the dock}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00224}00224 \textcolor{comment}{         * need to be initialized here on the scheme of ACPICA.}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00225}00225 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00226}00226         ACPI\_INIT\_WALK\_INFO     Info;}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00227}00227 }
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00228}00228         AcpiNsWalkNamespace(ACPI\_TYPE\_ANY, handle,}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00229}00229             100, TRUE, AcpiNsInitOneDevice, NULL, \&Info, NULL);}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00230}00230 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00231}00231 }
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00232}00232         \mbox{\hyperlink{acpi__bus__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}} = \mbox{\hyperlink{acpivar_8h_a167b31c02c02b6e32b4183cdcafc5ddd}{acpi\_get\_device}}(handle);}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00233}00233         \textcolor{keywordflow}{if} (\mbox{\hyperlink{acpi__bus__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}} == NULL) \{}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00234}00234                 device\_printf(dock\_dev, \textcolor{stringliteral}{"{}error: \%s has no associated device\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00235}00235                     \mbox{\hyperlink{acpi_8c_a06c3bc79994c8a4f6835c134dd3d50f2}{acpi\_name}}(handle));}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00236}00236                 \textcolor{keywordflow}{goto} out;}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00237}00237         \}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00238}00238 }
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00239}00239         \mbox{\hyperlink{OsdSchedule_8c_aec8eed6c25c50029d4f24176fc4a0351}{AcpiOsExecute}}(OSL\_NOTIFY\_HANDLER, \mbox{\hyperlink{acpi__dock_8c_ad03d7ff5fbb8e605697ca9b71b1e7bdc}{acpi\_dock\_attach\_later}}, \mbox{\hyperlink{acpi__bus__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}});}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00240}00240 }
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00241}00241 out:}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00242}00242         \textcolor{keywordflow}{return} (AE\_OK);}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00243}00243 \}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00244}00244 }
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00245}00245 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00246}\mbox{\hyperlink{acpi__dock_8c_a59c2f3a5ffb89b0ca3e40c9feddbc36c}{00246}} \mbox{\hyperlink{acpi__dock_8c_a59c2f3a5ffb89b0ca3e40c9feddbc36c}{acpi\_dock\_insert\_children}}(device\_t \mbox{\hyperlink{acpi__bus__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}})}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00247}00247 \{}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00248}00248         ACPI\_STATUS     \mbox{\hyperlink{structacpi__dock__softc_aad9f1c3a1931ae5883054b57309a2696}{status}};}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00249}00249         ACPI\_HANDLE     sb\_handle;}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00250}00250 }
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00251}00251         \mbox{\hyperlink{structacpi__dock__softc_aad9f1c3a1931ae5883054b57309a2696}{status}} = AcpiGetHandle(ACPI\_ROOT\_OBJECT, \textcolor{stringliteral}{"{}\(\backslash\)\(\backslash\)\_SB\_"{}}, \&sb\_handle);}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00252}00252         \textcolor{keywordflow}{if} (ACPI\_SUCCESS(\mbox{\hyperlink{structacpi__dock__softc_aad9f1c3a1931ae5883054b57309a2696}{status}})) \{}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00253}00253                 AcpiWalkNamespace(ACPI\_TYPE\_DEVICE, sb\_handle,}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00254}00254                     100, \mbox{\hyperlink{acpi__dock_8c_aad8c5196c0903f2f3f1080cbb0c4811f}{acpi\_dock\_insert\_child}}, NULL, \mbox{\hyperlink{acpi__bus__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}}, NULL);}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00255}00255         \}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00256}00256 \}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00257}00257 }
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00258}00258 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00259}\mbox{\hyperlink{acpi__dock_8c_a319d49941568d1c5314510edca10416e}{00259}} \mbox{\hyperlink{acpi__dock_8c_a319d49941568d1c5314510edca10416e}{acpi\_dock\_insert}}(device\_t \mbox{\hyperlink{acpi__bus__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}})}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00260}00260 \{}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00261}00261         \textcolor{keyword}{struct }\mbox{\hyperlink{structacpi__dock__softc}{acpi\_dock\_softc}}   *sc;}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00262}00262         ACPI\_HANDLE             h;}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00263}00263 }
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00264}00264         \mbox{\hyperlink{acpivar_8h_a8a6addc23c5e197f365d26c2ca253b17}{ACPI\_SERIAL\_ASSERT}}(dock);}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00265}00265 }
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00266}00266         sc = device\_get\_softc(\mbox{\hyperlink{acpi__bus__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}});}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00267}00267         h = acpi\_get\_handle(\mbox{\hyperlink{acpi__bus__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}});}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00268}00268 }
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00269}00269         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structacpi__dock__softc_aad9f1c3a1931ae5883054b57309a2696}{status}} == \mbox{\hyperlink{acpi__dock_8c_a4e59f920d9b861b75ac91701c031155f}{ACPI\_DOCK\_STATUS\_UNDOCKED}} ||}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00270}00270             sc-\/>\mbox{\hyperlink{structacpi__dock__softc_aad9f1c3a1931ae5883054b57309a2696}{status}} == \mbox{\hyperlink{acpi__dock_8c_a1ee224bea521a0a46ca351e4f82993ca}{ACPI\_DOCK\_STATUS\_UNKNOWN}}) \{}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00271}00271                 \mbox{\hyperlink{acpi__dock_8c_a91355739936ca57104fb7eb8416e12a9}{acpi\_dock\_execute\_lck}}(\mbox{\hyperlink{acpi__bus__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}}, \mbox{\hyperlink{acpi__dock_8c_a2a0101220efb9c6b0fe164be0d9a9f57}{ACPI\_DOCK\_LOCK}});}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00272}00272                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{acpi__dock_8c_abe8fd105ba3f567e37c065120fb8d1df}{acpi\_dock\_execute\_dck}}(\mbox{\hyperlink{acpi__bus__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}}, \mbox{\hyperlink{acpi__dock_8c_ab666c0e6433aedfe9ce4a20246c378ff}{ACPI\_DOCK\_CONNECT}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00273}00273                         device\_printf(\mbox{\hyperlink{acpi__bus__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}}, \textcolor{stringliteral}{"{}\_DCK failed\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00274}00274                         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00275}00275                 \}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00276}00276 }
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00277}00277                 \textcolor{keywordflow}{if} (!cold) \{}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00278}00278                         \mbox{\hyperlink{acpi__dock_8c_a59c2f3a5ffb89b0ca3e40c9feddbc36c}{acpi\_dock\_insert\_children}}(\mbox{\hyperlink{acpi__bus__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}});}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00279}00279 }
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00280}00280                         \mbox{\hyperlink{acpi_8c_a618ff13b6ecf28dba4cee0829006de86}{acpi\_UserNotify}}(\textcolor{stringliteral}{"{}Dock"{}}, h, 1);}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00281}00281                 \}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00282}00282 }
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00283}00283                 sc-\/>\mbox{\hyperlink{structacpi__dock__softc_aad9f1c3a1931ae5883054b57309a2696}{status}} = \mbox{\hyperlink{acpi__dock_8c_a6c4f3f6d26d323d97b7ca8b2dc269dc5}{ACPI\_DOCK\_STATUS\_DOCKED}};}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00284}00284         \}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00285}00285 \}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00286}00286 }
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00287}00287 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00288}00288 \textcolor{comment}{ * Undock}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00289}00289 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00290}00290 }
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00291}00291 \textcolor{keyword}{static} ACPI\_STATUS}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00292}\mbox{\hyperlink{acpi__dock_8c_a5dce96e49aa42659233d9195b0bb8fd4}{00292}} \mbox{\hyperlink{acpi__dock_8c_a5dce96e49aa42659233d9195b0bb8fd4}{acpi\_dock\_eject\_child}}(ACPI\_HANDLE handle, UINT32 level, \textcolor{keywordtype}{void} *context,}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00293}00293     \textcolor{keywordtype}{void} **\mbox{\hyperlink{structacpi__dock__softc_aad9f1c3a1931ae5883054b57309a2696}{status}})}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00294}00294 \{}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00295}00295         device\_t        dock\_dev, \mbox{\hyperlink{acpi__bus__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}};}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00296}00296         ACPI\_HANDLE     dock\_handle;}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00297}00297 }
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00298}00298         dock\_dev = *(device\_t *)context;}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00299}00299         dock\_handle = acpi\_get\_handle(dock\_dev);}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00300}00300 }
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00301}00301         \textcolor{keywordflow}{if} (!\mbox{\hyperlink{acpi__dock_8c_a084e070139fc8ddb199ad5a9ae8ae9d5}{acpi\_dock\_is\_ejd\_device}}(dock\_handle, handle))}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00302}00302                 \textcolor{keywordflow}{goto} out;}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00303}00303 }
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00304}00304         \mbox{\hyperlink{acpivar_8h_abc8518069380334353a11c61577e5196}{ACPI\_VPRINT}}(dock\_dev, \mbox{\hyperlink{acpivar_8h_a089f3e499f9f37b4b702fa96a6bca97c}{acpi\_device\_get\_parent\_softc}}(dock\_dev),}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00305}00305             \textcolor{stringliteral}{"{}ejecting device for \%s\(\backslash\)n"{}}, \mbox{\hyperlink{acpi_8c_a06c3bc79994c8a4f6835c134dd3d50f2}{acpi\_name}}(handle));}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00306}00306 }
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00307}00307         \mbox{\hyperlink{acpi__bus__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}} = \mbox{\hyperlink{acpivar_8h_a167b31c02c02b6e32b4183cdcafc5ddd}{acpi\_get\_device}}(handle);}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00308}00308         \textcolor{keywordflow}{if} (\mbox{\hyperlink{acpi__bus__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}} != NULL \&\& device\_is\_attached(\mbox{\hyperlink{acpi__bus__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}})) \{}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00309}00309                 bus\_topo\_lock();}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00310}00310                 device\_detach(\mbox{\hyperlink{acpi__bus__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}});}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00311}00311                 bus\_topo\_unlock();}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00312}00312         \}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00313}00313 }
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00314}00314         \mbox{\hyperlink{acpi_8c_a3f29954f0ad424198580784af8713922}{acpi\_SetInteger}}(handle, \textcolor{stringliteral}{"{}\_EJ0"{}}, 0);}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00315}00315 out:}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00316}00316         \textcolor{keywordflow}{return} (AE\_OK);}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00317}00317 \}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00318}00318 }
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00319}00319 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00320}\mbox{\hyperlink{acpi__dock_8c_a2927a2d88b34eefbb0341be561d8ed44}{00320}} \mbox{\hyperlink{acpi__dock_8c_a2927a2d88b34eefbb0341be561d8ed44}{acpi\_dock\_eject\_children}}(device\_t \mbox{\hyperlink{acpi__bus__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}})}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00321}00321 \{}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00322}00322         ACPI\_HANDLE     sb\_handle;}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00323}00323         ACPI\_STATUS     \mbox{\hyperlink{structacpi__dock__softc_aad9f1c3a1931ae5883054b57309a2696}{status}};}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00324}00324 }
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00325}00325         \mbox{\hyperlink{structacpi__dock__softc_aad9f1c3a1931ae5883054b57309a2696}{status}} = AcpiGetHandle(ACPI\_ROOT\_OBJECT, \textcolor{stringliteral}{"{}\(\backslash\)\(\backslash\)\_SB\_"{}}, \&sb\_handle);}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00326}00326         \textcolor{keywordflow}{if} (ACPI\_SUCCESS(\mbox{\hyperlink{structacpi__dock__softc_aad9f1c3a1931ae5883054b57309a2696}{status}})) \{}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00327}00327                 AcpiWalkNamespace(ACPI\_TYPE\_DEVICE, sb\_handle,}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00328}00328                     100, \mbox{\hyperlink{acpi__dock_8c_a5dce96e49aa42659233d9195b0bb8fd4}{acpi\_dock\_eject\_child}}, NULL, \&\mbox{\hyperlink{acpi__bus__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}}, NULL);}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00329}00329         \}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00330}00330 \}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00331}00331 }
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00332}00332 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00333}\mbox{\hyperlink{acpi__dock_8c_a2c05d65954b24924e41fc97f93bd4bd9}{00333}} \mbox{\hyperlink{acpi__dock_8c_a2c05d65954b24924e41fc97f93bd4bd9}{acpi\_dock\_removal}}(device\_t \mbox{\hyperlink{acpi__bus__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}})}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00334}00334 \{}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00335}00335         \textcolor{keyword}{struct }\mbox{\hyperlink{structacpi__dock__softc}{acpi\_dock\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00336}00336         ACPI\_HANDLE             h;}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00337}00337 }
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00338}00338         \mbox{\hyperlink{acpivar_8h_a8a6addc23c5e197f365d26c2ca253b17}{ACPI\_SERIAL\_ASSERT}}(dock);}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00339}00339 }
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00340}00340         sc = device\_get\_softc(\mbox{\hyperlink{acpi__bus__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}});}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00341}00341         h = acpi\_get\_handle(\mbox{\hyperlink{acpi__bus__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}});}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00342}00342 }
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00343}00343         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structacpi__dock__softc_aad9f1c3a1931ae5883054b57309a2696}{status}} == \mbox{\hyperlink{acpi__dock_8c_a6c4f3f6d26d323d97b7ca8b2dc269dc5}{ACPI\_DOCK\_STATUS\_DOCKED}} ||}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00344}00344             sc-\/>\mbox{\hyperlink{structacpi__dock__softc_aad9f1c3a1931ae5883054b57309a2696}{status}} == \mbox{\hyperlink{acpi__dock_8c_a1ee224bea521a0a46ca351e4f82993ca}{ACPI\_DOCK\_STATUS\_UNKNOWN}}) \{}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00345}00345                 \mbox{\hyperlink{acpi__dock_8c_a2927a2d88b34eefbb0341be561d8ed44}{acpi\_dock\_eject\_children}}(\mbox{\hyperlink{acpi__bus__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}});}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00346}00346                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{acpi__dock_8c_abe8fd105ba3f567e37c065120fb8d1df}{acpi\_dock\_execute\_dck}}(\mbox{\hyperlink{acpi__bus__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}}, \mbox{\hyperlink{acpi__dock_8c_a277bd67e3b74d7846eb37f3e4aecef11}{ACPI\_DOCK\_ISOLATE}}) != 0)}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00347}00347                         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00348}00348 }
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00349}00349                 \mbox{\hyperlink{acpi__dock_8c_a91355739936ca57104fb7eb8416e12a9}{acpi\_dock\_execute\_lck}}(\mbox{\hyperlink{acpi__bus__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}}, \mbox{\hyperlink{acpi__dock_8c_af8ebe374e0135cfeaba4dbd71b549d79}{ACPI\_DOCK\_UNLOCK}});}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00350}00350 }
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00351}00351                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{acpi__dock_8c_a26e483e3dcfc911b91ac7da59a187ad0}{acpi\_dock\_execute\_ejx}}(\mbox{\hyperlink{acpi__bus__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}}, 1, 0) != 0) \{}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00352}00352                         device\_printf(\mbox{\hyperlink{acpi__bus__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}}, \textcolor{stringliteral}{"{}\_EJ0 failed\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00353}00353                         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00354}00354                 \}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00355}00355 }
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00356}00356                 \mbox{\hyperlink{acpi_8c_a618ff13b6ecf28dba4cee0829006de86}{acpi\_UserNotify}}(\textcolor{stringliteral}{"{}Dock"{}}, h, 0);}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00357}00357 }
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00358}00358                 sc-\/>\mbox{\hyperlink{structacpi__dock__softc_aad9f1c3a1931ae5883054b57309a2696}{status}} = \mbox{\hyperlink{acpi__dock_8c_a4e59f920d9b861b75ac91701c031155f}{ACPI\_DOCK\_STATUS\_UNDOCKED}};}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00359}00359         \}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00360}00360 }
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00361}00361         \mbox{\hyperlink{acpi__dock_8c_a97eed599a92e28a8e6f31fe01a81ab66}{acpi\_dock\_get\_info}}(\mbox{\hyperlink{acpi__bus__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}});}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00362}00362         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structacpi__dock__softc_aa3022457dbea076374eaa19c532e1359}{\_sta}} != 0)}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00363}00363                 device\_printf(\mbox{\hyperlink{acpi__bus__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}}, \textcolor{stringliteral}{"{}mechanical failure (\%\#x).\(\backslash\)n"{}}, sc-\/>\mbox{\hyperlink{structacpi__dock__softc_aa3022457dbea076374eaa19c532e1359}{\_sta}});}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00364}00364 \}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00365}00365 }
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00366}00366 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00367}00367 \textcolor{comment}{ * Device/Bus check}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00368}00368 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00369}00369 }
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00370}00370 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00371}\mbox{\hyperlink{acpi__dock_8c_a085d482c73acd4686ad77bcc8cadf866}{00371}} \mbox{\hyperlink{acpi__dock_8c_a085d482c73acd4686ad77bcc8cadf866}{acpi\_dock\_device\_check}}(device\_t \mbox{\hyperlink{acpi__bus__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}})}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00372}00372 \{}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00373}00373         \textcolor{keyword}{struct }\mbox{\hyperlink{structacpi__dock__softc}{acpi\_dock\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00374}00374 }
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00375}00375         \mbox{\hyperlink{acpivar_8h_a8a6addc23c5e197f365d26c2ca253b17}{ACPI\_SERIAL\_ASSERT}}(dock);}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00376}00376 }
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00377}00377         sc = device\_get\_softc(\mbox{\hyperlink{acpi__bus__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}});}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00378}00378         \mbox{\hyperlink{acpi__dock_8c_a97eed599a92e28a8e6f31fe01a81ab66}{acpi\_dock\_get\_info}}(\mbox{\hyperlink{acpi__bus__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}});}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00379}00379 }
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00380}00380         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00381}00381 \textcolor{comment}{         * If the \_STA method indicates 'present' and 'functioning', the}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00382}00382 \textcolor{comment}{         * system is docked.  If \_STA does not exist for this device, it}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00383}00383 \textcolor{comment}{         * is always present.}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00384}00384 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00385}00385         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structacpi__dock__softc_aa3022457dbea076374eaa19c532e1359}{\_sta}} == \mbox{\hyperlink{acpi__dock_8c_a1ee224bea521a0a46ca351e4f82993ca}{ACPI\_DOCK\_STATUS\_UNKNOWN}} ||}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00386}00386             \mbox{\hyperlink{acpivar_8h_a352b5e6aa680596c890dcd2bc08a168e}{ACPI\_DEVICE\_PRESENT}}(sc-\/>\mbox{\hyperlink{structacpi__dock__softc_aa3022457dbea076374eaa19c532e1359}{\_sta}}))}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00387}00387                 \mbox{\hyperlink{acpi__dock_8c_a319d49941568d1c5314510edca10416e}{acpi\_dock\_insert}}(\mbox{\hyperlink{acpi__bus__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}});}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00388}00388         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structacpi__dock__softc_aa3022457dbea076374eaa19c532e1359}{\_sta}} == 0)}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00389}00389                 \mbox{\hyperlink{acpi__dock_8c_a2c05d65954b24924e41fc97f93bd4bd9}{acpi\_dock\_removal}}(\mbox{\hyperlink{acpi__bus__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}});}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00390}00390 \}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00391}00391 }
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00392}00392 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00393}00393 \textcolor{comment}{ * Notify Handler}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00394}00394 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00395}00395 }
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00396}00396 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00397}\mbox{\hyperlink{acpi__dock_8c_a693830cf1f77ae9ac45affb51f07f673}{00397}} \mbox{\hyperlink{acpi__dock_8c_a693830cf1f77ae9ac45affb51f07f673}{acpi\_dock\_notify\_handler}}(ACPI\_HANDLE h, UINT32 notify, \textcolor{keywordtype}{void} *context)}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00398}00398 \{}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00399}00399         device\_t        \mbox{\hyperlink{acpi__bus__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}};}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00400}00400 }
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00401}00401         \mbox{\hyperlink{acpi__bus__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}} = (device\_t) context;}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00402}00402         \mbox{\hyperlink{acpivar_8h_abc8518069380334353a11c61577e5196}{ACPI\_VPRINT}}(\mbox{\hyperlink{acpi__bus__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}}, \mbox{\hyperlink{acpivar_8h_a089f3e499f9f37b4b702fa96a6bca97c}{acpi\_device\_get\_parent\_softc}}(\mbox{\hyperlink{acpi__bus__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}}),}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00403}00403                     \textcolor{stringliteral}{"{}got notification \%\#x\(\backslash\)n"{}}, notify);}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00404}00404 }
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00405}00405         \mbox{\hyperlink{acpivar_8h_a9e2d4d8ab6769579f7ad5fc57e58692c}{ACPI\_SERIAL\_BEGIN}}(dock);}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00406}00406         \textcolor{keywordflow}{switch} (notify) \{}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00407}00407         \textcolor{keywordflow}{case} ACPI\_NOTIFY\_BUS\_CHECK:}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00408}00408         \textcolor{keywordflow}{case} ACPI\_NOTIFY\_DEVICE\_CHECK:}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00409}00409                 \mbox{\hyperlink{acpi__dock_8c_a085d482c73acd4686ad77bcc8cadf866}{acpi\_dock\_device\_check}}(\mbox{\hyperlink{acpi__bus__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}});}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00410}00410                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00411}00411         \textcolor{keywordflow}{case} ACPI\_NOTIFY\_EJECT\_REQUEST:}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00412}00412                 \mbox{\hyperlink{acpi__dock_8c_a2c05d65954b24924e41fc97f93bd4bd9}{acpi\_dock\_removal}}(\mbox{\hyperlink{acpi__bus__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}});}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00413}00413                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00414}00414         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00415}00415                 device\_printf(\mbox{\hyperlink{acpi__bus__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}}, \textcolor{stringliteral}{"{}unknown notify \%\#x\(\backslash\)n"{}}, notify);}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00416}00416                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00417}00417         \}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00418}00418         \mbox{\hyperlink{acpivar_8h_aa1f610624b7c6dde01ed069c71cb791b}{ACPI\_SERIAL\_END}}(dock);}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00419}00419 \}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00420}00420 }
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00421}00421 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00422}\mbox{\hyperlink{acpi__dock_8c_af6cf672735a5a2209d2762dfc8edf07f}{00422}} \mbox{\hyperlink{acpi__dock_8c_af6cf672735a5a2209d2762dfc8edf07f}{acpi\_dock\_status\_sysctl}}(SYSCTL\_HANDLER\_ARGS)}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00423}00423 \{}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00424}00424         \textcolor{keyword}{struct }\mbox{\hyperlink{structacpi__dock__softc}{acpi\_dock\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00425}00425         device\_t        \mbox{\hyperlink{acpi__bus__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}};}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00426}00426         \textcolor{keywordtype}{int}             \mbox{\hyperlink{structacpi__dock__softc_aad9f1c3a1931ae5883054b57309a2696}{status}}, err;}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00427}00427 }
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00428}00428         \mbox{\hyperlink{acpi__bus__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}} = (device\_t)arg1;}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00429}00429 }
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00430}00430         sc = device\_get\_softc(\mbox{\hyperlink{acpi__bus__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}});}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00431}00431         \mbox{\hyperlink{structacpi__dock__softc_aad9f1c3a1931ae5883054b57309a2696}{status}} = sc-\/>\mbox{\hyperlink{structacpi__dock__softc_aad9f1c3a1931ae5883054b57309a2696}{status}};}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00432}00432 }
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00433}00433         \mbox{\hyperlink{acpivar_8h_a9e2d4d8ab6769579f7ad5fc57e58692c}{ACPI\_SERIAL\_BEGIN}}(dock);}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00434}00434         err = sysctl\_handle\_int(oidp, \&\mbox{\hyperlink{structacpi__dock__softc_aad9f1c3a1931ae5883054b57309a2696}{status}}, 0, req);}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00435}00435         \textcolor{keywordflow}{if} (err != 0 || req-\/>newptr == NULL)}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00436}00436                 \textcolor{keywordflow}{goto} out;}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00437}00437 }
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00438}00438         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structacpi__dock__softc_aad9f1c3a1931ae5883054b57309a2696}{status}} != \mbox{\hyperlink{acpi__dock_8c_a4e59f920d9b861b75ac91701c031155f}{ACPI\_DOCK\_STATUS\_UNDOCKED}} \&\&}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00439}00439             \mbox{\hyperlink{structacpi__dock__softc_aad9f1c3a1931ae5883054b57309a2696}{status}} != \mbox{\hyperlink{acpi__dock_8c_a6c4f3f6d26d323d97b7ca8b2dc269dc5}{ACPI\_DOCK\_STATUS\_DOCKED}}) \{}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00440}00440                 err = EINVAL;}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00441}00441                 \textcolor{keywordflow}{goto} out;}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00442}00442         \}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00443}00443 }
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00444}00444         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structacpi__dock__softc_aad9f1c3a1931ae5883054b57309a2696}{status}} == sc-\/>\mbox{\hyperlink{structacpi__dock__softc_aad9f1c3a1931ae5883054b57309a2696}{status}})}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00445}00445                 \textcolor{keywordflow}{goto} out;}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00446}00446 }
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00447}00447         \textcolor{keywordflow}{switch} (\mbox{\hyperlink{structacpi__dock__softc_aad9f1c3a1931ae5883054b57309a2696}{status}}) \{}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00448}00448         \textcolor{keywordflow}{case} \mbox{\hyperlink{acpi__dock_8c_a4e59f920d9b861b75ac91701c031155f}{ACPI\_DOCK\_STATUS\_UNDOCKED}}:}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00449}00449                 \mbox{\hyperlink{acpi__dock_8c_a2c05d65954b24924e41fc97f93bd4bd9}{acpi\_dock\_removal}}(\mbox{\hyperlink{acpi__bus__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}});}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00450}00450                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00451}00451         \textcolor{keywordflow}{case} \mbox{\hyperlink{acpi__dock_8c_a6c4f3f6d26d323d97b7ca8b2dc269dc5}{ACPI\_DOCK\_STATUS\_DOCKED}}:}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00452}00452                 \mbox{\hyperlink{acpi__dock_8c_a085d482c73acd4686ad77bcc8cadf866}{acpi\_dock\_device\_check}}(\mbox{\hyperlink{acpi__bus__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}});}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00453}00453                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00454}00454         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00455}00455                 err = EINVAL;}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00456}00456                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00457}00457         \}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00458}00458 out:}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00459}00459         \mbox{\hyperlink{acpivar_8h_aa1f610624b7c6dde01ed069c71cb791b}{ACPI\_SERIAL\_END}}(dock);}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00460}00460         \textcolor{keywordflow}{return} (err);}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00461}00461 \}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00462}00462 }
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00463}00463 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00464}\mbox{\hyperlink{acpi__dock_8c_acdb9ae229093882c953af8c52440dfb1}{00464}} \mbox{\hyperlink{acpi__dock_8c_acdb9ae229093882c953af8c52440dfb1}{acpi\_dock\_probe}}(device\_t \mbox{\hyperlink{acpi__bus__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}})}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00465}00465 \{}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00466}00466         ACPI\_HANDLE     h, tmp;}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00467}00467 }
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00468}00468         h = acpi\_get\_handle(\mbox{\hyperlink{acpi__bus__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}});}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00469}00469         \textcolor{keywordflow}{if} (\mbox{\hyperlink{acpi_8c_a1713faa3d6beef1dd28bdb59dd901f30}{acpi\_disabled}}(\textcolor{stringliteral}{"{}dock"{}}) ||}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00470}00470             ACPI\_FAILURE(AcpiGetHandle(h, \textcolor{stringliteral}{"{}\_DCK"{}}, \&tmp)))}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00471}00471                 \textcolor{keywordflow}{return} (ENXIO);}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00472}00472 }
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00473}00473         device\_set\_desc(\mbox{\hyperlink{acpi__bus__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}}, \textcolor{stringliteral}{"{}ACPI Docking Station"{}});}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00474}00474 }
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00475}00475         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00476}00476 \textcolor{comment}{         * XXX Somewhere else in the kernel panics on "{}sysctl kern"{} if we}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00477}00477 \textcolor{comment}{         * return a negative value here (reprobe ok).}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00478}00478 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00479}00479         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00480}00480 \}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00481}00481 }
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00482}00482 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00483}\mbox{\hyperlink{acpi__dock_8c_a9ec64ce03a6e76bb89a47e34596bccd1}{00483}} \mbox{\hyperlink{acpi__dock_8c_a9ec64ce03a6e76bb89a47e34596bccd1}{acpi\_dock\_attach}}(device\_t \mbox{\hyperlink{acpi__bus__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}})}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00484}00484 \{}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00485}00485         \textcolor{keyword}{struct }\mbox{\hyperlink{structacpi__dock__softc}{acpi\_dock\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00486}00486         ACPI\_HANDLE     h;}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00487}00487 }
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00488}00488         sc = device\_get\_softc(\mbox{\hyperlink{acpi__bus__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}});}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00489}00489         h = acpi\_get\_handle(\mbox{\hyperlink{acpi__bus__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}});}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00490}00490         \textcolor{keywordflow}{if} (sc == NULL || h == NULL)}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00491}00491                 \textcolor{keywordflow}{return} (ENXIO);}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00492}00492 }
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00493}00493         sc-\/>\mbox{\hyperlink{structacpi__dock__softc_aad9f1c3a1931ae5883054b57309a2696}{status}} = \mbox{\hyperlink{acpi__dock_8c_a1ee224bea521a0a46ca351e4f82993ca}{ACPI\_DOCK\_STATUS\_UNKNOWN}};}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00494}00494 }
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00495}00495         AcpiEvaluateObject(h, \textcolor{stringliteral}{"{}\_INI"{}}, NULL, NULL);}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00496}00496 }
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00497}00497         \mbox{\hyperlink{acpivar_8h_a9e2d4d8ab6769579f7ad5fc57e58692c}{ACPI\_SERIAL\_BEGIN}}(dock);}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00498}00498 }
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00499}00499         \mbox{\hyperlink{acpi__dock_8c_a085d482c73acd4686ad77bcc8cadf866}{acpi\_dock\_device\_check}}(\mbox{\hyperlink{acpi__bus__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}});}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00500}00500 }
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00501}00501         \textcolor{comment}{/* Get the sysctl tree */}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00502}00502         sc-\/>\mbox{\hyperlink{structacpi__dock__softc_a566085343ef1ca582d39e979f112120e}{sysctl\_ctx}} = device\_get\_sysctl\_ctx(\mbox{\hyperlink{acpi__bus__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}});}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00503}00503         sc-\/>\mbox{\hyperlink{structacpi__dock__softc_a615e1cb6351a9aa2b3e48f6e2427fdb7}{sysctl\_tree}} = device\_get\_sysctl\_tree(\mbox{\hyperlink{acpi__bus__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}});}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00504}00504 }
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00505}00505         SYSCTL\_ADD\_INT(sc-\/>\mbox{\hyperlink{structacpi__dock__softc_a566085343ef1ca582d39e979f112120e}{sysctl\_ctx}},}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00506}00506                 SYSCTL\_CHILDREN(sc-\/>\mbox{\hyperlink{structacpi__dock__softc_a615e1cb6351a9aa2b3e48f6e2427fdb7}{sysctl\_tree}}),}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00507}00507                 OID\_AUTO, \textcolor{stringliteral}{"{}\_sta"{}}, CTLFLAG\_RD,}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00508}00508                 \&sc-\/>\mbox{\hyperlink{structacpi__dock__softc_aa3022457dbea076374eaa19c532e1359}{\_sta}}, 0, \textcolor{stringliteral}{"{}Dock \_STA"{}});}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00509}00509         SYSCTL\_ADD\_INT(sc-\/>\mbox{\hyperlink{structacpi__dock__softc_a566085343ef1ca582d39e979f112120e}{sysctl\_ctx}},}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00510}00510                 SYSCTL\_CHILDREN(sc-\/>\mbox{\hyperlink{structacpi__dock__softc_a615e1cb6351a9aa2b3e48f6e2427fdb7}{sysctl\_tree}}),}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00511}00511                 OID\_AUTO, \textcolor{stringliteral}{"{}\_bdn"{}}, CTLFLAG\_RD,}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00512}00512                 \&sc-\/>\mbox{\hyperlink{structacpi__dock__softc_a7599363a1947e002244fe2561ab5c040}{\_bdn}}, 0, \textcolor{stringliteral}{"{}Dock \_BDN"{}});}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00513}00513         SYSCTL\_ADD\_INT(sc-\/>\mbox{\hyperlink{structacpi__dock__softc_a566085343ef1ca582d39e979f112120e}{sysctl\_ctx}},}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00514}00514                 SYSCTL\_CHILDREN(sc-\/>\mbox{\hyperlink{structacpi__dock__softc_a615e1cb6351a9aa2b3e48f6e2427fdb7}{sysctl\_tree}}),}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00515}00515                 OID\_AUTO, \textcolor{stringliteral}{"{}\_uid"{}}, CTLFLAG\_RD,}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00516}00516                 \&sc-\/>\mbox{\hyperlink{structacpi__dock__softc_ae89aa5f5de1d73a3e6f61ce90dda6761}{\_uid}}, 0, \textcolor{stringliteral}{"{}Dock \_UID"{}});}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00517}00517         SYSCTL\_ADD\_PROC(sc-\/>\mbox{\hyperlink{structacpi__dock__softc_a566085343ef1ca582d39e979f112120e}{sysctl\_ctx}},}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00518}00518                 SYSCTL\_CHILDREN(sc-\/>\mbox{\hyperlink{structacpi__dock__softc_a615e1cb6351a9aa2b3e48f6e2427fdb7}{sysctl\_tree}}),}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00519}00519                 OID\_AUTO, \textcolor{stringliteral}{"{}status"{}},}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00520}00520                 CTLTYPE\_INT | CTLFLAG\_RW | CTLFLAG\_MPSAFE, \mbox{\hyperlink{acpi__bus__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}}, 0,}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00521}00521                 \mbox{\hyperlink{acpi__dock_8c_af6cf672735a5a2209d2762dfc8edf07f}{acpi\_dock\_status\_sysctl}}, \textcolor{stringliteral}{"{}I"{}},}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00522}00522                 \textcolor{stringliteral}{"{}Dock/Undock operation"{}});}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00523}00523 }
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00524}00524         \mbox{\hyperlink{acpivar_8h_aa1f610624b7c6dde01ed069c71cb791b}{ACPI\_SERIAL\_END}}(dock);}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00525}00525 }
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00526}00526         AcpiInstallNotifyHandler(h, ACPI\_ALL\_NOTIFY,}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00527}00527                                  \mbox{\hyperlink{acpi__dock_8c_a693830cf1f77ae9ac45affb51f07f673}{acpi\_dock\_notify\_handler}}, \mbox{\hyperlink{acpi__bus__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}});}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00528}00528 }
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00529}00529         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00530}00530 \}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00531}00531 }
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00532}\mbox{\hyperlink{acpi__dock_8c_a5031a899507f66ab2b61a3a0a6d900b7}{00532}} \textcolor{keyword}{static} device\_method\_t \mbox{\hyperlink{acpi__dock_8c_a5031a899507f66ab2b61a3a0a6d900b7}{acpi\_dock\_methods}}[] = \{}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00533}00533         \textcolor{comment}{/* Device interface */}}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00534}00534         DEVMETHOD(device\_probe, \mbox{\hyperlink{acpi__dock_8c_acdb9ae229093882c953af8c52440dfb1}{acpi\_dock\_probe}}),}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00535}00535         DEVMETHOD(device\_attach, \mbox{\hyperlink{acpi__dock_8c_a9ec64ce03a6e76bb89a47e34596bccd1}{acpi\_dock\_attach}}),}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00536}00536 }
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00537}00537         DEVMETHOD\_END}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00538}00538 \};}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00539}00539 }
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00540}\mbox{\hyperlink{acpi__dock_8c_a90096d2c3a10aac77e9c7b86e0dc6f12}{00540}} \textcolor{keyword}{static} driver\_t \mbox{\hyperlink{acpi__dock_8c_a90096d2c3a10aac77e9c7b86e0dc6f12}{acpi\_dock\_driver}} = \{}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00541}00541         \textcolor{stringliteral}{"{}acpi\_dock"{}},}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00542}00542         \mbox{\hyperlink{acpi__dock_8c_a5031a899507f66ab2b61a3a0a6d900b7}{acpi\_dock\_methods}},}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00543}00543         \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structacpi__dock__softc}{acpi\_dock\_softc}}),}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00544}00544 \};}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00545}00545 }
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00546}\mbox{\hyperlink{acpi__dock_8c_a2db9e12963cc2b2647837d4bac6d2583}{00546}} \textcolor{keyword}{static} devclass\_t \mbox{\hyperlink{acpi__dock_8c_a2db9e12963cc2b2647837d4bac6d2583}{acpi\_dock\_devclass}};}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00547}00547 }
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00548}\mbox{\hyperlink{acpi__dock_8c_a1d16b3a420afed7f85b85ae74a9c13ca}{00548}} \mbox{\hyperlink{acpi__dock_8c_a1d16b3a420afed7f85b85ae74a9c13ca}{DRIVER\_MODULE}}(acpi\_dock, \mbox{\hyperlink{acpi__if_8m_a5d0db714ee9e465e6cab2260587a6062}{acpi}}, \mbox{\hyperlink{acpi__dock_8c_a90096d2c3a10aac77e9c7b86e0dc6f12}{acpi\_dock\_driver}}, \mbox{\hyperlink{acpi__dock_8c_a2db9e12963cc2b2647837d4bac6d2583}{acpi\_dock\_devclass}}, 0, 0);}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00549}\mbox{\hyperlink{acpi__dock_8c_a0a47c84f2464596830c43717f7dd3ef8}{00549}} \mbox{\hyperlink{acpi__dock_8c_a0a47c84f2464596830c43717f7dd3ef8}{MODULE\_DEPEND}}(acpi\_dock, \mbox{\hyperlink{acpi__if_8m_a5d0db714ee9e465e6cab2260587a6062}{acpi}}, 1, 1, 1);}
\DoxyCodeLine{\Hypertarget{acpi__dock_8c_source_l00550}\mbox{\hyperlink{acpi__dock_8c_a581fa6a12dbd09b26e8a89d9e536fb47}{00550}} \mbox{\hyperlink{acpi__dock_8c_a581fa6a12dbd09b26e8a89d9e536fb47}{ACPI\_PNP\_INFO}}(\mbox{\hyperlink{acpi__dock_8c_a6eab5b84fde0d5a438a3bd57abf3761a}{acpi\_dock\_pnp\_ids}});}

\end{DoxyCode}
