svn commit: r299228 - head/sys/arm/ti

Svatopluk Kraus skra at FreeBSD.org
Sun May 8 08:57:52 UTC 2016


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);
 }


More information about the svn-src-all mailing list