1950a6087SEmmanuel Vadot#- 2950a6087SEmmanuel Vadot# Copyright 2018 Michal Meloun <mmel@FreeBSD.org> 3950a6087SEmmanuel Vadot# All rights reserved. 4950a6087SEmmanuel Vadot# 5950a6087SEmmanuel Vadot# Redistribution and use in source and binary forms, with or without 6950a6087SEmmanuel Vadot# modification, are permitted provided that the following conditions 7950a6087SEmmanuel Vadot# are met: 8950a6087SEmmanuel Vadot# 1. Redistributions of source code must retain the above copyright 9950a6087SEmmanuel Vadot# notice, this list of conditions and the following disclaimer. 10950a6087SEmmanuel Vadot# 2. Redistributions in binary form must reproduce the above copyright 11950a6087SEmmanuel Vadot# notice, this list of conditions and the following disclaimer in the 12950a6087SEmmanuel Vadot# documentation and/or other materials provided with the distribution. 13950a6087SEmmanuel Vadot# 14950a6087SEmmanuel Vadot# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 15950a6087SEmmanuel Vadot# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16950a6087SEmmanuel Vadot# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17950a6087SEmmanuel Vadot# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 18950a6087SEmmanuel Vadot# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19950a6087SEmmanuel Vadot# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20950a6087SEmmanuel Vadot# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21950a6087SEmmanuel Vadot# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22950a6087SEmmanuel Vadot# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23950a6087SEmmanuel Vadot# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24950a6087SEmmanuel Vadot# SUCH DAMAGE. 25950a6087SEmmanuel Vadot# 26950a6087SEmmanuel Vadot# 27950a6087SEmmanuel Vadot 28950a6087SEmmanuel VadotINTERFACE phynode_usb; 29950a6087SEmmanuel Vadot 30950a6087SEmmanuel VadotHEADER { 31950a6087SEmmanuel Vadot struct phynode; 32950a6087SEmmanuel Vadot} 33950a6087SEmmanuel Vadot 34950a6087SEmmanuel Vadot# 35950a6087SEmmanuel Vadot# Set USB mode for phy 36950a6087SEmmanuel Vadot# Returns 0 on success or a standard errno value. 37950a6087SEmmanuel Vadot# 38950a6087SEmmanuel VadotMETHOD int set_mode { 39950a6087SEmmanuel Vadot struct phynode *phynode; 40950a6087SEmmanuel Vadot int usb_mode; /* PHY_USB_MODE_* */ 41950a6087SEmmanuel Vadot}; 42950a6087SEmmanuel Vadot 43950a6087SEmmanuel Vadot# 44950a6087SEmmanuel Vadot# Get USB mode 45950a6087SEmmanuel Vadot# Returns 0 on success or a standard errno value. 46950a6087SEmmanuel Vadot# 47950a6087SEmmanuel VadotMETHOD int get_mode { 48950a6087SEmmanuel Vadot struct phynode *phynode; 49950a6087SEmmanuel Vadot int *usb_mode; /* PHY_USB_MODE_* */ 50950a6087SEmmanuel Vadot}; 51