From owner-svn-src-head@freebsd.org Sun May 8 08:57:52 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 212B4B3148A; Sun, 8 May 2016 08:57:52 +0000 (UTC) (envelope-from skra@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E777E1ADF; Sun, 8 May 2016 08:57:51 +0000 (UTC) (envelope-from skra@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u488vpsx062029; Sun, 8 May 2016 08:57:51 GMT (envelope-from skra@FreeBSD.org) Received: (from skra@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u488vpYs062028; Sun, 8 May 2016 08:57:51 GMT (envelope-from skra@FreeBSD.org) Message-Id: <201605080857.u488vpYs062028@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: skra set sender to skra@FreeBSD.org using -f From: Svatopluk Kraus Date: Sun, 8 May 2016 08:57:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r299228 - head/sys/arm/ti X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 May 2016 08:57:52 -0000 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); }