mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Mihaita Ivascu <mihaita_ivascu@trimble.com>
To: barebox@lists.infradead.org
Subject: Cannot set GPIOs in barebox
Date: Thu, 19 Jul 2018 11:05:41 +0200	[thread overview]
Message-ID: <CAEp+FuDgNdw3Grc8-YAovRFHZSoHGwWeaY-O8TxpcXo3Qve0TQ@mail.gmail.com> (raw)

Hello,

    I would like to set gpio direction and values from barebox. I use:

gpio_direction_output(133, 1);
        mdelay(2);
        gpio_set_value(133, 1);
        mdelay(2);
        gpio_direction_output(137, 1);
        mdelay(2);
        gpio_set_value(137, 1);

from my board.c or using commands in the barebox shell. Setting
direction is working but setting value it not performed.

GPIOs 128-159, chip 20ac000.gpio:
             dir val requested  label
  GPIO  128:  in  lo        false
  GPIO  129:  in  lo        false
  GPIO  130:  in  lo        false
  GPIO  131:  in  lo        false
  GPIO  132:  in  lo        false
  GPIO  133: out  lo         true  gpio
  GPIO  134:  in  lo        false
  GPIO  135:  in  lo        false
  GPIO  136:  in  lo        false
  GPIO  137: out  lo         true  gpio
  GPIO  138:  in  lo        false


    What could be the issue? And what could be the workaround? I would
really need to set some GPIOs high from the barebox.

Thanks,
      Mihaita

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

             reply	other threads:[~2018-07-19  9:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-19  9:05 Mihaita Ivascu [this message]
2018-07-19 10:30 ` Mihaita Ivascu
2018-07-30 19:27   ` Aleksander Morgado
2018-07-30 20:40     ` Andrey Smirnov
2018-08-03  8:22       ` Mihaita Ivascu

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=CAEp+FuDgNdw3Grc8-YAovRFHZSoHGwWeaY-O8TxpcXo3Qve0TQ@mail.gmail.com \
    --to=mihaita_ivascu@trimble.com \
    --cc=barebox@lists.infradead.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox