1.\" $NetBSD: gpiolock.4,v 1.6 2014/03/18 18:20:39 riastradh Exp $ 2.\" 3.\" Copyright (c) 2009 Marc Balmer <marc@msys.ch> 4.\" 5.\" Permission to use, copy, modify, and distribute this software for any 6.\" purpose with or without fee is hereby granted, provided that the above 7.\" copyright notice and this permission notice appear in all copies. 8.\" 9.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 15.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16.\" 17.Dd August 21, 2009 18.Dt GPIOLOCK 4 19.Os 20.Sh NAME 21.Nm gpiolock 22.Nd support for multi-position keylocks attached to GPIO pins 23.Sh SYNOPSIS 24.Cd "gpiolock* at gpio? offset ? mask ?" 25.Cd "gpiolock* at gpio?" 26.Sh DESCRIPTION 27The 28.Nm 29driver allows connecting of multi-position keylocks over GPIO pins. 30The keylock driver registers with an in-kernel keylock supporting system 31and provides 32.Xr kauth 9 33support through an experimental security model. 34The keylock state can be queried using the hw.keylock sysctl variables. 35Only locks with 2-4 positions are currently supported. 36The pin number is specified in the kernel configuration with the 37.Ar offset 38locator. 39The 40.Ar mask 41locator denotes the pins used for the lock (minimum 2, maximum 4 pins are used). 42The 43.Ar offset 44and 45.Ar mask 46can also be specified when 47.Nm 48is attached at runtime using the 49.Dv GPIOATTACH 50.Xr ioctl 2 51on the 52.Xr gpio 4 53device. 54.Sh SEE ALSO 55.Xr gpio 4 , 56.Xr intro 4 57.Sh HISTORY 58The 59.Nm 60driver first appeared in 61.Nx 6.0 . 62.Sh AUTHORS 63.An -nosplit 64The 65.Nm 66driver was written by 67.An Marc Balmer Aq Mt marc@msys.ch . 68