From owner-svn-src-head@FreeBSD.ORG Fri May 9 13:44:42 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 912EFF2E; Fri, 9 May 2014 13:44:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 7E8FA834; Fri, 9 May 2014 13:44:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s49Dig2L069261; Fri, 9 May 2014 13:44:42 GMT (envelope-from loos@svn.freebsd.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s49DigKh069260; Fri, 9 May 2014 13:44:42 GMT (envelope-from loos@svn.freebsd.org) Message-Id: <201405091344.s49DigKh069260@svn.freebsd.org> From: Luiz Otavio O Souza Date: Fri, 9 May 2014 13:44:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r265774 - head/sys/mips/atheros 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.18 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: Fri, 09 May 2014 13:44:42 -0000 Author: loos Date: Fri May 9 13:44:42 2014 New Revision: 265774 URL: http://svnweb.freebsd.org/changeset/base/265774 Log: When a GPIO pin is set to be turned on by kernel hints (hint.gpio.X.pinon) make sure the GPIO pin is configured as an output as this is not always the case. Modified: head/sys/mips/atheros/ar71xx_gpio.c Modified: head/sys/mips/atheros/ar71xx_gpio.c ============================================================================== --- head/sys/mips/atheros/ar71xx_gpio.c Fri May 9 13:32:36 2014 (r265773) +++ head/sys/mips/atheros/ar71xx_gpio.c Fri May 9 13:44:42 2014 (r265774) @@ -437,10 +437,13 @@ ar71xx_gpio_attach(device_t dev) ar71xx_gpio_pin_configure(sc, &sc->gpio_pins[i], DEFAULT_CAPS); i++; } + /* Turn on the hinted pins. */ for (i = 0; i < sc->gpio_npins; i++) { j = sc->gpio_pins[i].gp_pin; - if ((pinon & (1 << j)) != 0) + if ((pinon & (1 << j)) != 0) { + ar71xx_gpio_pin_setflags(dev, j, GPIO_PIN_OUTPUT); ar71xx_gpio_pin_set(dev, j, 1); + } } device_add_child(dev, "gpioc", device_get_unit(dev)); device_add_child(dev, "gpiobus", device_get_unit(dev));