Index: share/man/man9/PCI_PNP_INFO.9 =================================================================== --- /dev/null +++ share/man/man9/PCI_PNP_INFO.9 @@ -0,0 +1,84 @@ +.\" Copyright (c) 2018 Lakhan Shiva Kamireddy +.\" Sponsored by: Google, Inc. (GSoC 2018) +.\" Mentors: Warner Losh, Chuck Tuffli +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd August 06, 2018 +.Dt PCI_PNP_INFO 9 +.Os +.Sh NAME +.Nm PCI_PNP_INFO +.Nd register plug and play information for PCI device matching +.\" +.Sh SYNOPSIS +.In dev/pci/pcivar.h +.Fo PCI_PNP_INFO +.Fa "pci_device_table *table" +.Fc +.\" +.Sh DESCRIPTION +The +.Fn PCI_PNP_INFO +macro registers a +.Fa table +of type pci_device_table which has device-identifying data for use by +.Xr devmatch 8 . +Since it is built off module marking macros, it must follow a +.Xr DRIVER_MODULE 9 +line. +.Pp +The macro takes a +.Fa table +parameter that points to the device matching data with entries matching the structure +.Fa pci_device_table . +.\" +.Sh EXAMPLES +.Bd -literal -offset indent -compact +#include +#include +struct pci_device_table my_ids[] = { + { PCI_DEVID(0x12345678), PCI_DESCR("Foo bar") }, + { PCI_DEVID(0x9abcdef0), PCI_DESCR("Baz fizz") }, +}; + +PCI_PNP_INFO(my_ids); +.Ed +.\" +.Sh SEE ALSO +.Xr module 9 , +.Xr DRIVER_MODULE 9 , +.Xr MODULE_PNP_INFO 9 , +.Xr devmatch 8 +.Sh HISTORY +The macro +.Nm +appeared in +.Fx 12.0 . +.Sh AUTHORS +The PNP framework and +.Xr devmatch 8 +utility were written by +.An Warner Losh Aq Mt imp@FreeBSD.org .