From owner-freebsd-arm@FreeBSD.ORG Mon Jan 28 14:21:27 2013 Return-Path: Delivered-To: freebsd-arm@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 796A856B for ; Mon, 28 Jan 2013 14:21:27 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from duck.symmetricom.us (duck.symmetricom.us [206.168.13.214]) by mx1.freebsd.org (Postfix) with ESMTP id 88CA2DF9 for ; Mon, 28 Jan 2013 14:20:54 +0000 (UTC) Received: from damnhippie.dyndns.org (daffy.symmetricom.us [206.168.13.218]) by duck.symmetricom.us (8.14.6/8.14.6) with ESMTP id r0SEKr58046041 for ; Mon, 28 Jan 2013 07:20:54 -0700 (MST) (envelope-from ian@FreeBSD.org) Received: from [172.22.42.240] (revolution.hippie.lan [172.22.42.240]) by damnhippie.dyndns.org (8.14.3/8.14.3) with ESMTP id r0SEKVvh020866; Mon, 28 Jan 2013 07:20:31 -0700 (MST) (envelope-from ian@FreeBSD.org) Subject: Re: Beaglebone and GPIO From: Ian Lepore To: Aleksandr Rybalko In-Reply-To: <20130128152828.f21d71e76634fda6aa059325@ddteam.net> References: <20130128044511.86a3d715b11c3346884a7056@megadrive.org> <20130128063436.707fb62d79767d2d8ce0542a@megadrive.org> <22039243-8515-4245-97D1-48C29CB04F00@gmail.com> <20130128152828.f21d71e76634fda6aa059325@ddteam.net> Content-Type: text/plain; charset="us-ascii" Date: Mon, 28 Jan 2013 07:20:31 -0700 Message-ID: <1359382831.93359.65.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: freebsd-arm@FreeBSD.org X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jan 2013 14:21:27 -0000 On Mon, 2013-01-28 at 15:28 +0200, Aleksandr Rybalko wrote: > On Mon, 28 Jan 2013 10:28:14 +0100 > Damjan Marion wrote: > > > > > On Jan 28, 2013, at 6:34 AM, Emmanuel Vadot wrote: > > > > > On Mon, 28 Jan 2013 04:45:11 +0100 > > > Emmanuel Vadot wrote: > > > > > >> > > >> Hello, > > >> > > >> I've filled the missings pads on am335x_scm_padconf.c so every GPIO pin is now accessible (if, of course, they are in GPIO mode). > > >> > > >> I've also corrected/enhanced an error on ti_gpio.c, in the ti_gpio_pin_get function then code was testing if the pin was in output mode and if it was return EINVAL but in fact it was returning EINVAL if the pin was in input mode. > > >> Now the function return the value of the pin despite of it's an input or output. (seems more logical to me but I'm open to discuss this). > > >> > > >> I've also patched gpioctl(1), it now test if the pin is in GPIO mode (according to the pin mux setting) and print either the value or "Not in GPIO mode". > > >> > > >> Cheers, > > > > > > Attached is the coorect patch with the correct case for some signals names. > > > > Hell, Thanks for diffs. > > > > padconf stuff is committed. For gpio changes would like to have blessing from gonzo. > > > > Gonzo, are you fine with gpio changes? > > > > Damjan > > > > _______________________________________________ > > freebsd-arm@freebsd.org mailing list > > http://lists.freebsd.org/mailman/listinfo/freebsd-arm > > To unsubscribe, send any mail to "freebsd-arm-unsubscribe@freebsd.org" > > Hi! > > No-no-no, guys, please don't do that. I'm working on Freescale i.MX5 > support, and it have way to read pin input even if another controller > drives that pin (If I understand doc correct :) ). > > Thanks! > > WBW The Atmel gpio/mpp pins are like that too, you can always read and trigger interrupts on a pin even when it's assigned to peripherals. It's important sometimes for working around broken peripherals. -- Ian