Home | History | Annotate | Download | only in gpioctl
History log of /src/usr.sbin/gpioctl/gpioctl.c
RevisionDateAuthorComments
 1.28  13-Dec-2022  jakllsch If we can't read a pin while listing pins, simply continue on to next
pin rather than abort.
 1.27  20-Oct-2019  tnn gpioctl: implement support for "gpioctl gpioN list". Like pcictl(8).

For drivers that name their pins, this can be used to determine how the
logical pins are mapped to physical pins. Example from sunxigpio(4):

# gpioctl gpio0 list
0: PA0
1: PA1
2: PA2
...
 1.26  27-Jan-2019  pgoyette Merge the [pgoyette-compat] branch
 1.25  19-Oct-2018  christos add __RCSID
 1.24  19-May-2018  thorpej branches: 1.24.2;
Overhaul of GPIO interrupt support (that wasn't even used by anything).
- Remove the old, not-expressive-enough interrupt flags, and replace them
with a new set of interrupt-specific flags that can express a wide
variety of interrupt configurations (pos, neg, and double-edge, high
and low level).
- Remove old, unused gpio_pin_ctl_intr() and gpio_pin_irqen(), and
replace them with gpio_intr_establish(), gpio_intr_disestablish(),
and gpio_intr_str(). Corresponding fields in the gpio_chipset_tag
are also added for back-end controllers, which now handle the actual
dispatch of GPIO interrupts in order to properly support level-triggered
interrupts as well as interoperate properly with FDT-registered
interrupts.

Piggy-back on the 8.99.18 version bump.

Inspired by initial work from Brad Spencer.
PR kern/51676
 1.23  05-Apr-2016  bouyer branches: 1.23.14;
Fix pasto for GPIO_PIN_EVENTS/GPIO_PIN_LEVEL/GPIO_PIN_FALLING
(not used at this time)
 1.22  06-Dec-2015  mlelstv pass new pin configuration flags to driver.
 1.21  29-Jan-2015  christos use strtonum from libc (Kamil Rytarowski)
 1.20  19-May-2013  mbalmer Make it easier to use gpioctl(8) in shell scripts: Add a -s flag which
instructs gpioctl(8) to only output a single numeric value, either the
number of pins if no pin number was passed as argumenti, or, the current
state of the pin.
 1.19  13-Nov-2011  mbalmer branches: 1.19.6;
Remove software pulsing in gpio(4), this functionality is now provided
by the gpiopwm(4) driver.
 1.18  12-Nov-2011  mbalmer Second part of typo fixing cycle...
 1.17  12-Nov-2011  mbalmer Fix typo.
 1.16  03-Oct-2011  mbalmer branches: 1.16.2;
Remove the GPIODETACH gpio(4) ioctl (it is still available in COMPAT_50) and
the 'detach' command line option from gpioctl(8). Drivers that are
attached to gpio pins can be detached using the drvctl(8) command.
 1.15  02-Oct-2011  mbalmer It's actually 'the flag locator', not 'flags' (as 'flags' can not be used
as a locator name for reasons unknown to me.)
 1.14  02-Oct-2011  mbalmer Add a ga_flags field to the gpio_attach structure to hand driver
specific flags to drivers being attached at gpio pins. gpioiic(4)
uses this to reverse the SDA/SCL signal order. gpioctl(8) accepts
the flag values as optional argument to the attach command.
While here, make sure we retain backwards compatability and wrap compat
code in #ifdef COMPAT_50/#endif.
 1.13  15-Sep-2011  mbalmer Bump (c) year.
 1.12  30-Aug-2011  joerg static + __dead
 1.11  28-Aug-2011  mbalmer Add a new ioctl, GPIOPULSE to gpio(4) to allow for pulsing a pin.
If a pin can pulse in hardware, that will be used, else it will
be pulsed in software. There is no way yet to set the pulse frequency
for pins that pulse in hardware. While here, make the code mpsafe and
allow more than one thread in the driver (access to ioctl is serialized).
 1.10  12-Aug-2011  mbalmer use my NetBSD email address
 1.9  12-Aug-2011  mbalmer Make some functions static, use getprogname() instead of
'extern char *__progname'.
 1.8  25-Sep-2009  mbalmer Rename 'pulse' to 'pulsate' to make clear it is a continuous strain of
pulses and and not a single shot pulse that is emitted by devices
supporting this kind of operation.
 1.7  25-Sep-2009  mbalmer Jonatha Kollasch has a GPIO device that can pulse the output lines.
Support it wuth the GPIO_PIN_PULSE attribute and the 'pulse' paramater
to gpioctl. Discussed with Jonathan.
 1.6  25-Jul-2009  mbalmer Reworked gpioctl(8) command to reflect recent gpio(4) changes.
 1.5  09-Jan-2008  xtraeme Staticify fully now.
 1.4  09-Jan-2008  xtraeme KNF: bzero -> memset, use EXIT_{FAILURE,SUCCESS}, setprogname() and
getprogname(), etc.
 1.3  09-Jan-2008  xtraeme Pass WARNS=4.
 1.2  09-Jan-2008  xtraeme Add support for GPIO_PIN_PULLDOWN, GPIO_PIN_INVIN, GPIO_PIN_INVOUT,
from OpenBSD.
 1.1  27-Sep-2005  jmcneill branches: 1.1.10;
Import userland utility for playing with gpio devices. From OpenBSD.
 1.1.10.1  23-Mar-2008  matt sync with HEAD
 1.16.2.2  22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.16.2.1  17-Apr-2012  yamt sync with head
 1.19.6.1  23-Jun-2013  tls resync from head
 1.23.14.2  20-Oct-2018  pgoyette Sync with head
 1.23.14.1  21-May-2018  pgoyette Sync with HEAD
 1.24.2.2  13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.24.2.1  10-Jun-2019  christos Sync with HEAD

RSS XML Feed