From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-it0-x233.google.com ([2607:f8b0:4001:c0b::233]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fkEyX-0004i8-8v for barebox@lists.infradead.org; Mon, 30 Jul 2018 20:41:06 +0000 Received: by mail-it0-x233.google.com with SMTP id q20-v6so1196519ith.0 for ; Mon, 30 Jul 2018 13:40:51 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Andrey Smirnov Date: Mon, 30 Jul 2018 13:40:39 -0700 Message-ID: List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "barebox" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: Re: Cannot set GPIOs in barebox To: Aleksander Morgado Cc: mihaita_ivascu@trimble.com, Barebox List On Mon, Jul 30, 2018 at 12:28 PM Aleksander Morgado 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