Module Name: src Committed By: mbalmer Date: Fri Sep 25 19:37:03 UTC 2009
Modified Files: src/share/man/man4: gpio.4 src/sys/sys: gpio.h src/usr.sbin/gpioctl: gpioctl.8 gpioctl.c Log Message: 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. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/share/man/man4/gpio.4 cvs rdiff -u -r1.5 -r1.6 src/sys/sys/gpio.h cvs rdiff -u -r1.5 -r1.6 src/usr.sbin/gpioctl/gpioctl.8 cvs rdiff -u -r1.6 -r1.7 src/usr.sbin/gpioctl/gpioctl.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/share/man/man4/gpio.4 diff -u src/share/man/man4/gpio.4:1.14 src/share/man/man4/gpio.4:1.15 --- src/share/man/man4/gpio.4:1.14 Sun Aug 23 15:41:28 2009 +++ src/share/man/man4/gpio.4 Fri Sep 25 19:37:03 2009 @@ -1,4 +1,4 @@ -.\" $NetBSD: gpio.4,v 1.14 2009/08/23 15:41:28 wiz Exp $ +.\" $NetBSD: gpio.4,v 1.15 2009/09/25 19:37:03 mbalmer Exp $ .\" $OpenBSD: gpio.4,v 1.5 2004/11/23 09:39:29 reyk Exp $ .\" .\" Copyright (c) 2004 Alexander Yurchenko <gra...@openbsd.org> @@ -15,7 +15,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd August 23, 2009 +.Dd September 25, 2009 .Dt GPIO 4 .Os .Sh NAME @@ -163,6 +163,8 @@ invert input .It Dv GPIO_PIN_INVOUT invert output +.It Dv GPIO_PIN_PULSE +pulse output .El .Pp Note that the GPIO controller Index: src/sys/sys/gpio.h diff -u src/sys/sys/gpio.h:1.5 src/sys/sys/gpio.h:1.6 --- src/sys/sys/gpio.h:1.5 Tue Sep 22 01:29:36 2009 +++ src/sys/sys/gpio.h Fri Sep 25 19:37:03 2009 @@ -1,6 +1,7 @@ -/* $NetBSD: gpio.h,v 1.5 2009/09/22 01:29:36 isaki Exp $ */ +/* $NetBSD: gpio.h,v 1.6 2009/09/25 19:37:03 mbalmer Exp $ */ /* $OpenBSD: gpio.h,v 1.7 2008/11/26 14:51:20 mbalmer Exp $ */ /* + * Copyright (c) 2009 Marc Balmer <m...@msys.ch> * Copyright (c) 2004 Alexander Yurchenko <gra...@openbsd.org> * * Permission to use, copy, modify, and distribute this software for any @@ -38,6 +39,7 @@ #define GPIO_PIN_INVIN 0x0100 /* invert input */ #define GPIO_PIN_INVOUT 0x0200 /* invert output */ #define GPIO_PIN_USER 0x0400 /* user != 0 can access */ +#define GPIO_PIN_PULSE 0x0800 /* pulse in hardware */ #define GPIO_PIN_SET 0x8000 /* set for securelevel access */ /* GPIO controller description */ Index: src/usr.sbin/gpioctl/gpioctl.8 diff -u src/usr.sbin/gpioctl/gpioctl.8:1.5 src/usr.sbin/gpioctl/gpioctl.8:1.6 --- src/usr.sbin/gpioctl/gpioctl.8:1.5 Sat Jul 25 16:18:09 2009 +++ src/usr.sbin/gpioctl/gpioctl.8 Fri Sep 25 19:37:03 2009 @@ -1,4 +1,4 @@ -.\" $NetBSD: gpioctl.8,v 1.5 2009/07/25 16:18:09 mbalmer Exp $ +.\" $NetBSD: gpioctl.8,v 1.6 2009/09/25 19:37:03 mbalmer Exp $ .\" .\" Copyright (c) 2009 Marc Balmer <m...@msys.ch> .\" Copyright (c) 2004 Alexander Yurchenko <gra...@openbsd.org> @@ -15,7 +15,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd July 15, 2009 +.Dd September 25, 2009 .Dt GPIOCTL 8 .Os .Sh NAME @@ -137,6 +137,8 @@ invert input .It iout invert output +.It pulse +pulse output .El .Pp Note that not all the flags may be supported by the particular GPIO controller. Index: src/usr.sbin/gpioctl/gpioctl.c diff -u src/usr.sbin/gpioctl/gpioctl.c:1.6 src/usr.sbin/gpioctl/gpioctl.c:1.7 --- src/usr.sbin/gpioctl/gpioctl.c:1.6 Sat Jul 25 16:18:09 2009 +++ src/usr.sbin/gpioctl/gpioctl.c Fri Sep 25 19:37:03 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: gpioctl.c,v 1.6 2009/07/25 16:18:09 mbalmer Exp $ */ +/* $NetBSD: gpioctl.c,v 1.7 2009/09/25 19:37:03 mbalmer Exp $ */ /* * Copyright (c) 2008 Marc Balmer <mbal...@openbsd.org> @@ -67,6 +67,7 @@ { GPIO_PIN_PULLDOWN, "pd" }, { GPIO_PIN_INVIN, "iin" }, { GPIO_PIN_INVOUT, "iout" }, + { GPIO_PIN_PULSE, "pulse" }, { 0, NULL }, };