Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 8 May 2016 08:57:51 +0000 (UTC)
From:      Svatopluk Kraus <skra@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r299228 - head/sys/arm/ti
Message-ID:  <201605080857.u488vpYs062028@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: skra
Date: Sun May  8 08:57:50 2016
New Revision: 299228
URL: https://svnweb.freebsd.org/changeset/base/299228

Log:
  INTRNG - update gpio pin capabilities according to r299166.
  
  Note that the updated comment is valid only for INTRNG. This should not
  be a problem as not INTRNG code is left in place for debugging reasons
  only and should not be used anymore. It's anticipated that this old
  code will be removed soon.

Modified:
  head/sys/arm/ti/ti_gpio.c

Modified: head/sys/arm/ti/ti_gpio.c
==============================================================================
--- head/sys/arm/ti/ti_gpio.c	Sun May  8 03:26:12 2016	(r299227)
+++ head/sys/arm/ti/ti_gpio.c	Sun May  8 08:57:50 2016	(r299228)
@@ -290,7 +290,7 @@ ti_gpio_valid_pin(struct ti_gpio_softc *
 }
 
 /**
- *	ti_gpio_pin_getcaps - Gets the capabilties of a given pin
+ *	ti_gpio_pin_getcaps - Gets the capabilities of a given pin
  *	@dev: gpio device handle
  *	@pin: the number of the pin
  *	@caps: pointer to a value that upon return will contain the capabilities
@@ -300,6 +300,11 @@ ti_gpio_valid_pin(struct ti_gpio_softc *
  *	  - GPIO_PIN_OUTPUT
  *	  - GPIO_PIN_PULLUP
  *	  - GPIO_PIN_PULLDOWN
+ *	  - GPIO_INTR_LEVEL_LOW
+ *	  - GPIO_INTR_LEVEL_HIGH
+ *	  - GPIO_INTR_EDGE_RISING
+ *	  - GPIO_INTR_EDGE_FALLING
+ *	  - GPIO_INTR_EDGE_BOTH
  *
  *	LOCKING:
  *	No locking required, returns static data.
@@ -316,8 +321,15 @@ ti_gpio_pin_getcaps(device_t dev, uint32
 	if (ti_gpio_valid_pin(sc, pin) != 0)
 		return (EINVAL);
 
+#ifdef INTRNG
+	*caps = (GPIO_PIN_INPUT | GPIO_PIN_OUTPUT | GPIO_PIN_PULLUP |
+	    GPIO_PIN_PULLDOWN | GPIO_INTR_LEVEL_LOW | GPIO_INTR_LEVEL_HIGH |
+	    GPIO_INTR_EDGE_RISING | GPIO_INTR_EDGE_FALLING |
+	    GPIO_INTR_EDGE_BOTH);
+#else
 	*caps = (GPIO_PIN_INPUT | GPIO_PIN_OUTPUT | GPIO_PIN_PULLUP |
 	    GPIO_PIN_PULLDOWN);
+#endif
 
 	return (0);
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201605080857.u488vpYs062028>