xref: /freebsd/lib/libdevctl/devctl.h (revision 9cdd5c07ad924249d620437d00458c3b6434dbe5)
164de8019SJohn Baldwin /*-
264de8019SJohn Baldwin  * Copyright (c) 2014 John Baldwin <jhb@FreeBSD.org>
364de8019SJohn Baldwin  *
464de8019SJohn Baldwin  * Redistribution and use in source and binary forms, with or without
564de8019SJohn Baldwin  * modification, are permitted provided that the following conditions
664de8019SJohn Baldwin  * are met:
764de8019SJohn Baldwin  * 1. Redistributions of source code must retain the above copyright
864de8019SJohn Baldwin  *    notice, this list of conditions and the following disclaimer.
964de8019SJohn Baldwin  * 2. Redistributions in binary form must reproduce the above copyright
1064de8019SJohn Baldwin  *    notice, this list of conditions and the following disclaimer in the
1164de8019SJohn Baldwin  *    documentation and/or other materials provided with the distribution.
1264de8019SJohn Baldwin  *
1364de8019SJohn Baldwin  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
1464de8019SJohn Baldwin  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1564de8019SJohn Baldwin  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1664de8019SJohn Baldwin  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
1764de8019SJohn Baldwin  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1864de8019SJohn Baldwin  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
1964de8019SJohn Baldwin  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2064de8019SJohn Baldwin  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2164de8019SJohn Baldwin  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2264de8019SJohn Baldwin  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2364de8019SJohn Baldwin  * SUCH DAMAGE.
2464de8019SJohn Baldwin  *
2564de8019SJohn Baldwin  * $FreeBSD$
2664de8019SJohn Baldwin  */
2764de8019SJohn Baldwin 
2864de8019SJohn Baldwin #ifndef __DEVCTL_H__
2964de8019SJohn Baldwin #define	__DEVCTL_H__
3064de8019SJohn Baldwin 
3164de8019SJohn Baldwin #include <stdbool.h>
3264de8019SJohn Baldwin 
33*9cdd5c07SKonstantin Belousov __BEGIN_DECLS
3464de8019SJohn Baldwin int	devctl_attach(const char *device);
3564de8019SJohn Baldwin int	devctl_detach(const char *device, bool force);
3664de8019SJohn Baldwin int	devctl_enable(const char *device);
3764de8019SJohn Baldwin int	devctl_disable(const char *device, bool force_detach);
3864de8019SJohn Baldwin int	devctl_suspend(const char *device);
3964de8019SJohn Baldwin int	devctl_resume(const char *device);
4064de8019SJohn Baldwin int	devctl_set_driver(const char *device, const char *driver, bool force);
41e05ec081SJohn Baldwin int	devctl_clear_driver(const char *device, bool force);
42a907c691SJohn Baldwin int	devctl_rescan(const char *device);
4388eb5c50SJohn Baldwin int	devctl_delete(const char *device, bool force);
445fa29797SWarner Losh int	devctl_freeze(void);
455fa29797SWarner Losh int	devctl_thaw(void);
46*9cdd5c07SKonstantin Belousov __END_DECLS
4764de8019SJohn Baldwin 
4864de8019SJohn Baldwin #endif /* !__DEVCTL_H__ */
49