All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dirk Behme <dirk.behme@googlemail.com>
To: Richard Copeman <richard.copeman@lauterbach.co.uk>
Cc: linux-omap-open-source@linux.omap.com
Subject: Re: OMAP5912 OSK & GPIO
Date: Wed, 24 May 2006 18:09:29 +0200	[thread overview]
Message-ID: <44748539.4030200@gmail.com> (raw)
In-Reply-To: <009d01c67f49$47f84170$642aa8c0@Buffy>

Richard Copeman wrote:
> Hi,
> 
> Does anybody have any examples for configuring and using the GPIO pins?
> I'm trying to toggle GPIO7. I set the data direction bit to output and set
> the output pin register bit to high. I have not changed the default pin
> muxing, so I assume I should be getting a signal on pin L15, which according
> to my schematics is pin 25 on connector P12. I put a scope on there and
> don't see anything ;-(

Try to use GPIO framework. See for example

/arch/arm/mach-omap1/leds.c
/arch/arm/mach-omap1/leds-osk.c

#include <asm/arch/gpio.h>
#include <asm/arch/mux.h>

omap_cfg_reg(P18_1610_GPIO3);  // request pin from pinmux, 
depends on chip
if (omap_request_gpio(3) == 0)      // request GPIO
    omap_set_gpio_direction(3, 0);   // set it to output
omap_set_gpio_dataout(3, 1);        // set it

Regards

Dirk

      reply	other threads:[~2006-05-24 16:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20060523170002.3B4B88062C@linux.omap.com>
2006-05-24 15:46 ` OMAP5912 OSK & GPIO Richard Copeman
2006-05-24 16:09   ` Dirk Behme [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=44748539.4030200@gmail.com \
    --to=dirk.behme@googlemail.com \
    --cc=linux-omap-open-source@linux.omap.com \
    --cc=richard.copeman@lauterbach.co.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.