Commit Graph

40 Commits

Author SHA1 Message Date
jakllsch aa41167b90 If we can't read a pin while listing pins, simply continue on to next
pin rather than abort.
2022-12-13 21:47:36 +00:00
wiz 4a4aaff12c Be consistent in not marking up "GPIO". 2019-10-20 17:45:08 +00:00
tnn bbae070d2b 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
...
2019-10-20 09:41:53 +00:00
wiz aa6b736126 Bump date for previous. 2019-02-13 11:40:41 +00:00
mlelstv 1586b80690 Document options to select alternate GPIO modes. 2019-02-12 21:41:38 +00:00
pgoyette d91f98a871 Merge the [pgoyette-compat] branch 2019-01-27 02:08:33 +00:00
christos d5a790ba35 add __RCSID 2018-10-19 22:51:13 +00:00
thorpej b936dffb43 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
2018-05-19 13:59:06 +00:00
bouyer 16b5bc5ec8 Fix pasto for GPIO_PIN_EVENTS/GPIO_PIN_LEVEL/GPIO_PIN_FALLING
(not used at this time)
2016-04-05 10:58:04 +00:00
mlelstv b92b935f14 pass new pin configuration flags to driver. 2015-12-06 07:31:28 +00:00
christos f47593bb0f use strtonum from libc (Kamil Rytarowski) 2015-01-29 03:28:19 +00:00
riastradh 6cb10275d0 Merge riastradh-drm2 to HEAD. 2014-03-18 18:20:35 +00:00
wiz a5684d07dd Use Mt for email addresses. 2013-07-20 21:39:55 +00:00
mbalmer 4dfbc91d39 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.
2013-05-19 15:31:23 +00:00
mbalmer 9cfaa75e46 Remove stray 'To'. 2013-05-19 14:06:35 +00:00
mbalmer 5d1027619d Fix a "lonely name". 2011-11-13 14:39:42 +00:00
mbalmer a2091c8232 Remove software pulsing in gpio(4), this functionality is now provided
by the gpiopwm(4) driver.
2011-11-13 13:20:02 +00:00
mbalmer 55c6b7f708 Second part of typo fixing cycle... 2011-11-12 16:34:03 +00:00
mbalmer 2f3d365a23 Fix typo. 2011-11-12 15:44:36 +00:00
wiz 7caa96aa36 Sort SEE ALSO. 2011-10-06 11:05:42 +00:00
mbalmer d394843f35 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.
2011-10-03 11:16:47 +00:00
mbalmer 44f61c8547 It's actually 'the flag locator', not 'flags' (as 'flags' can not be used
as a locator name for reasons unknown to me.)
2011-10-02 12:43:52 +00:00
mbalmer 90077b6e6d 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.
2011-10-02 09:33:18 +00:00
mbalmer 53d80c937c Bump (c) year. 2011-09-15 11:46:32 +00:00
joerg 7a78feffac static + __dead 2011-08-30 18:50:48 +00:00
wiz 4776eb0a7a Use Cm to mark up command arguments. Use An -nosplit to avoid linebreak in sentence. 2011-08-28 17:10:37 +00:00
mbalmer 92ced822d1 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).
2011-08-28 07:48:50 +00:00
mbalmer c9922bae5e use my NetBSD email address 2011-08-12 08:06:23 +00:00
mbalmer badcc9683d Make some functions static, use getprogname() instead of
'extern char *__progname'.
2011-08-12 08:02:33 +00:00
mbalmer 98c9076713 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.
2009-09-25 20:27:50 +00:00
mbalmer e5d5fe6e06 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.
2009-09-25 19:37:03 +00:00
mbalmer 32eeaba5d3 Reworked gpioctl(8) command to reflect recent gpio(4) changes. 2009-07-25 16:18:09 +00:00
lukem d877c4c3c0 Enable WARNS=4 by default, except for:
cpuctl  dumplfs  hprop  ipf  iprop-log  kadmin  kcm  kdc  kdigest
	kimpersonate  kstash  ktutil  makefs  ndbootd  ntp  pppd  quot
	racoon  racoonctl  rtadvd  sntp  sup  tcpdchk  tcpdmatch  tcpdump
	traceroute  traceroute6  user  veriexecgen  wsmoused  zic
(Mostly third-party applications)
2009-04-22 15:23:01 +00:00
xtraeme 00e40eb383 Staticify fully now. 2008-01-09 16:08:33 +00:00
xtraeme 9b5c4f4208 KNF: bzero -> memset, use EXIT_{FAILURE,SUCCESS}, setprogname() and
getprogname(), etc.
2008-01-09 16:06:21 +00:00
xtraeme d8ea295bf8 Pass WARNS=4. 2008-01-09 15:57:06 +00:00
xtraeme cfebb94aea Add support for GPIO_PIN_PULLDOWN, GPIO_PIN_INVIN, GPIO_PIN_INVOUT,
from OpenBSD.
2008-01-09 15:56:27 +00:00
xtraeme b3bb086550 Xref gcscpcib(4). 2008-01-09 15:50:00 +00:00
wiz 3224a4d9fd Remove default argument from .Nm. Add a missing article. Mention NetBSD import. 2005-09-27 09:16:20 +00:00
jmcneill 825ff1848a Import userland utility for playing with gpio devices. From OpenBSD. 2005-09-27 02:54:27 +00:00