Changeset View
Changeset View
Standalone View
Standalone View
head/share/man/man4/gpio.4
Show All 18 Lines | |||||
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||||
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||||
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | .\" 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 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||||
.\" SUCH DAMAGE. | .\" SUCH DAMAGE. | ||||
.\" | .\" | ||||
.\" $FreeBSD$ | .\" $FreeBSD$ | ||||
.\" | .\" | ||||
.Dd June 26, 2019 | .Dd June 27, 2019 | ||||
.Dt GPIO 4 | .Dt GPIO 4 | ||||
.Os | .Os | ||||
.Sh NAME | .Sh NAME | ||||
.Nm gpiobus | .Nm gpiobus | ||||
.Nd GPIO bus system | .Nd GPIO bus system | ||||
.Sh SYNOPSIS | .Sh SYNOPSIS | ||||
To compile these devices into your kernel and use the device hints, place the | To compile these devices into your kernel and use the device hints, place the | ||||
following lines in your kernel configuration file: | following lines in your kernel configuration file: | ||||
▲ Show 20 Lines • Show All 68 Lines • ▼ Show 20 Lines | |||||
DTS blob to the kernel at boot. | DTS blob to the kernel at boot. | ||||
.Pp | .Pp | ||||
On a | On a | ||||
.Xr device.hints 5 | .Xr device.hints 5 | ||||
based system these hints can be used to configure drivers for devices | based system these hints can be used to configure drivers for devices | ||||
attached to | attached to | ||||
.Nm | .Nm | ||||
pins: | pins: | ||||
.Bl -tag -width ".Va hint.driver.unit.pins" | .Bl -tag -width ".Va hint.driver.unit.pin_list" | ||||
.It Va hint.driver.unit.at | .It Va hint.driver.unit.at | ||||
The | The | ||||
.Nm gpiobus | .Nm gpiobus | ||||
where the device is attached. | where the device is attached. | ||||
For example, | For example, | ||||
.Qq gpiobus0 . | .Qq gpiobus0 . | ||||
.Ar driver | .Ar driver | ||||
and | and | ||||
.Ar unit | .Ar unit | ||||
are the driver name and the unit number for the device driver. | are the driver name and the unit number for the device driver. | ||||
.It Va hint.driver.unit.pins | .It Va hint.driver.unit.pins | ||||
This is a bitmask of the pins on the | This is a bitmask of the pins on the | ||||
.Nm gpiobus | .Nm gpiobus | ||||
that are connected to the device. | that are connected to the device. | ||||
The pins will be allocated to the specified driver instance. | The pins will be allocated to the specified driver instance. | ||||
Only pins with numbers from 0 to 31 can be specified using this hint. | |||||
.It Va hint.driver.unit.pin_list | |||||
This is a list of pin numbers of pins on the | |||||
.Nm gpiobus | |||||
that are connected to the device. | |||||
The pins will be allocated to the specified driver instance. | |||||
This is a more user friendly alternative to the | |||||
.Ar pins | |||||
hint. | |||||
Additionally, this hint allows specifying pin numbers greater than 31. | |||||
The numbers can be decimal or hexadecimal with 0x prefix. | |||||
Any non-digit character can be used as a separator. | |||||
For example, it can be a comma, a slash or a space. | |||||
The separator can be followed by any number of space characters. | |||||
.El | .El | ||||
.Pp | .Pp | ||||
The following | The following | ||||
.Xr device.hints 5 | .Xr device.hints 5 | ||||
are only provided by the | are only provided by the | ||||
.Cd ar71xx_gpio | .Cd ar71xx_gpio | ||||
driver: | driver: | ||||
.Bl -tag -width ".Va hint.gpio.function_clear" | .Bl -tag -width ".Va hint.gpio.function_clear" | ||||
Show All 35 Lines |