mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Andrey Smirnov <andrew.smirnov@gmail.com>
To: Aleksander Morgado <aleksander@aleksander.es>
Cc: mihaita_ivascu@trimble.com, Barebox List <barebox@lists.infradead.org>
Subject: Re: Cannot set GPIOs in barebox
Date: Mon, 30 Jul 2018 13:40:39 -0700	[thread overview]
Message-ID: <CAHQ1cqFqu2czXzxhBWQHH7woQEQ39G1hjaU_Vvg3KGnhRhnnaw@mail.gmail.com> (raw)
In-Reply-To: <CAAP7ucL+qH9Ys2z+viSRXmJDJFSEExH+yq_r+YpQxOQ6RujA1g@mail.gmail.com>

On Mon, Jul 30, 2018 at 12:28 PM Aleksander Morgado
<aleksander@aleksander.es> wrote:
>
> Hey,
>
> >
> >     This topic could be ignored. GPIO set/get value functions from
> > barebox are working fine BUT gpioinfo function has some bug it reports
> > unchanged status for gpios value.
> >
>
> Not that I got into much detail, but when I saw that same issue (I
> have some WIP patches to manage GPIOs via RATP) I just assumed that we
> can reliably gpio_get_value() on input GPIOs, and gpio_set_value() on
> output GPIOs. Trying to "read" the output GPIO value with
> gpio_get_value() may not be reliable or even supported at all. Is that
> assumption correct?

AFAIK/IMHO this would really depend on the hardware platform. On
i.MX(also depending on IOMUX IP used as well) appropriate IOMUX
configuration is necessary in order to be able to "sense" the actual
logical level of a GPIO configured as . If I recall things correctly,
i.MX51/6/8, would require a SION bit set and i.MX7/VF610 would require
input buffer to be enabled, otherwise output GPIOs would always report
the same value via gpio_get_value().

Thanks,
Andrey Smirnov

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

  reply	other threads:[~2018-07-30 20:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-19  9:05 Mihaita Ivascu
2018-07-19 10:30 ` Mihaita Ivascu
2018-07-30 19:27   ` Aleksander Morgado
2018-07-30 20:40     ` Andrey Smirnov [this message]
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=CAHQ1cqFqu2czXzxhBWQHH7woQEQ39G1hjaU_Vvg3KGnhRhnnaw@mail.gmail.com \
    --to=andrew.smirnov@gmail.com \
    --cc=aleksander@aleksander.es \
    --cc=barebox@lists.infradead.org \
    --cc=mihaita_ivascu@trimble.com \
    /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