[Avila] Gateworks Openwrt and GPIO

Chris Lang chris at ccbw.net
Wed Jun 11 18:22:37 EDT 2008


Mark,

For the Avila, the gpio's currently are not configured on a per board basis. You will notice in avila-setup.c that it is flagged as needing to be done. Instead it has a blanket mask of the following:

#define AVILA_GPIO_MASK (1 << 1) | (1 << 3) | (1 << 5) | (1 << 7) | (1 << 9)

which means that you can only control gpio's 1, 3, 5, 7, and 9.

You will also need to set them as output's before trying to set/clear them. So, in your example, you will need to do the following to set/clear gpio 1:

# gpioctl dirout 1
# gpioctl set 1
# gpioctl clear 1

As for gpio 3, you are able to set/clear it without setting the direction because the led driver set's it as an output.

- Chris 
  ----- Original Message ----- 
  From: Mark Kelly 
  To: avila 
  Sent: Wednesday, June 11, 2008 11:48 AM
  Subject: [Avila] Gateworks Openwrt and GPIO


  Anyone using the current openwrt and their gpiodev?

  I have this strange problem with my GW2345 and I'm not sure where to look.  I've found in the the openwrt patches where they assign gpio 3 to the LED which works great.  Now what doesn't appear to work is the other gpio on the board.  using the gpioctl package I can control gpio 3 just fine, but  if I try to turn gpio 0,1,2, or 4 on or off with it.  It just sits there.  It acts like it does something, but that status of those gpio never changes.  

  When I look at the patchset for gpio 3 it appears that it is latched and I'm wondering if I change the other gpio pins to be that way if I can control similarly?







------------------------------------------------------------------------------


  _______________________________________________
  Avila mailing list
  Avila at lists.gateworks.com
  http://lists.gateworks.com/cgi-bin/mailman/listinfo/avila
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.gateworks.com/pipermail/avila/attachments/20080611/13570e0b/attachment.htm 


More information about the Avila mailing list